module Network.Google.Resource.Content.Accounts.Patch
(
AccountsPatchResource
, accountsPatch
, AccountsPatch
, apMerchantId
, apPayload
, apAccountId
, apDryRun
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type AccountsPatchResource =
"content" :>
"v2" :>
Capture "merchantId" (Textual Word64) :>
"accounts" :>
Capture "accountId" (Textual Word64) :>
QueryParam "dryRun" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Account :> Patch '[JSON] Account
data AccountsPatch = AccountsPatch'
{ _apMerchantId :: !(Textual Word64)
, _apPayload :: !Account
, _apAccountId :: !(Textual Word64)
, _apDryRun :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
accountsPatch
:: Word64
-> Account
-> Word64
-> AccountsPatch
accountsPatch pApMerchantId_ pApPayload_ pApAccountId_ =
AccountsPatch'
{ _apMerchantId = _Coerce # pApMerchantId_
, _apPayload = pApPayload_
, _apAccountId = _Coerce # pApAccountId_
, _apDryRun = Nothing
}
apMerchantId :: Lens' AccountsPatch Word64
apMerchantId
= lens _apMerchantId (\ s a -> s{_apMerchantId = a})
. _Coerce
apPayload :: Lens' AccountsPatch Account
apPayload
= lens _apPayload (\ s a -> s{_apPayload = a})
apAccountId :: Lens' AccountsPatch Word64
apAccountId
= lens _apAccountId (\ s a -> s{_apAccountId = a}) .
_Coerce
apDryRun :: Lens' AccountsPatch (Maybe Bool)
apDryRun = lens _apDryRun (\ s a -> s{_apDryRun = a})
instance GoogleRequest AccountsPatch where
type Rs AccountsPatch = Account
type Scopes AccountsPatch =
'["https://www.googleapis.com/auth/content"]
requestClient AccountsPatch'{..}
= go _apMerchantId _apAccountId _apDryRun
(Just AltJSON)
_apPayload
shoppingContentService
where go
= buildClient (Proxy :: Proxy AccountsPatchResource)
mempty