{-# 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.AdSenseHost.CustomChannels.List
(
CustomChannelsListResource
, customChannelsList
, CustomChannelsList
, cclAdClientId
, cclPageToken
, cclMaxResults
) where
import Network.Google.AdSenseHost.Types
import Network.Google.Prelude
type CustomChannelsListResource =
"adsensehost" :>
"v4.1" :>
"adclients" :>
Capture "adClientId" Text :>
"customchannels" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] CustomChannels
data CustomChannelsList = CustomChannelsList'
{ _cclAdClientId :: !Text
, _cclPageToken :: !(Maybe Text)
, _cclMaxResults :: !(Maybe (Textual Word32))
} 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 Word32)
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/adsensehost"]
requestClient CustomChannelsList'{..}
= go _cclAdClientId _cclPageToken _cclMaxResults
(Just AltJSON)
adSenseHostService
where go
= buildClient
(Proxy :: Proxy CustomChannelsListResource)
mempty