{-# 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.MobileDevices.Get
(
MobileDevicesGetResource
, mobileDevicesGet
, MobileDevicesGet
, mdgResourceId
, mdgCustomerId
, mdgProjection
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type MobileDevicesGetResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customerId" Text :>
"devices" :>
"mobile" :>
Capture "resourceId" Text :>
QueryParam "projection" MobileDevicesGetProjection :>
QueryParam "alt" AltJSON :> Get '[JSON] MobileDevice
data MobileDevicesGet = MobileDevicesGet'
{ _mdgResourceId :: !Text
, _mdgCustomerId :: !Text
, _mdgProjection :: !(Maybe MobileDevicesGetProjection)
} deriving (Eq,Show,Data,Typeable,Generic)
mobileDevicesGet
:: Text
-> Text
-> MobileDevicesGet
mobileDevicesGet pMdgResourceId_ pMdgCustomerId_ =
MobileDevicesGet'
{ _mdgResourceId = pMdgResourceId_
, _mdgCustomerId = pMdgCustomerId_
, _mdgProjection = Nothing
}
mdgResourceId :: Lens' MobileDevicesGet Text
mdgResourceId
= lens _mdgResourceId
(\ s a -> s{_mdgResourceId = a})
mdgCustomerId :: Lens' MobileDevicesGet Text
mdgCustomerId
= lens _mdgCustomerId
(\ s a -> s{_mdgCustomerId = a})
mdgProjection :: Lens' MobileDevicesGet (Maybe MobileDevicesGetProjection)
mdgProjection
= lens _mdgProjection
(\ s a -> s{_mdgProjection = a})
instance GoogleRequest MobileDevicesGet where
type Rs MobileDevicesGet = MobileDevice
type Scopes MobileDevicesGet =
'["https://www.googleapis.com/auth/admin.directory.device.mobile",
"https://www.googleapis.com/auth/admin.directory.device.mobile.action",
"https://www.googleapis.com/auth/admin.directory.device.mobile.readonly"]
requestClient MobileDevicesGet'{..}
= go _mdgCustomerId _mdgResourceId _mdgProjection
(Just AltJSON)
directoryService
where go
= buildClient
(Proxy :: Proxy MobileDevicesGetResource)
mempty