{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.AdExchangeSeller.Accounts.PreferredDeals.List
(
AccountsPreferredDealsListResource
, accountsPreferredDealsList
, AccountsPreferredDealsList
, apdlAccountId
) where
import Network.Google.AdExchangeSeller.Types
import Network.Google.Prelude
type AccountsPreferredDealsListResource =
"adexchangeseller" :>
"v2.0" :>
"accounts" :>
Capture "accountId" Text :>
"preferreddeals" :>
QueryParam "alt" AltJSON :>
Get '[JSON] PreferredDeals
newtype AccountsPreferredDealsList = AccountsPreferredDealsList'
{ _apdlAccountId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountsPreferredDealsList
:: Text
-> AccountsPreferredDealsList
accountsPreferredDealsList pApdlAccountId_ =
AccountsPreferredDealsList'
{ _apdlAccountId = pApdlAccountId_
}
apdlAccountId :: Lens' AccountsPreferredDealsList Text
apdlAccountId
= lens _apdlAccountId
(\ s a -> s{_apdlAccountId = a})
instance GoogleRequest AccountsPreferredDealsList
where
type Rs AccountsPreferredDealsList = PreferredDeals
type Scopes AccountsPreferredDealsList =
'["https://www.googleapis.com/auth/adexchange.seller",
"https://www.googleapis.com/auth/adexchange.seller.readonly"]
requestClient AccountsPreferredDealsList'{..}
= go _apdlAccountId (Just AltJSON)
adExchangeSellerService
where go
= buildClient
(Proxy :: Proxy AccountsPreferredDealsListResource)
mempty