{-# 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.Content.Accounts.List
(
AccountsListResource
, accountsList
, AccountsList
, allMerchantId
, allPageToken
, allMaxResults
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type AccountsListResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"accounts" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] AccountsListResponse
data AccountsList = AccountsList'
{ _allMerchantId :: !(Textual Word64)
, _allPageToken :: !(Maybe Text)
, _allMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountsList
:: Word64
-> AccountsList
accountsList pAllMerchantId_ =
AccountsList'
{ _allMerchantId = _Coerce # pAllMerchantId_
, _allPageToken = Nothing
, _allMaxResults = Nothing
}
allMerchantId :: Lens' AccountsList Word64
allMerchantId
= lens _allMerchantId
(\ s a -> s{_allMerchantId = a})
. _Coerce
allPageToken :: Lens' AccountsList (Maybe Text)
allPageToken
= lens _allPageToken (\ s a -> s{_allPageToken = a})
allMaxResults :: Lens' AccountsList (Maybe Word32)
allMaxResults
= lens _allMaxResults
(\ s a -> s{_allMaxResults = a})
. mapping _Coerce
instance GoogleRequest AccountsList where
type Rs AccountsList = AccountsListResponse
type Scopes AccountsList =
'["https://www.googleapis.com/auth/content"]
requestClient AccountsList'{..}
= go _allMerchantId _allPageToken _allMaxResults
(Just AltJSON)
shoppingContentService
where go
= buildClient (Proxy :: Proxy AccountsListResource)
mempty