{-# 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.Patch
(
ChromeosDevicesPatchResource
, chromeosDevicesPatch
, ChromeosDevicesPatch
, cdpPayload
, cdpCustomerId
, cdpDeviceId
, cdpProjection
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type ChromeosDevicesPatchResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customerId" Text :>
"devices" :>
"chromeos" :>
Capture "deviceId" Text :>
QueryParam "projection"
ChromeosDevicesPatchProjection
:>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ChromeOSDevice :>
Patch '[JSON] ChromeOSDevice
data ChromeosDevicesPatch = ChromeosDevicesPatch'
{ _cdpPayload :: !ChromeOSDevice
, _cdpCustomerId :: !Text
, _cdpDeviceId :: !Text
, _cdpProjection :: !(Maybe ChromeosDevicesPatchProjection)
} deriving (Eq,Show,Data,Typeable,Generic)
chromeosDevicesPatch
:: ChromeOSDevice
-> Text
-> Text
-> ChromeosDevicesPatch
chromeosDevicesPatch pCdpPayload_ pCdpCustomerId_ pCdpDeviceId_ =
ChromeosDevicesPatch'
{ _cdpPayload = pCdpPayload_
, _cdpCustomerId = pCdpCustomerId_
, _cdpDeviceId = pCdpDeviceId_
, _cdpProjection = Nothing
}
cdpPayload :: Lens' ChromeosDevicesPatch ChromeOSDevice
cdpPayload
= lens _cdpPayload (\ s a -> s{_cdpPayload = a})
cdpCustomerId :: Lens' ChromeosDevicesPatch Text
cdpCustomerId
= lens _cdpCustomerId
(\ s a -> s{_cdpCustomerId = a})
cdpDeviceId :: Lens' ChromeosDevicesPatch Text
cdpDeviceId
= lens _cdpDeviceId (\ s a -> s{_cdpDeviceId = a})
cdpProjection :: Lens' ChromeosDevicesPatch (Maybe ChromeosDevicesPatchProjection)
cdpProjection
= lens _cdpProjection
(\ s a -> s{_cdpProjection = a})
instance GoogleRequest ChromeosDevicesPatch where
type Rs ChromeosDevicesPatch = ChromeOSDevice
type Scopes ChromeosDevicesPatch =
'["https://www.googleapis.com/auth/admin.directory.device.chromeos"]
requestClient ChromeosDevicesPatch'{..}
= go _cdpCustomerId _cdpDeviceId _cdpProjection
(Just AltJSON)
_cdpPayload
directoryService
where go
= buildClient
(Proxy :: Proxy ChromeosDevicesPatchResource)
mempty