module Network.Google.Resource.Content.Accountshipping.Patch
(
AccountshippingPatchResource
, accountshippingPatch
, AccountshippingPatch
, ap1MerchantId
, ap1Payload
, ap1AccountId
, ap1DryRun
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type AccountshippingPatchResource =
"content" :>
"v2" :>
Capture "merchantId" (Textual Word64) :>
"accountshipping" :>
Capture "accountId" (Textual Word64) :>
QueryParam "dryRun" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AccountShipping :>
Patch '[JSON] AccountShipping
data AccountshippingPatch = AccountshippingPatch'
{ _ap1MerchantId :: !(Textual Word64)
, _ap1Payload :: !AccountShipping
, _ap1AccountId :: !(Textual Word64)
, _ap1DryRun :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
accountshippingPatch
:: Word64
-> AccountShipping
-> Word64
-> AccountshippingPatch
accountshippingPatch pAp1MerchantId_ pAp1Payload_ pAp1AccountId_ =
AccountshippingPatch'
{ _ap1MerchantId = _Coerce # pAp1MerchantId_
, _ap1Payload = pAp1Payload_
, _ap1AccountId = _Coerce # pAp1AccountId_
, _ap1DryRun = Nothing
}
ap1MerchantId :: Lens' AccountshippingPatch Word64
ap1MerchantId
= lens _ap1MerchantId
(\ s a -> s{_ap1MerchantId = a})
. _Coerce
ap1Payload :: Lens' AccountshippingPatch AccountShipping
ap1Payload
= lens _ap1Payload (\ s a -> s{_ap1Payload = a})
ap1AccountId :: Lens' AccountshippingPatch Word64
ap1AccountId
= lens _ap1AccountId (\ s a -> s{_ap1AccountId = a})
. _Coerce
ap1DryRun :: Lens' AccountshippingPatch (Maybe Bool)
ap1DryRun
= lens _ap1DryRun (\ s a -> s{_ap1DryRun = a})
instance GoogleRequest AccountshippingPatch where
type Rs AccountshippingPatch = AccountShipping
type Scopes AccountshippingPatch =
'["https://www.googleapis.com/auth/content"]
requestClient AccountshippingPatch'{..}
= go _ap1MerchantId _ap1AccountId _ap1DryRun
(Just AltJSON)
_ap1Payload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy AccountshippingPatchResource)
mempty