{-# 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.Products.List
(
ProductsListResource
, productsList
, ProductsList
, pllMerchantId
, pllPageToken
, pllMaxResults
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type ProductsListResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"products" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] ProductsListResponse
data ProductsList =
ProductsList'
{ _pllMerchantId :: !(Textual Word64)
, _pllPageToken :: !(Maybe Text)
, _pllMaxResults :: !(Maybe (Textual Word32))
}
deriving (Eq, Show, Data, Typeable, Generic)
productsList
:: Word64
-> ProductsList
productsList pPllMerchantId_ =
ProductsList'
{ _pllMerchantId = _Coerce # pPllMerchantId_
, _pllPageToken = Nothing
, _pllMaxResults = Nothing
}
pllMerchantId :: Lens' ProductsList Word64
pllMerchantId
= lens _pllMerchantId
(\ s a -> s{_pllMerchantId = a})
. _Coerce
pllPageToken :: Lens' ProductsList (Maybe Text)
pllPageToken
= lens _pllPageToken (\ s a -> s{_pllPageToken = a})
pllMaxResults :: Lens' ProductsList (Maybe Word32)
pllMaxResults
= lens _pllMaxResults
(\ s a -> s{_pllMaxResults = a})
. mapping _Coerce
instance GoogleRequest ProductsList where
type Rs ProductsList = ProductsListResponse
type Scopes ProductsList =
'["https://www.googleapis.com/auth/content"]
requestClient ProductsList'{..}
= go _pllMerchantId _pllPageToken _pllMaxResults
(Just AltJSON)
shoppingContentService
where go
= buildClient (Proxy :: Proxy ProductsListResource)
mempty