{-# 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.GetState
(
DevicesGetStateResource
, devicesGetState
, DevicesGetState
, dgsEnterpriseId
, dgsUserId
, dgsDeviceId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type DevicesGetStateResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
"devices" :>
Capture "deviceId" Text :>
"state" :>
QueryParam "alt" AltJSON :> Get '[JSON] DeviceState
data DevicesGetState = DevicesGetState'
{ _dgsEnterpriseId :: !Text
, _dgsUserId :: !Text
, _dgsDeviceId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
devicesGetState
:: Text
-> Text
-> Text
-> DevicesGetState
devicesGetState pDgsEnterpriseId_ pDgsUserId_ pDgsDeviceId_ =
DevicesGetState'
{ _dgsEnterpriseId = pDgsEnterpriseId_
, _dgsUserId = pDgsUserId_
, _dgsDeviceId = pDgsDeviceId_
}
dgsEnterpriseId :: Lens' DevicesGetState Text
dgsEnterpriseId
= lens _dgsEnterpriseId
(\ s a -> s{_dgsEnterpriseId = a})
dgsUserId :: Lens' DevicesGetState Text
dgsUserId
= lens _dgsUserId (\ s a -> s{_dgsUserId = a})
dgsDeviceId :: Lens' DevicesGetState Text
dgsDeviceId
= lens _dgsDeviceId (\ s a -> s{_dgsDeviceId = a})
instance GoogleRequest DevicesGetState where
type Rs DevicesGetState = DeviceState
type Scopes DevicesGetState =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient DevicesGetState'{..}
= go _dgsEnterpriseId _dgsUserId _dgsDeviceId
(Just AltJSON)
androidEnterpriseService
where go
= buildClient
(Proxy :: Proxy DevicesGetStateResource)
mempty