{-# 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.AdUnits.CustomChannels.List
(
AdUnitsCustomChannelsListResource
, adUnitsCustomChannelsList
, AdUnitsCustomChannelsList
, aucclAdUnitId
, aucclAdClientId
, aucclPageToken
, aucclMaxResults
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AdUnitsCustomChannelsListResource =
"adsense" :>
"v1.4" :>
"adclients" :>
Capture "adClientId" Text :>
"adunits" :>
Capture "adUnitId" Text :>
"customchannels" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] CustomChannels
data AdUnitsCustomChannelsList = AdUnitsCustomChannelsList'
{ _aucclAdUnitId :: !Text
, _aucclAdClientId :: !Text
, _aucclPageToken :: !(Maybe Text)
, _aucclMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
adUnitsCustomChannelsList
:: Text
-> Text
-> AdUnitsCustomChannelsList
adUnitsCustomChannelsList pAucclAdUnitId_ pAucclAdClientId_ =
AdUnitsCustomChannelsList'
{ _aucclAdUnitId = pAucclAdUnitId_
, _aucclAdClientId = pAucclAdClientId_
, _aucclPageToken = Nothing
, _aucclMaxResults = Nothing
}
aucclAdUnitId :: Lens' AdUnitsCustomChannelsList Text
aucclAdUnitId
= lens _aucclAdUnitId
(\ s a -> s{_aucclAdUnitId = a})
aucclAdClientId :: Lens' AdUnitsCustomChannelsList Text
aucclAdClientId
= lens _aucclAdClientId
(\ s a -> s{_aucclAdClientId = a})
aucclPageToken :: Lens' AdUnitsCustomChannelsList (Maybe Text)
aucclPageToken
= lens _aucclPageToken
(\ s a -> s{_aucclPageToken = a})
aucclMaxResults :: Lens' AdUnitsCustomChannelsList (Maybe Int32)
aucclMaxResults
= lens _aucclMaxResults
(\ s a -> s{_aucclMaxResults = a})
. mapping _Coerce
instance GoogleRequest AdUnitsCustomChannelsList
where
type Rs AdUnitsCustomChannelsList = CustomChannels
type Scopes AdUnitsCustomChannelsList =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AdUnitsCustomChannelsList'{..}
= go _aucclAdClientId _aucclAdUnitId _aucclPageToken
_aucclMaxResults
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy AdUnitsCustomChannelsListResource)
mempty