{-# 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.GetPermissions
(
ProductsGetPermissionsResource
, productsGetPermissions
, ProductsGetPermissions
, pgpEnterpriseId
, pgpProductId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type ProductsGetPermissionsResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"products" :>
Capture "productId" Text :>
"permissions" :>
QueryParam "alt" AltJSON :>
Get '[JSON] ProductPermissions
data ProductsGetPermissions = ProductsGetPermissions'
{ _pgpEnterpriseId :: !Text
, _pgpProductId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
productsGetPermissions
:: Text
-> Text
-> ProductsGetPermissions
productsGetPermissions pPgpEnterpriseId_ pPgpProductId_ =
ProductsGetPermissions'
{ _pgpEnterpriseId = pPgpEnterpriseId_
, _pgpProductId = pPgpProductId_
}
pgpEnterpriseId :: Lens' ProductsGetPermissions Text
pgpEnterpriseId
= lens _pgpEnterpriseId
(\ s a -> s{_pgpEnterpriseId = a})
pgpProductId :: Lens' ProductsGetPermissions Text
pgpProductId
= lens _pgpProductId (\ s a -> s{_pgpProductId = a})
instance GoogleRequest ProductsGetPermissions where
type Rs ProductsGetPermissions = ProductPermissions
type Scopes ProductsGetPermissions =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient ProductsGetPermissions'{..}
= go _pgpEnterpriseId _pgpProductId (Just AltJSON)
androidEnterpriseService
where go
= buildClient
(Proxy :: Proxy ProductsGetPermissionsResource)
mempty