{-# 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.CustomChannels.List
(
AccountsCustomChannelsListResource
, accountsCustomChannelsList
, AccountsCustomChannelsList
, acclAdClientId
, acclAccountId
, acclPageToken
, acclMaxResults
) where
import Network.Google.AdExchangeSeller.Types
import Network.Google.Prelude
type AccountsCustomChannelsListResource =
"adexchangeseller" :>
"v2.0" :>
"accounts" :>
Capture "accountId" Text :>
"adclients" :>
Capture "adClientId" Text :>
"customchannels" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] CustomChannels
data AccountsCustomChannelsList = AccountsCustomChannelsList'
{ _acclAdClientId :: !Text
, _acclAccountId :: !Text
, _acclPageToken :: !(Maybe Text)
, _acclMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountsCustomChannelsList
:: Text
-> Text
-> AccountsCustomChannelsList
accountsCustomChannelsList pAcclAdClientId_ pAcclAccountId_ =
AccountsCustomChannelsList'
{ _acclAdClientId = pAcclAdClientId_
, _acclAccountId = pAcclAccountId_
, _acclPageToken = Nothing
, _acclMaxResults = Nothing
}
acclAdClientId :: Lens' AccountsCustomChannelsList Text
acclAdClientId
= lens _acclAdClientId
(\ s a -> s{_acclAdClientId = a})
acclAccountId :: Lens' AccountsCustomChannelsList Text
acclAccountId
= lens _acclAccountId
(\ s a -> s{_acclAccountId = a})
acclPageToken :: Lens' AccountsCustomChannelsList (Maybe Text)
acclPageToken
= lens _acclPageToken
(\ s a -> s{_acclPageToken = a})
acclMaxResults :: Lens' AccountsCustomChannelsList (Maybe Word32)
acclMaxResults
= lens _acclMaxResults
(\ s a -> s{_acclMaxResults = a})
. mapping _Coerce
instance GoogleRequest AccountsCustomChannelsList
where
type Rs AccountsCustomChannelsList = CustomChannels
type Scopes AccountsCustomChannelsList =
'["https://www.googleapis.com/auth/adexchange.seller",
"https://www.googleapis.com/auth/adexchange.seller.readonly"]
requestClient AccountsCustomChannelsList'{..}
= go _acclAccountId _acclAdClientId _acclPageToken
_acclMaxResults
(Just AltJSON)
adExchangeSellerService
where go
= buildClient
(Proxy :: Proxy AccountsCustomChannelsListResource)
mempty