{-# 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.Directory.ChromeosDevices.Update
(
ChromeosDevicesUpdateResource
, chromeosDevicesUpdate
, ChromeosDevicesUpdate
, cduPayload
, cduCustomerId
, cduDeviceId
, cduProjection
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type ChromeosDevicesUpdateResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customerId" Text :>
"devices" :>
"chromeos" :>
Capture "deviceId" Text :>
QueryParam "projection"
ChromeosDevicesUpdateProjection
:>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ChromeOSDevice :>
Put '[JSON] ChromeOSDevice
data ChromeosDevicesUpdate = ChromeosDevicesUpdate'
{ _cduPayload :: !ChromeOSDevice
, _cduCustomerId :: !Text
, _cduDeviceId :: !Text
, _cduProjection :: !(Maybe ChromeosDevicesUpdateProjection)
} deriving (Eq,Show,Data,Typeable,Generic)
chromeosDevicesUpdate
:: ChromeOSDevice
-> Text
-> Text
-> ChromeosDevicesUpdate
chromeosDevicesUpdate pCduPayload_ pCduCustomerId_ pCduDeviceId_ =
ChromeosDevicesUpdate'
{ _cduPayload = pCduPayload_
, _cduCustomerId = pCduCustomerId_
, _cduDeviceId = pCduDeviceId_
, _cduProjection = Nothing
}
cduPayload :: Lens' ChromeosDevicesUpdate ChromeOSDevice
cduPayload
= lens _cduPayload (\ s a -> s{_cduPayload = a})
cduCustomerId :: Lens' ChromeosDevicesUpdate Text
cduCustomerId
= lens _cduCustomerId
(\ s a -> s{_cduCustomerId = a})
cduDeviceId :: Lens' ChromeosDevicesUpdate Text
cduDeviceId
= lens _cduDeviceId (\ s a -> s{_cduDeviceId = a})
cduProjection :: Lens' ChromeosDevicesUpdate (Maybe ChromeosDevicesUpdateProjection)
cduProjection
= lens _cduProjection
(\ s a -> s{_cduProjection = a})
instance GoogleRequest ChromeosDevicesUpdate where
type Rs ChromeosDevicesUpdate = ChromeOSDevice
type Scopes ChromeosDevicesUpdate =
'["https://www.googleapis.com/auth/admin.directory.device.chromeos"]
requestClient ChromeosDevicesUpdate'{..}
= go _cduCustomerId _cduDeviceId _cduProjection
(Just AltJSON)
_cduPayload
directoryService
where go
= buildClient
(Proxy :: Proxy ChromeosDevicesUpdateResource)
mempty