{-# 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.CustomChannels.List
(
CustomChannelsListResource
, customChannelsList
, CustomChannelsList
, cclAdClientId
, cclPageToken
, cclMaxResults
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type CustomChannelsListResource =
"adsense" :>
"v1.4" :>
"adclients" :>
Capture "adClientId" Text :>
"customchannels" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] CustomChannels
data CustomChannelsList = CustomChannelsList'
{ _cclAdClientId :: !Text
, _cclPageToken :: !(Maybe Text)
, _cclMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
customChannelsList
:: Text
-> CustomChannelsList
customChannelsList pCclAdClientId_ =
CustomChannelsList'
{ _cclAdClientId = pCclAdClientId_
, _cclPageToken = Nothing
, _cclMaxResults = Nothing
}
cclAdClientId :: Lens' CustomChannelsList Text
cclAdClientId
= lens _cclAdClientId
(\ s a -> s{_cclAdClientId = a})
cclPageToken :: Lens' CustomChannelsList (Maybe Text)
cclPageToken
= lens _cclPageToken (\ s a -> s{_cclPageToken = a})
cclMaxResults :: Lens' CustomChannelsList (Maybe Int32)
cclMaxResults
= lens _cclMaxResults
(\ s a -> s{_cclMaxResults = a})
. mapping _Coerce
instance GoogleRequest CustomChannelsList where
type Rs CustomChannelsList = CustomChannels
type Scopes CustomChannelsList =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient CustomChannelsList'{..}
= go _cclAdClientId _cclPageToken _cclMaxResults
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy CustomChannelsListResource)
mempty