{-# 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.ManagedConfigurationsforDevice.Patch
(
ManagedConfigurationsforDevicePatchResource
, managedConfigurationsforDevicePatch
, ManagedConfigurationsforDevicePatch
, mcdpEnterpriseId
, mcdpPayload
, mcdpUserId
, mcdpDeviceId
, mcdpManagedConfigurationForDeviceId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type ManagedConfigurationsforDevicePatchResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
"devices" :>
Capture "deviceId" Text :>
"managedConfigurationsForDevice" :>
Capture "managedConfigurationForDeviceId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ManagedConfiguration :>
Patch '[JSON] ManagedConfiguration
data ManagedConfigurationsforDevicePatch = ManagedConfigurationsforDevicePatch'
{ _mcdpEnterpriseId :: !Text
, _mcdpPayload :: !ManagedConfiguration
, _mcdpUserId :: !Text
, _mcdpDeviceId :: !Text
, _mcdpManagedConfigurationForDeviceId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managedConfigurationsforDevicePatch
:: Text
-> ManagedConfiguration
-> Text
-> Text
-> Text
-> ManagedConfigurationsforDevicePatch
managedConfigurationsforDevicePatch pMcdpEnterpriseId_ pMcdpPayload_ pMcdpUserId_ pMcdpDeviceId_ pMcdpManagedConfigurationForDeviceId_ =
ManagedConfigurationsforDevicePatch'
{ _mcdpEnterpriseId = pMcdpEnterpriseId_
, _mcdpPayload = pMcdpPayload_
, _mcdpUserId = pMcdpUserId_
, _mcdpDeviceId = pMcdpDeviceId_
, _mcdpManagedConfigurationForDeviceId = pMcdpManagedConfigurationForDeviceId_
}
mcdpEnterpriseId :: Lens' ManagedConfigurationsforDevicePatch Text
mcdpEnterpriseId
= lens _mcdpEnterpriseId
(\ s a -> s{_mcdpEnterpriseId = a})
mcdpPayload :: Lens' ManagedConfigurationsforDevicePatch ManagedConfiguration
mcdpPayload
= lens _mcdpPayload (\ s a -> s{_mcdpPayload = a})
mcdpUserId :: Lens' ManagedConfigurationsforDevicePatch Text
mcdpUserId
= lens _mcdpUserId (\ s a -> s{_mcdpUserId = a})
mcdpDeviceId :: Lens' ManagedConfigurationsforDevicePatch Text
mcdpDeviceId
= lens _mcdpDeviceId (\ s a -> s{_mcdpDeviceId = a})
mcdpManagedConfigurationForDeviceId :: Lens' ManagedConfigurationsforDevicePatch Text
mcdpManagedConfigurationForDeviceId
= lens _mcdpManagedConfigurationForDeviceId
(\ s a ->
s{_mcdpManagedConfigurationForDeviceId = a})
instance GoogleRequest
ManagedConfigurationsforDevicePatch where
type Rs ManagedConfigurationsforDevicePatch =
ManagedConfiguration
type Scopes ManagedConfigurationsforDevicePatch =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient
ManagedConfigurationsforDevicePatch'{..}
= go _mcdpEnterpriseId _mcdpUserId _mcdpDeviceId
_mcdpManagedConfigurationForDeviceId
(Just AltJSON)
_mcdpPayload
androidEnterpriseService
where go
= buildClient
(Proxy ::
Proxy ManagedConfigurationsforDevicePatchResource)
mempty