{-# 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.List
(
DatafeedsListResource
, datafeedsList
, DatafeedsList
, datMerchantId
, datPageToken
, datMaxResults
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type DatafeedsListResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"datafeeds" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] DatafeedsListResponse
data DatafeedsList = DatafeedsList'
{ _datMerchantId :: !(Textual Word64)
, _datPageToken :: !(Maybe Text)
, _datMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedsList
:: Word64
-> DatafeedsList
datafeedsList pDatMerchantId_ =
DatafeedsList'
{ _datMerchantId = _Coerce # pDatMerchantId_
, _datPageToken = Nothing
, _datMaxResults = Nothing
}
datMerchantId :: Lens' DatafeedsList Word64
datMerchantId
= lens _datMerchantId
(\ s a -> s{_datMerchantId = a})
. _Coerce
datPageToken :: Lens' DatafeedsList (Maybe Text)
datPageToken
= lens _datPageToken (\ s a -> s{_datPageToken = a})
datMaxResults :: Lens' DatafeedsList (Maybe Word32)
datMaxResults
= lens _datMaxResults
(\ s a -> s{_datMaxResults = a})
. mapping _Coerce
instance GoogleRequest DatafeedsList where
type Rs DatafeedsList = DatafeedsListResponse
type Scopes DatafeedsList =
'["https://www.googleapis.com/auth/content"]
requestClient DatafeedsList'{..}
= go _datMerchantId _datPageToken _datMaxResults
(Just AltJSON)
shoppingContentService
where go
= buildClient (Proxy :: Proxy DatafeedsListResource)
mempty