{-# 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.Entitlements.Get
(
EntitlementsGetResource
, entitlementsGet
, EntitlementsGet
, egEntitlementId
, egEnterpriseId
, egUserId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type EntitlementsGetResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
"entitlements" :>
Capture "entitlementId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Entitlement
data EntitlementsGet = EntitlementsGet'
{ _egEntitlementId :: !Text
, _egEnterpriseId :: !Text
, _egUserId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
entitlementsGet
:: Text
-> Text
-> Text
-> EntitlementsGet
entitlementsGet pEgEntitlementId_ pEgEnterpriseId_ pEgUserId_ =
EntitlementsGet'
{ _egEntitlementId = pEgEntitlementId_
, _egEnterpriseId = pEgEnterpriseId_
, _egUserId = pEgUserId_
}
egEntitlementId :: Lens' EntitlementsGet Text
egEntitlementId
= lens _egEntitlementId
(\ s a -> s{_egEntitlementId = a})
egEnterpriseId :: Lens' EntitlementsGet Text
egEnterpriseId
= lens _egEnterpriseId
(\ s a -> s{_egEnterpriseId = a})
egUserId :: Lens' EntitlementsGet Text
egUserId = lens _egUserId (\ s a -> s{_egUserId = a})
instance GoogleRequest EntitlementsGet where
type Rs EntitlementsGet = Entitlement
type Scopes EntitlementsGet =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient EntitlementsGet'{..}
= go _egEnterpriseId _egUserId _egEntitlementId
(Just AltJSON)
androidEnterpriseService
where go
= buildClient
(Proxy :: Proxy EntitlementsGetResource)
mempty