{-# 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.ShippingSettings.Update
(
ShippingSettingsUpdateResource
, shippingSettingsUpdate
, ShippingSettingsUpdate
, ssuMerchantId
, ssuPayload
, ssuAccountId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type ShippingSettingsUpdateResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"shippingsettings" :>
Capture "accountId" (Textual Word64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ShippingSettings :>
Put '[JSON] ShippingSettings
data ShippingSettingsUpdate = ShippingSettingsUpdate'
{ _ssuMerchantId :: !(Textual Word64)
, _ssuPayload :: !ShippingSettings
, _ssuAccountId :: !(Textual Word64)
} deriving (Eq,Show,Data,Typeable,Generic)
shippingSettingsUpdate
:: Word64
-> ShippingSettings
-> Word64
-> ShippingSettingsUpdate
shippingSettingsUpdate pSsuMerchantId_ pSsuPayload_ pSsuAccountId_ =
ShippingSettingsUpdate'
{ _ssuMerchantId = _Coerce # pSsuMerchantId_
, _ssuPayload = pSsuPayload_
, _ssuAccountId = _Coerce # pSsuAccountId_
}
ssuMerchantId :: Lens' ShippingSettingsUpdate Word64
ssuMerchantId
= lens _ssuMerchantId
(\ s a -> s{_ssuMerchantId = a})
. _Coerce
ssuPayload :: Lens' ShippingSettingsUpdate ShippingSettings
ssuPayload
= lens _ssuPayload (\ s a -> s{_ssuPayload = a})
ssuAccountId :: Lens' ShippingSettingsUpdate Word64
ssuAccountId
= lens _ssuAccountId (\ s a -> s{_ssuAccountId = a})
. _Coerce
instance GoogleRequest ShippingSettingsUpdate where
type Rs ShippingSettingsUpdate = ShippingSettings
type Scopes ShippingSettingsUpdate =
'["https://www.googleapis.com/auth/content"]
requestClient ShippingSettingsUpdate'{..}
= go _ssuMerchantId _ssuAccountId (Just AltJSON)
_ssuPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy ShippingSettingsUpdateResource)
mempty