{-# 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.SetState
(
DevicesSetStateResource
, devicesSetState
, DevicesSetState
, dssEnterpriseId
, dssPayload
, dssUserId
, dssDeviceId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type DevicesSetStateResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
"devices" :>
Capture "deviceId" Text :>
"state" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DeviceState :>
Put '[JSON] DeviceState
data DevicesSetState = DevicesSetState'
{ _dssEnterpriseId :: !Text
, _dssPayload :: !DeviceState
, _dssUserId :: !Text
, _dssDeviceId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
devicesSetState
:: Text
-> DeviceState
-> Text
-> Text
-> DevicesSetState
devicesSetState pDssEnterpriseId_ pDssPayload_ pDssUserId_ pDssDeviceId_ =
DevicesSetState'
{ _dssEnterpriseId = pDssEnterpriseId_
, _dssPayload = pDssPayload_
, _dssUserId = pDssUserId_
, _dssDeviceId = pDssDeviceId_
}
dssEnterpriseId :: Lens' DevicesSetState Text
dssEnterpriseId
= lens _dssEnterpriseId
(\ s a -> s{_dssEnterpriseId = a})
dssPayload :: Lens' DevicesSetState DeviceState
dssPayload
= lens _dssPayload (\ s a -> s{_dssPayload = a})
dssUserId :: Lens' DevicesSetState Text
dssUserId
= lens _dssUserId (\ s a -> s{_dssUserId = a})
dssDeviceId :: Lens' DevicesSetState Text
dssDeviceId
= lens _dssDeviceId (\ s a -> s{_dssDeviceId = a})
instance GoogleRequest DevicesSetState where
type Rs DevicesSetState = DeviceState
type Scopes DevicesSetState =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient DevicesSetState'{..}
= go _dssEnterpriseId _dssUserId _dssDeviceId
(Just AltJSON)
_dssPayload
androidEnterpriseService
where go
= buildClient
(Proxy :: Proxy DevicesSetStateResource)
mempty