{-# 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.AdClients.List
(
AccountsAdClientsListResource
, accountsAdClientsList
, AccountsAdClientsList
, aaclAccountId
, aaclPageToken
, aaclMaxResults
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AccountsAdClientsListResource =
"adsense" :>
"v1.4" :>
"accounts" :>
Capture "accountId" Text :>
"adclients" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] AdClients
data AccountsAdClientsList = AccountsAdClientsList'
{ _aaclAccountId :: !Text
, _aaclPageToken :: !(Maybe Text)
, _aaclMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountsAdClientsList
:: Text
-> AccountsAdClientsList
accountsAdClientsList pAaclAccountId_ =
AccountsAdClientsList'
{ _aaclAccountId = pAaclAccountId_
, _aaclPageToken = Nothing
, _aaclMaxResults = Nothing
}
aaclAccountId :: Lens' AccountsAdClientsList Text
aaclAccountId
= lens _aaclAccountId
(\ s a -> s{_aaclAccountId = a})
aaclPageToken :: Lens' AccountsAdClientsList (Maybe Text)
aaclPageToken
= lens _aaclPageToken
(\ s a -> s{_aaclPageToken = a})
aaclMaxResults :: Lens' AccountsAdClientsList (Maybe Int32)
aaclMaxResults
= lens _aaclMaxResults
(\ s a -> s{_aaclMaxResults = a})
. mapping _Coerce
instance GoogleRequest AccountsAdClientsList where
type Rs AccountsAdClientsList = AdClients
type Scopes AccountsAdClientsList =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AccountsAdClientsList'{..}
= go _aaclAccountId _aaclPageToken _aaclMaxResults
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy AccountsAdClientsListResource)
mempty