module Network.Google.Resource.Manufacturers.Accounts.Products.Get
(
AccountsProductsGetResource
, accountsProductsGet
, AccountsProductsGet
, apgParent
, apgXgafv
, apgUploadProtocol
, apgPp
, apgAccessToken
, apgUploadType
, apgBearerToken
, apgName
, apgCallback
) where
import Network.Google.Manufacturers.Types
import Network.Google.Prelude
type AccountsProductsGetResource =
"v1" :>
Capture "parent" Text :>
"products" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "pp" Bool :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "bearer_token" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Product
data AccountsProductsGet = AccountsProductsGet'
{ _apgParent :: !Text
, _apgXgafv :: !(Maybe Xgafv)
, _apgUploadProtocol :: !(Maybe Text)
, _apgPp :: !Bool
, _apgAccessToken :: !(Maybe Text)
, _apgUploadType :: !(Maybe Text)
, _apgBearerToken :: !(Maybe Text)
, _apgName :: !Text
, _apgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountsProductsGet
:: Text
-> Text
-> AccountsProductsGet
accountsProductsGet pApgParent_ pApgName_ =
AccountsProductsGet'
{ _apgParent = pApgParent_
, _apgXgafv = Nothing
, _apgUploadProtocol = Nothing
, _apgPp = True
, _apgAccessToken = Nothing
, _apgUploadType = Nothing
, _apgBearerToken = Nothing
, _apgName = pApgName_
, _apgCallback = Nothing
}
apgParent :: Lens' AccountsProductsGet Text
apgParent
= lens _apgParent (\ s a -> s{_apgParent = a})
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})
apgPp :: Lens' AccountsProductsGet Bool
apgPp = lens _apgPp (\ s a -> s{_apgPp = 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})
apgBearerToken :: Lens' AccountsProductsGet (Maybe Text)
apgBearerToken
= lens _apgBearerToken
(\ s a -> s{_apgBearerToken = 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 _apgXgafv _apgUploadProtocol
(Just _apgPp)
_apgAccessToken
_apgUploadType
_apgBearerToken
_apgCallback
(Just AltJSON)
manufacturersService
where go
= buildClient
(Proxy :: Proxy AccountsProductsGetResource)
mempty