{-# 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.AdUnits.List
(
CustomChannelsAdUnitsListResource
, customChannelsAdUnitsList
, CustomChannelsAdUnitsList
, ccaulIncludeInactive
, ccaulCustomChannelId
, ccaulAdClientId
, ccaulPageToken
, ccaulMaxResults
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type CustomChannelsAdUnitsListResource =
"adsense" :>
"v1.4" :>
"adclients" :>
Capture "adClientId" Text :>
"customchannels" :>
Capture "customChannelId" Text :>
"adunits" :>
QueryParam "includeInactive" Bool :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] AdUnits
data CustomChannelsAdUnitsList = CustomChannelsAdUnitsList'
{ _ccaulIncludeInactive :: !(Maybe Bool)
, _ccaulCustomChannelId :: !Text
, _ccaulAdClientId :: !Text
, _ccaulPageToken :: !(Maybe Text)
, _ccaulMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
customChannelsAdUnitsList
:: Text
-> Text
-> CustomChannelsAdUnitsList
customChannelsAdUnitsList pCcaulCustomChannelId_ pCcaulAdClientId_ =
CustomChannelsAdUnitsList'
{ _ccaulIncludeInactive = Nothing
, _ccaulCustomChannelId = pCcaulCustomChannelId_
, _ccaulAdClientId = pCcaulAdClientId_
, _ccaulPageToken = Nothing
, _ccaulMaxResults = Nothing
}
ccaulIncludeInactive :: Lens' CustomChannelsAdUnitsList (Maybe Bool)
ccaulIncludeInactive
= lens _ccaulIncludeInactive
(\ s a -> s{_ccaulIncludeInactive = a})
ccaulCustomChannelId :: Lens' CustomChannelsAdUnitsList Text
ccaulCustomChannelId
= lens _ccaulCustomChannelId
(\ s a -> s{_ccaulCustomChannelId = a})
ccaulAdClientId :: Lens' CustomChannelsAdUnitsList Text
ccaulAdClientId
= lens _ccaulAdClientId
(\ s a -> s{_ccaulAdClientId = a})
ccaulPageToken :: Lens' CustomChannelsAdUnitsList (Maybe Text)
ccaulPageToken
= lens _ccaulPageToken
(\ s a -> s{_ccaulPageToken = a})
ccaulMaxResults :: Lens' CustomChannelsAdUnitsList (Maybe Int32)
ccaulMaxResults
= lens _ccaulMaxResults
(\ s a -> s{_ccaulMaxResults = a})
. mapping _Coerce
instance GoogleRequest CustomChannelsAdUnitsList
where
type Rs CustomChannelsAdUnitsList = AdUnits
type Scopes CustomChannelsAdUnitsList =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient CustomChannelsAdUnitsList'{..}
= go _ccaulAdClientId _ccaulCustomChannelId
_ccaulIncludeInactive
_ccaulPageToken
_ccaulMaxResults
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy CustomChannelsAdUnitsListResource)
mempty