{-# 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.AdUnits.List
(
AccountsAdUnitsListResource
, accountsAdUnitsList
, AccountsAdUnitsList
, aaulIncludeInactive
, aaulAdClientId
, aaulAccountId
, aaulPageToken
, aaulMaxResults
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AccountsAdUnitsListResource =
"adsense" :>
"v1.4" :>
"accounts" :>
Capture "accountId" Text :>
"adclients" :>
Capture "adClientId" Text :>
"adunits" :>
QueryParam "includeInactive" Bool :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] AdUnits
data AccountsAdUnitsList = AccountsAdUnitsList'
{ _aaulIncludeInactive :: !(Maybe Bool)
, _aaulAdClientId :: !Text
, _aaulAccountId :: !Text
, _aaulPageToken :: !(Maybe Text)
, _aaulMaxResults :: !(Maybe (Textual Int32))
} 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 Int32)
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/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AccountsAdUnitsList'{..}
= go _aaulAccountId _aaulAdClientId
_aaulIncludeInactive
_aaulPageToken
_aaulMaxResults
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy AccountsAdUnitsListResource)
mempty