{-# 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.AndroidEnterprise.Products.Get
(
ProductsGetResource
, productsGet
, ProductsGet
, proEnterpriseId
, proLanguage
, proProductId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type ProductsGetResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"products" :>
Capture "productId" Text :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Product
data ProductsGet = ProductsGet'
{ _proEnterpriseId :: !Text
, _proLanguage :: !(Maybe Text)
, _proProductId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
productsGet
:: Text
-> Text
-> ProductsGet
productsGet pProEnterpriseId_ pProProductId_ =
ProductsGet'
{ _proEnterpriseId = pProEnterpriseId_
, _proLanguage = Nothing
, _proProductId = pProProductId_
}
proEnterpriseId :: Lens' ProductsGet Text
proEnterpriseId
= lens _proEnterpriseId
(\ s a -> s{_proEnterpriseId = a})
proLanguage :: Lens' ProductsGet (Maybe Text)
proLanguage
= lens _proLanguage (\ s a -> s{_proLanguage = a})
proProductId :: Lens' ProductsGet Text
proProductId
= lens _proProductId (\ s a -> s{_proProductId = a})
instance GoogleRequest ProductsGet where
type Rs ProductsGet = Product
type Scopes ProductsGet =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient ProductsGet'{..}
= go _proEnterpriseId _proProductId _proLanguage
(Just AltJSON)
androidEnterpriseService
where go
= buildClient (Proxy :: Proxy ProductsGetResource)
mempty