{-# 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.Get
(
AccountsProductsGetResource
, accountsProductsGet
, AccountsProductsGet
, apgParent
, apgInclude
, apgXgafv
, apgUploadProtocol
, apgAccessToken
, apgUploadType
, apgName
, apgCallback
) where
import Network.Google.Manufacturers.Types
import Network.Google.Prelude
type AccountsProductsGetResource =
"v1" :>
Capture "parent" Text :>
"products" :>
Capture "name" Text :>
QueryParams "include" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Product
data AccountsProductsGet = AccountsProductsGet'
{ _apgParent :: !Text
, _apgInclude :: !(Maybe [Text])
, _apgXgafv :: !(Maybe Xgafv)
, _apgUploadProtocol :: !(Maybe Text)
, _apgAccessToken :: !(Maybe Text)
, _apgUploadType :: !(Maybe Text)
, _apgName :: !Text
, _apgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountsProductsGet
:: Text
-> Text
-> AccountsProductsGet
accountsProductsGet pApgParent_ pApgName_ =
AccountsProductsGet'
{ _apgParent = pApgParent_
, _apgInclude = Nothing
, _apgXgafv = Nothing
, _apgUploadProtocol = Nothing
, _apgAccessToken = Nothing
, _apgUploadType = Nothing
, _apgName = pApgName_
, _apgCallback = Nothing
}
apgParent :: Lens' AccountsProductsGet Text
apgParent
= lens _apgParent (\ s a -> s{_apgParent = a})
apgInclude :: Lens' AccountsProductsGet [Text]
apgInclude
= lens _apgInclude (\ s a -> s{_apgInclude = a}) .
_Default
. _Coerce
apgXgafv :: Lens' AccountsProductsGet (Maybe Xgafv)
apgXgafv = lens _apgXgafv (\ s a -> s{_apgXgafv = a})
apgUploadProtocol :: Lens' AccountsProductsGet (Maybe Text)
apgUploadProtocol
= lens _apgUploadProtocol
(\ s a -> s{_apgUploadProtocol = a})
apgAccessToken :: Lens' AccountsProductsGet (Maybe Text)
apgAccessToken
= lens _apgAccessToken
(\ s a -> s{_apgAccessToken = a})
apgUploadType :: Lens' AccountsProductsGet (Maybe Text)
apgUploadType
= lens _apgUploadType
(\ s a -> s{_apgUploadType = a})
apgName :: Lens' AccountsProductsGet Text
apgName = lens _apgName (\ s a -> s{_apgName = a})
apgCallback :: Lens' AccountsProductsGet (Maybe Text)
apgCallback
= lens _apgCallback (\ s a -> s{_apgCallback = a})
instance GoogleRequest AccountsProductsGet where
type Rs AccountsProductsGet = Product
type Scopes AccountsProductsGet =
'["https://www.googleapis.com/auth/manufacturercenter"]
requestClient AccountsProductsGet'{..}
= go _apgParent _apgName (_apgInclude ^. _Default)
_apgXgafv
_apgUploadProtocol
_apgAccessToken
_apgUploadType
_apgCallback
(Just AltJSON)
manufacturersService
where go
= buildClient
(Proxy :: Proxy AccountsProductsGetResource)
mempty