{-# 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
-- | Retrieve Mobile Device
--
-- /See:/ 'mobileDevicesGet' smart constructor.
data MobileDevicesGet = MobileDevicesGet'
{ _mdgResourceId :: !Text
, _mdgCustomerId :: !Text
, _mdgProjection :: !(Maybe MobileDevicesGetProjection)
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'MobileDevicesGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mdgResourceId'
--
-- * 'mdgCustomerId'
--
-- * 'mdgProjection'
mobileDevicesGet
:: Text -- ^ 'mdgResourceId'
-> Text -- ^ 'mdgCustomerId'
-> MobileDevicesGet
mobileDevicesGet pMdgResourceId_ pMdgCustomerId_ =
MobileDevicesGet'
{ _mdgResourceId = pMdgResourceId_
, _mdgCustomerId = pMdgCustomerId_
, _mdgProjection = Nothing
}
-- | Immutable id of Mobile Device
mdgResourceId :: Lens' MobileDevicesGet Text
mdgResourceId
= lens _mdgResourceId
(\ s a -> s{_mdgResourceId = a})
-- | Immutable id of the Google Apps account
mdgCustomerId :: Lens' MobileDevicesGet Text
mdgCustomerId
= lens _mdgCustomerId
(\ s a -> s{_mdgCustomerId = a})
-- | Restrict information returned to a set of selected fields.
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