{-# 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.Savedadstyles.List
(
AccountsSavedadstylesListResource
, accountsSavedadstylesList
, AccountsSavedadstylesList
, aslAccountId
, aslPageToken
, aslMaxResults
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AccountsSavedadstylesListResource =
"adsense" :>
"v1.4" :>
"accounts" :>
Capture "accountId" Text :>
"savedadstyles" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] SavedAdStyles
data AccountsSavedadstylesList = AccountsSavedadstylesList'
{ _aslAccountId :: !Text
, _aslPageToken :: !(Maybe Text)
, _aslMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountsSavedadstylesList
:: Text
-> AccountsSavedadstylesList
accountsSavedadstylesList pAslAccountId_ =
AccountsSavedadstylesList'
{ _aslAccountId = pAslAccountId_
, _aslPageToken = Nothing
, _aslMaxResults = Nothing
}
aslAccountId :: Lens' AccountsSavedadstylesList Text
aslAccountId
= lens _aslAccountId (\ s a -> s{_aslAccountId = a})
aslPageToken :: Lens' AccountsSavedadstylesList (Maybe Text)
aslPageToken
= lens _aslPageToken (\ s a -> s{_aslPageToken = a})
aslMaxResults :: Lens' AccountsSavedadstylesList (Maybe Int32)
aslMaxResults
= lens _aslMaxResults
(\ s a -> s{_aslMaxResults = a})
. mapping _Coerce
instance GoogleRequest AccountsSavedadstylesList
where
type Rs AccountsSavedadstylesList = SavedAdStyles
type Scopes AccountsSavedadstylesList =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AccountsSavedadstylesList'{..}
= go _aslAccountId _aslPageToken _aslMaxResults
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy AccountsSavedadstylesListResource)
mempty