module Network.Google.Resource.Content.Datafeeds.Patch
(
DatafeedsPatchResource
, datafeedsPatch
, DatafeedsPatch
, dpMerchantId
, dpPayload
, dpDatafeedId
, dpDryRun
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type DatafeedsPatchResource =
"content" :>
"v2" :>
Capture "merchantId" (Textual Word64) :>
"datafeeds" :>
Capture "datafeedId" (Textual Word64) :>
QueryParam "dryRun" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Datafeed :> Patch '[JSON] Datafeed
data DatafeedsPatch = DatafeedsPatch'
{ _dpMerchantId :: !(Textual Word64)
, _dpPayload :: !Datafeed
, _dpDatafeedId :: !(Textual Word64)
, _dpDryRun :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedsPatch
:: Word64
-> Datafeed
-> Word64
-> DatafeedsPatch
datafeedsPatch pDpMerchantId_ pDpPayload_ pDpDatafeedId_ =
DatafeedsPatch'
{ _dpMerchantId = _Coerce # pDpMerchantId_
, _dpPayload = pDpPayload_
, _dpDatafeedId = _Coerce # pDpDatafeedId_
, _dpDryRun = Nothing
}
dpMerchantId :: Lens' DatafeedsPatch Word64
dpMerchantId
= lens _dpMerchantId (\ s a -> s{_dpMerchantId = a})
. _Coerce
dpPayload :: Lens' DatafeedsPatch Datafeed
dpPayload
= lens _dpPayload (\ s a -> s{_dpPayload = a})
dpDatafeedId :: Lens' DatafeedsPatch Word64
dpDatafeedId
= lens _dpDatafeedId (\ s a -> s{_dpDatafeedId = a})
. _Coerce
dpDryRun :: Lens' DatafeedsPatch (Maybe Bool)
dpDryRun = lens _dpDryRun (\ s a -> s{_dpDryRun = a})
instance GoogleRequest DatafeedsPatch where
type Rs DatafeedsPatch = Datafeed
type Scopes DatafeedsPatch =
'["https://www.googleapis.com/auth/content"]
requestClient DatafeedsPatch'{..}
= go _dpMerchantId _dpDatafeedId _dpDryRun
(Just AltJSON)
_dpPayload
shoppingContentService
where go
= buildClient (Proxy :: Proxy DatafeedsPatchResource)
mempty