{-# 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.Accounts.AdUnits.List
(
AccountsAdUnitsListResource
, accountsAdUnitsList
, AccountsAdUnitsList
, aaulIncludeInactive
, aaulAdClientId
, aaulAccountId
, aaulPageToken
, aaulMaxResults
) where
import Network.Google.AdSenseHost.Types
import Network.Google.Prelude
type AccountsAdUnitsListResource =
"adsensehost" :>
"v4.1" :>
"accounts" :>
Capture "accountId" Text :>
"adclients" :>
Capture "adClientId" Text :>
"adunits" :>
QueryParam "includeInactive" Bool :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] AdUnits
data AccountsAdUnitsList = AccountsAdUnitsList'
{ _aaulIncludeInactive :: !(Maybe Bool)
, _aaulAdClientId :: !Text
, _aaulAccountId :: !Text
, _aaulPageToken :: !(Maybe Text)
, _aaulMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountsAdUnitsList
:: Text
-> Text
-> AccountsAdUnitsList
accountsAdUnitsList pAaulAdClientId_ pAaulAccountId_ =
AccountsAdUnitsList'
{ _aaulIncludeInactive = Nothing
, _aaulAdClientId = pAaulAdClientId_
, _aaulAccountId = pAaulAccountId_
, _aaulPageToken = Nothing
, _aaulMaxResults = Nothing
}
aaulIncludeInactive :: Lens' AccountsAdUnitsList (Maybe Bool)
aaulIncludeInactive
= lens _aaulIncludeInactive
(\ s a -> s{_aaulIncludeInactive = a})
aaulAdClientId :: Lens' AccountsAdUnitsList Text
aaulAdClientId
= lens _aaulAdClientId
(\ s a -> s{_aaulAdClientId = a})
aaulAccountId :: Lens' AccountsAdUnitsList Text
aaulAccountId
= lens _aaulAccountId
(\ s a -> s{_aaulAccountId = a})
aaulPageToken :: Lens' AccountsAdUnitsList (Maybe Text)
aaulPageToken
= lens _aaulPageToken
(\ s a -> s{_aaulPageToken = a})
aaulMaxResults :: Lens' AccountsAdUnitsList (Maybe Word32)
aaulMaxResults
= lens _aaulMaxResults
(\ s a -> s{_aaulMaxResults = a})
. mapping _Coerce
instance GoogleRequest AccountsAdUnitsList where
type Rs AccountsAdUnitsList = AdUnits
type Scopes AccountsAdUnitsList =
'["https://www.googleapis.com/auth/adsensehost"]
requestClient AccountsAdUnitsList'{..}
= go _aaulAccountId _aaulAdClientId
_aaulIncludeInactive
_aaulPageToken
_aaulMaxResults
(Just AltJSON)
adSenseHostService
where go
= buildClient
(Proxy :: Proxy AccountsAdUnitsListResource)
mempty