{-# 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.Get
(
DevicesGetResource
, devicesGet
, DevicesGet
, dgEnterpriseId
, dgUserId
, dgDeviceId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type DevicesGetResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
"devices" :>
Capture "deviceId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Device
data DevicesGet = DevicesGet'
{ _dgEnterpriseId :: !Text
, _dgUserId :: !Text
, _dgDeviceId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
devicesGet
:: Text
-> Text
-> Text
-> DevicesGet
devicesGet pDgEnterpriseId_ pDgUserId_ pDgDeviceId_ =
DevicesGet'
{ _dgEnterpriseId = pDgEnterpriseId_
, _dgUserId = pDgUserId_
, _dgDeviceId = pDgDeviceId_
}
dgEnterpriseId :: Lens' DevicesGet Text
dgEnterpriseId
= lens _dgEnterpriseId
(\ s a -> s{_dgEnterpriseId = a})
dgUserId :: Lens' DevicesGet Text
dgUserId = lens _dgUserId (\ s a -> s{_dgUserId = a})
dgDeviceId :: Lens' DevicesGet Text
dgDeviceId
= lens _dgDeviceId (\ s a -> s{_dgDeviceId = a})
instance GoogleRequest DevicesGet where
type Rs DevicesGet = Device
type Scopes DevicesGet =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient DevicesGet'{..}
= go _dgEnterpriseId _dgUserId _dgDeviceId
(Just AltJSON)
androidEnterpriseService
where go
= buildClient (Proxy :: Proxy DevicesGetResource)
mempty