module Network.Google.Resource.Content.ShippingSettings.Patch
(
ShippingSettingsPatchResource
, shippingSettingsPatch
, ShippingSettingsPatch
, sspMerchantId
, sspPayload
, sspAccountId
, sspDryRun
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type ShippingSettingsPatchResource =
"content" :>
"v2" :>
Capture "merchantId" (Textual Word64) :>
"shippingsettings" :>
Capture "accountId" (Textual Word64) :>
QueryParam "dryRun" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ShippingSettings :>
Patch '[JSON] ShippingSettings
data ShippingSettingsPatch = ShippingSettingsPatch'
{ _sspMerchantId :: !(Textual Word64)
, _sspPayload :: !ShippingSettings
, _sspAccountId :: !(Textual Word64)
, _sspDryRun :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
shippingSettingsPatch
:: Word64
-> ShippingSettings
-> Word64
-> ShippingSettingsPatch
shippingSettingsPatch pSspMerchantId_ pSspPayload_ pSspAccountId_ =
ShippingSettingsPatch'
{ _sspMerchantId = _Coerce # pSspMerchantId_
, _sspPayload = pSspPayload_
, _sspAccountId = _Coerce # pSspAccountId_
, _sspDryRun = Nothing
}
sspMerchantId :: Lens' ShippingSettingsPatch Word64
sspMerchantId
= lens _sspMerchantId
(\ s a -> s{_sspMerchantId = a})
. _Coerce
sspPayload :: Lens' ShippingSettingsPatch ShippingSettings
sspPayload
= lens _sspPayload (\ s a -> s{_sspPayload = a})
sspAccountId :: Lens' ShippingSettingsPatch Word64
sspAccountId
= lens _sspAccountId (\ s a -> s{_sspAccountId = a})
. _Coerce
sspDryRun :: Lens' ShippingSettingsPatch (Maybe Bool)
sspDryRun
= lens _sspDryRun (\ s a -> s{_sspDryRun = a})
instance GoogleRequest ShippingSettingsPatch where
type Rs ShippingSettingsPatch = ShippingSettings
type Scopes ShippingSettingsPatch =
'["https://www.googleapis.com/auth/content"]
requestClient ShippingSettingsPatch'{..}
= go _sspMerchantId _sspAccountId _sspDryRun
(Just AltJSON)
_sspPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy ShippingSettingsPatchResource)
mempty