{-# 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.Permissions.Get
(
PermissionsGetResource
, permissionsGet
, PermissionsGet
, pgLanguage
, pgPermissionId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type PermissionsGetResource =
"androidenterprise" :>
"v1" :>
"permissions" :>
Capture "permissionId" Text :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Permission
data PermissionsGet = PermissionsGet'
{ _pgLanguage :: !(Maybe Text)
, _pgPermissionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
permissionsGet
:: Text
-> PermissionsGet
permissionsGet pPgPermissionId_ =
PermissionsGet'
{ _pgLanguage = Nothing
, _pgPermissionId = pPgPermissionId_
}
pgLanguage :: Lens' PermissionsGet (Maybe Text)
pgLanguage
= lens _pgLanguage (\ s a -> s{_pgLanguage = a})
pgPermissionId :: Lens' PermissionsGet Text
pgPermissionId
= lens _pgPermissionId
(\ s a -> s{_pgPermissionId = a})
instance GoogleRequest PermissionsGet where
type Rs PermissionsGet = Permission
type Scopes PermissionsGet =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient PermissionsGet'{..}
= go _pgPermissionId _pgLanguage (Just AltJSON)
androidEnterpriseService
where go
= buildClient (Proxy :: Proxy PermissionsGetResource)
mempty