{-# 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.Datafeeds.Fetchnow
(
DatafeedsFetchnowResource
, datafeedsFetchnow
, DatafeedsFetchnow
, dfMerchantId
, dfDatafeedId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type DatafeedsFetchnowResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"datafeeds" :>
Capture "datafeedId" (Textual Word64) :>
"fetchNow" :>
QueryParam "alt" AltJSON :>
Post '[JSON] DatafeedsFetchNowResponse
data DatafeedsFetchnow = DatafeedsFetchnow'
{ _dfMerchantId :: !(Textual Word64)
, _dfDatafeedId :: !(Textual Word64)
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedsFetchnow
:: Word64
-> Word64
-> DatafeedsFetchnow
datafeedsFetchnow pDfMerchantId_ pDfDatafeedId_ =
DatafeedsFetchnow'
{ _dfMerchantId = _Coerce # pDfMerchantId_
, _dfDatafeedId = _Coerce # pDfDatafeedId_
}
dfMerchantId :: Lens' DatafeedsFetchnow Word64
dfMerchantId
= lens _dfMerchantId (\ s a -> s{_dfMerchantId = a})
. _Coerce
dfDatafeedId :: Lens' DatafeedsFetchnow Word64
dfDatafeedId
= lens _dfDatafeedId (\ s a -> s{_dfDatafeedId = a})
. _Coerce
instance GoogleRequest DatafeedsFetchnow where
type Rs DatafeedsFetchnow = DatafeedsFetchNowResponse
type Scopes DatafeedsFetchnow =
'["https://www.googleapis.com/auth/content"]
requestClient DatafeedsFetchnow'{..}
= go _dfMerchantId _dfDatafeedId (Just AltJSON)
shoppingContentService
where go
= buildClient
(Proxy :: Proxy DatafeedsFetchnowResource)
mempty