{-# 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.AdUnits.List
(
AccountsCustomChannelsAdUnitsListResource
, accountsCustomChannelsAdUnitsList
, AccountsCustomChannelsAdUnitsList
, accaulIncludeInactive
, accaulCustomChannelId
, accaulAdClientId
, accaulAccountId
, accaulPageToken
, accaulMaxResults
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AccountsCustomChannelsAdUnitsListResource =
"adsense" :>
"v1.4" :>
"accounts" :>
Capture "accountId" Text :>
"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 AccountsCustomChannelsAdUnitsList = AccountsCustomChannelsAdUnitsList'
{ _accaulIncludeInactive :: !(Maybe Bool)
, _accaulCustomChannelId :: !Text
, _accaulAdClientId :: !Text
, _accaulAccountId :: !Text
, _accaulPageToken :: !(Maybe Text)
, _accaulMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountsCustomChannelsAdUnitsList
:: Text
-> Text
-> Text
-> AccountsCustomChannelsAdUnitsList
accountsCustomChannelsAdUnitsList pAccaulCustomChannelId_ pAccaulAdClientId_ pAccaulAccountId_ =
AccountsCustomChannelsAdUnitsList'
{ _accaulIncludeInactive = Nothing
, _accaulCustomChannelId = pAccaulCustomChannelId_
, _accaulAdClientId = pAccaulAdClientId_
, _accaulAccountId = pAccaulAccountId_
, _accaulPageToken = Nothing
, _accaulMaxResults = Nothing
}
accaulIncludeInactive :: Lens' AccountsCustomChannelsAdUnitsList (Maybe Bool)
accaulIncludeInactive
= lens _accaulIncludeInactive
(\ s a -> s{_accaulIncludeInactive = a})
accaulCustomChannelId :: Lens' AccountsCustomChannelsAdUnitsList Text
accaulCustomChannelId
= lens _accaulCustomChannelId
(\ s a -> s{_accaulCustomChannelId = a})
accaulAdClientId :: Lens' AccountsCustomChannelsAdUnitsList Text
accaulAdClientId
= lens _accaulAdClientId
(\ s a -> s{_accaulAdClientId = a})
accaulAccountId :: Lens' AccountsCustomChannelsAdUnitsList Text
accaulAccountId
= lens _accaulAccountId
(\ s a -> s{_accaulAccountId = a})
accaulPageToken :: Lens' AccountsCustomChannelsAdUnitsList (Maybe Text)
accaulPageToken
= lens _accaulPageToken
(\ s a -> s{_accaulPageToken = a})
accaulMaxResults :: Lens' AccountsCustomChannelsAdUnitsList (Maybe Int32)
accaulMaxResults
= lens _accaulMaxResults
(\ s a -> s{_accaulMaxResults = a})
. mapping _Coerce
instance GoogleRequest
AccountsCustomChannelsAdUnitsList where
type Rs AccountsCustomChannelsAdUnitsList = AdUnits
type Scopes AccountsCustomChannelsAdUnitsList =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AccountsCustomChannelsAdUnitsList'{..}
= go _accaulAccountId _accaulAdClientId
_accaulCustomChannelId
_accaulIncludeInactive
_accaulPageToken
_accaulMaxResults
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy ::
Proxy AccountsCustomChannelsAdUnitsListResource)
mempty