{-# 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.Action
(
ChromeosDevicesActionResource
, chromeosDevicesAction
, ChromeosDevicesAction
, cdaResourceId
, cdaPayload
, cdaCustomerId
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type ChromeosDevicesActionResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customerId" Text :>
"devices" :>
"chromeos" :>
Capture "resourceId" Text :>
"action" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ChromeOSDeviceAction :>
Post '[JSON] ()
data ChromeosDevicesAction = ChromeosDevicesAction'
{ _cdaResourceId :: !Text
, _cdaPayload :: !ChromeOSDeviceAction
, _cdaCustomerId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
chromeosDevicesAction
:: Text
-> ChromeOSDeviceAction
-> Text
-> ChromeosDevicesAction
chromeosDevicesAction pCdaResourceId_ pCdaPayload_ pCdaCustomerId_ =
ChromeosDevicesAction'
{ _cdaResourceId = pCdaResourceId_
, _cdaPayload = pCdaPayload_
, _cdaCustomerId = pCdaCustomerId_
}
cdaResourceId :: Lens' ChromeosDevicesAction Text
cdaResourceId
= lens _cdaResourceId
(\ s a -> s{_cdaResourceId = a})
cdaPayload :: Lens' ChromeosDevicesAction ChromeOSDeviceAction
cdaPayload
= lens _cdaPayload (\ s a -> s{_cdaPayload = a})
cdaCustomerId :: Lens' ChromeosDevicesAction Text
cdaCustomerId
= lens _cdaCustomerId
(\ s a -> s{_cdaCustomerId = a})
instance GoogleRequest ChromeosDevicesAction where
type Rs ChromeosDevicesAction = ()
type Scopes ChromeosDevicesAction =
'["https://www.googleapis.com/auth/admin.directory.device.chromeos"]
requestClient ChromeosDevicesAction'{..}
= go _cdaCustomerId _cdaResourceId (Just AltJSON)
_cdaPayload
directoryService
where go
= buildClient
(Proxy :: Proxy ChromeosDevicesActionResource)
mempty