{-# 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.Manufacturers.Accounts.Products.List
(
AccountsProductsListResource
, accountsProductsList
, AccountsProductsList
, aplParent
, aplInclude
, aplXgafv
, aplUploadProtocol
, aplAccessToken
, aplUploadType
, aplPageToken
, aplPageSize
, aplCallback
) where
import Network.Google.Manufacturers.Types
import Network.Google.Prelude
type AccountsProductsListResource =
"v1" :>
Capture "parent" Text :>
"products" :>
QueryParams "include" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListProductsResponse
data AccountsProductsList = AccountsProductsList'
{ _aplParent :: !Text
, _aplInclude :: !(Maybe [Text])
, _aplXgafv :: !(Maybe Xgafv)
, _aplUploadProtocol :: !(Maybe Text)
, _aplAccessToken :: !(Maybe Text)
, _aplUploadType :: !(Maybe Text)
, _aplPageToken :: !(Maybe Text)
, _aplPageSize :: !(Maybe (Textual Int32))
, _aplCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountsProductsList
:: Text
-> AccountsProductsList
accountsProductsList pAplParent_ =
AccountsProductsList'
{ _aplParent = pAplParent_
, _aplInclude = Nothing
, _aplXgafv = Nothing
, _aplUploadProtocol = Nothing
, _aplAccessToken = Nothing
, _aplUploadType = Nothing
, _aplPageToken = Nothing
, _aplPageSize = Nothing
, _aplCallback = Nothing
}
aplParent :: Lens' AccountsProductsList Text
aplParent
= lens _aplParent (\ s a -> s{_aplParent = a})
aplInclude :: Lens' AccountsProductsList [Text]
aplInclude
= lens _aplInclude (\ s a -> s{_aplInclude = a}) .
_Default
. _Coerce
aplXgafv :: Lens' AccountsProductsList (Maybe Xgafv)
aplXgafv = lens _aplXgafv (\ s a -> s{_aplXgafv = a})
aplUploadProtocol :: Lens' AccountsProductsList (Maybe Text)
aplUploadProtocol
= lens _aplUploadProtocol
(\ s a -> s{_aplUploadProtocol = a})
aplAccessToken :: Lens' AccountsProductsList (Maybe Text)
aplAccessToken
= lens _aplAccessToken
(\ s a -> s{_aplAccessToken = a})
aplUploadType :: Lens' AccountsProductsList (Maybe Text)
aplUploadType
= lens _aplUploadType
(\ s a -> s{_aplUploadType = a})
aplPageToken :: Lens' AccountsProductsList (Maybe Text)
aplPageToken
= lens _aplPageToken (\ s a -> s{_aplPageToken = a})
aplPageSize :: Lens' AccountsProductsList (Maybe Int32)
aplPageSize
= lens _aplPageSize (\ s a -> s{_aplPageSize = a}) .
mapping _Coerce
aplCallback :: Lens' AccountsProductsList (Maybe Text)
aplCallback
= lens _aplCallback (\ s a -> s{_aplCallback = a})
instance GoogleRequest AccountsProductsList where
type Rs AccountsProductsList = ListProductsResponse
type Scopes AccountsProductsList =
'["https://www.googleapis.com/auth/manufacturercenter"]
requestClient AccountsProductsList'{..}
= go _aplParent (_aplInclude ^. _Default) _aplXgafv
_aplUploadProtocol
_aplAccessToken
_aplUploadType
_aplPageToken
_aplPageSize
_aplCallback
(Just AltJSON)
manufacturersService
where go
= buildClient
(Proxy :: Proxy AccountsProductsListResource)
mempty