{-# 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.AdSense.Accounts.CustomChannels.List
(
AccountsCustomChannelsListResource
, accountsCustomChannelsList
, AccountsCustomChannelsList
, acclAdClientId
, acclAccountId
, acclPageToken
, acclMaxResults
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AccountsCustomChannelsListResource =
"adsense" :>
"v1.4" :>
"accounts" :>
Capture "accountId" Text :>
"adclients" :>
Capture "adClientId" Text :>
"customchannels" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] CustomChannels
data AccountsCustomChannelsList = AccountsCustomChannelsList'
{ _acclAdClientId :: !Text
, _acclAccountId :: !Text
, _acclPageToken :: !(Maybe Text)
, _acclMaxResults :: !(Maybe (Textual Int32))
} 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 Int32)
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/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AccountsCustomChannelsList'{..}
= go _acclAccountId _acclAdClientId _acclPageToken
_acclMaxResults
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy AccountsCustomChannelsListResource)
mempty