{-# 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.Devices.Update
(
DevicesUpdateResource
, devicesUpdate
, DevicesUpdate
, duUpdateMask
, duEnterpriseId
, duPayload
, duUserId
, duDeviceId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type DevicesUpdateResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
"devices" :>
Capture "deviceId" Text :>
QueryParam "updateMask" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Device :> Put '[JSON] Device
data DevicesUpdate = DevicesUpdate'
{ _duUpdateMask :: !(Maybe Text)
, _duEnterpriseId :: !Text
, _duPayload :: !Device
, _duUserId :: !Text
, _duDeviceId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
devicesUpdate
:: Text
-> Device
-> Text
-> Text
-> DevicesUpdate
devicesUpdate pDuEnterpriseId_ pDuPayload_ pDuUserId_ pDuDeviceId_ =
DevicesUpdate'
{ _duUpdateMask = Nothing
, _duEnterpriseId = pDuEnterpriseId_
, _duPayload = pDuPayload_
, _duUserId = pDuUserId_
, _duDeviceId = pDuDeviceId_
}
duUpdateMask :: Lens' DevicesUpdate (Maybe Text)
duUpdateMask
= lens _duUpdateMask (\ s a -> s{_duUpdateMask = a})
duEnterpriseId :: Lens' DevicesUpdate Text
duEnterpriseId
= lens _duEnterpriseId
(\ s a -> s{_duEnterpriseId = a})
duPayload :: Lens' DevicesUpdate Device
duPayload
= lens _duPayload (\ s a -> s{_duPayload = a})
duUserId :: Lens' DevicesUpdate Text
duUserId = lens _duUserId (\ s a -> s{_duUserId = a})
duDeviceId :: Lens' DevicesUpdate Text
duDeviceId
= lens _duDeviceId (\ s a -> s{_duDeviceId = a})
instance GoogleRequest DevicesUpdate where
type Rs DevicesUpdate = Device
type Scopes DevicesUpdate =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient DevicesUpdate'{..}
= go _duEnterpriseId _duUserId _duDeviceId
_duUpdateMask
(Just AltJSON)
_duPayload
androidEnterpriseService
where go
= buildClient (Proxy :: Proxy DevicesUpdateResource)
mempty