{-# 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.List
(
AccountsListResource
, accountsList
, AccountsList
, alPageToken
, alMaxResults
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AccountsListResource =
"adsense" :>
"v1.4" :>
"accounts" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Accounts
data AccountsList = AccountsList'
{ _alPageToken :: !(Maybe Text)
, _alMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountsList
:: AccountsList
accountsList =
AccountsList'
{ _alPageToken = Nothing
, _alMaxResults = Nothing
}
alPageToken :: Lens' AccountsList (Maybe Text)
alPageToken
= lens _alPageToken (\ s a -> s{_alPageToken = a})
alMaxResults :: Lens' AccountsList (Maybe Int32)
alMaxResults
= lens _alMaxResults (\ s a -> s{_alMaxResults = a})
. mapping _Coerce
instance GoogleRequest AccountsList where
type Rs AccountsList = Accounts
type Scopes AccountsList =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AccountsList'{..}
= go _alPageToken _alMaxResults (Just AltJSON)
adSenseService
where go
= buildClient (Proxy :: Proxy AccountsListResource)
mempty