{-# 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.Get
(
AccountsGetResource
, accountsGet
, AccountsGet
, agMerchantId
, agAccountId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type AccountsGetResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"accounts" :>
Capture "accountId" (Textual Word64) :>
QueryParam "alt" AltJSON :> Get '[JSON] Account
data AccountsGet = AccountsGet'
{ _agMerchantId :: !(Textual Word64)
, _agAccountId :: !(Textual Word64)
} deriving (Eq,Show,Data,Typeable,Generic)
accountsGet
:: Word64
-> Word64
-> AccountsGet
accountsGet pAgMerchantId_ pAgAccountId_ =
AccountsGet'
{ _agMerchantId = _Coerce # pAgMerchantId_
, _agAccountId = _Coerce # pAgAccountId_
}
agMerchantId :: Lens' AccountsGet Word64
agMerchantId
= lens _agMerchantId (\ s a -> s{_agMerchantId = a})
. _Coerce
agAccountId :: Lens' AccountsGet Word64
agAccountId
= lens _agAccountId (\ s a -> s{_agAccountId = a}) .
_Coerce
instance GoogleRequest AccountsGet where
type Rs AccountsGet = Account
type Scopes AccountsGet =
'["https://www.googleapis.com/auth/content"]
requestClient AccountsGet'{..}
= go _agMerchantId _agAccountId (Just AltJSON)
shoppingContentService
where go
= buildClient (Proxy :: Proxy AccountsGetResource)
mempty