{-# 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.Patch
(
EntitlementsPatchResource
, entitlementsPatch
, EntitlementsPatch
, epEntitlementId
, epEnterpriseId
, epPayload
, epInstall
, epUserId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type EntitlementsPatchResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
"entitlements" :>
Capture "entitlementId" Text :>
QueryParam "install" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Entitlement :>
Patch '[JSON] Entitlement
data EntitlementsPatch = EntitlementsPatch'
{ _epEntitlementId :: !Text
, _epEnterpriseId :: !Text
, _epPayload :: !Entitlement
, _epInstall :: !(Maybe Bool)
, _epUserId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
entitlementsPatch
:: Text
-> Text
-> Entitlement
-> Text
-> EntitlementsPatch
entitlementsPatch pEpEntitlementId_ pEpEnterpriseId_ pEpPayload_ pEpUserId_ =
EntitlementsPatch'
{ _epEntitlementId = pEpEntitlementId_
, _epEnterpriseId = pEpEnterpriseId_
, _epPayload = pEpPayload_
, _epInstall = Nothing
, _epUserId = pEpUserId_
}
epEntitlementId :: Lens' EntitlementsPatch Text
epEntitlementId
= lens _epEntitlementId
(\ s a -> s{_epEntitlementId = a})
epEnterpriseId :: Lens' EntitlementsPatch Text
epEnterpriseId
= lens _epEnterpriseId
(\ s a -> s{_epEnterpriseId = a})
epPayload :: Lens' EntitlementsPatch Entitlement
epPayload
= lens _epPayload (\ s a -> s{_epPayload = a})
epInstall :: Lens' EntitlementsPatch (Maybe Bool)
epInstall
= lens _epInstall (\ s a -> s{_epInstall = a})
epUserId :: Lens' EntitlementsPatch Text
epUserId = lens _epUserId (\ s a -> s{_epUserId = a})
instance GoogleRequest EntitlementsPatch where
type Rs EntitlementsPatch = Entitlement
type Scopes EntitlementsPatch =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient EntitlementsPatch'{..}
= go _epEnterpriseId _epUserId _epEntitlementId
_epInstall
(Just AltJSON)
_epPayload
androidEnterpriseService
where go
= buildClient
(Proxy :: Proxy EntitlementsPatchResource)
mempty