{-# 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.List
(
DevicesListResource
, devicesList
, DevicesList
, dlEnterpriseId
, dlUserId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type DevicesListResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
"devices" :>
QueryParam "alt" AltJSON :>
Get '[JSON] DevicesListResponse
data DevicesList = DevicesList'
{ _dlEnterpriseId :: !Text
, _dlUserId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
devicesList
:: Text
-> Text
-> DevicesList
devicesList pDlEnterpriseId_ pDlUserId_ =
DevicesList'
{ _dlEnterpriseId = pDlEnterpriseId_
, _dlUserId = pDlUserId_
}
dlEnterpriseId :: Lens' DevicesList Text
dlEnterpriseId
= lens _dlEnterpriseId
(\ s a -> s{_dlEnterpriseId = a})
dlUserId :: Lens' DevicesList Text
dlUserId = lens _dlUserId (\ s a -> s{_dlUserId = a})
instance GoogleRequest DevicesList where
type Rs DevicesList = DevicesListResponse
type Scopes DevicesList =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient DevicesList'{..}
= go _dlEnterpriseId _dlUserId (Just AltJSON)
androidEnterpriseService
where go
= buildClient (Proxy :: Proxy DevicesListResource)
mempty