{-# 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.Update
(
AccountsUpdateResource
, accountsUpdate
, AccountsUpdate
, auuMerchantId
, auuPayload
, auuAccountId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type AccountsUpdateResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"accounts" :>
Capture "accountId" (Textual Word64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Account :> Put '[JSON] Account
data AccountsUpdate = AccountsUpdate'
{ _auuMerchantId :: !(Textual Word64)
, _auuPayload :: !Account
, _auuAccountId :: !(Textual Word64)
} deriving (Eq,Show,Data,Typeable,Generic)
accountsUpdate
:: Word64
-> Account
-> Word64
-> AccountsUpdate
accountsUpdate pAuuMerchantId_ pAuuPayload_ pAuuAccountId_ =
AccountsUpdate'
{ _auuMerchantId = _Coerce # pAuuMerchantId_
, _auuPayload = pAuuPayload_
, _auuAccountId = _Coerce # pAuuAccountId_
}
auuMerchantId :: Lens' AccountsUpdate Word64
auuMerchantId
= lens _auuMerchantId
(\ s a -> s{_auuMerchantId = a})
. _Coerce
auuPayload :: Lens' AccountsUpdate Account
auuPayload
= lens _auuPayload (\ s a -> s{_auuPayload = a})
auuAccountId :: Lens' AccountsUpdate Word64
auuAccountId
= lens _auuAccountId (\ s a -> s{_auuAccountId = a})
. _Coerce
instance GoogleRequest AccountsUpdate where
type Rs AccountsUpdate = Account
type Scopes AccountsUpdate =
'["https://www.googleapis.com/auth/content"]
requestClient AccountsUpdate'{..}
= go _auuMerchantId _auuAccountId (Just AltJSON)
_auuPayload
shoppingContentService
where go
= buildClient (Proxy :: Proxy AccountsUpdateResource)
mempty