{-# 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.AdExchangeSeller.Accounts.List
(
AccountsListResource
, accountsList
, AccountsList
, alPageToken
, alMaxResults
) where
import Network.Google.AdExchangeSeller.Types
import Network.Google.Prelude
type AccountsListResource =
"adexchangeseller" :>
"v2.0" :>
"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/adexchange.seller",
"https://www.googleapis.com/auth/adexchange.seller.readonly"]
requestClient AccountsList'{..}
= go _alPageToken _alMaxResults (Just AltJSON)
adExchangeSellerService
where go
= buildClient (Proxy :: Proxy AccountsListResource)
mempty