{-# 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.Get
(
DatafeedsGetResource
, datafeedsGet
, DatafeedsGet
, dgMerchantId
, dgDatafeedId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type DatafeedsGetResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"datafeeds" :>
Capture "datafeedId" (Textual Word64) :>
QueryParam "alt" AltJSON :> Get '[JSON] Datafeed
data DatafeedsGet = DatafeedsGet'
{ _dgMerchantId :: !(Textual Word64)
, _dgDatafeedId :: !(Textual Word64)
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedsGet
:: Word64
-> Word64
-> DatafeedsGet
datafeedsGet pDgMerchantId_ pDgDatafeedId_ =
DatafeedsGet'
{ _dgMerchantId = _Coerce # pDgMerchantId_
, _dgDatafeedId = _Coerce # pDgDatafeedId_
}
dgMerchantId :: Lens' DatafeedsGet Word64
dgMerchantId
= lens _dgMerchantId (\ s a -> s{_dgMerchantId = a})
. _Coerce
dgDatafeedId :: Lens' DatafeedsGet Word64
dgDatafeedId
= lens _dgDatafeedId (\ s a -> s{_dgDatafeedId = a})
. _Coerce
instance GoogleRequest DatafeedsGet where
type Rs DatafeedsGet = Datafeed
type Scopes DatafeedsGet =
'["https://www.googleapis.com/auth/content"]
requestClient DatafeedsGet'{..}
= go _dgMerchantId _dgDatafeedId (Just AltJSON)
shoppingContentService
where go
= buildClient (Proxy :: Proxy DatafeedsGetResource)
mempty