{-# 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.Users.List
(
UsersListResource
, usersList
, UsersList
, ulEmail
, ulEnterpriseId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type UsersListResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
QueryParam "email" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] UsersListResponse
data UsersList = UsersList'
{ _ulEmail :: !Text
, _ulEnterpriseId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersList
:: Text
-> Text
-> UsersList
usersList pUlEmail_ pUlEnterpriseId_ =
UsersList'
{ _ulEmail = pUlEmail_
, _ulEnterpriseId = pUlEnterpriseId_
}
ulEmail :: Lens' UsersList Text
ulEmail = lens _ulEmail (\ s a -> s{_ulEmail = a})
ulEnterpriseId :: Lens' UsersList Text
ulEnterpriseId
= lens _ulEnterpriseId
(\ s a -> s{_ulEnterpriseId = a})
instance GoogleRequest UsersList where
type Rs UsersList = UsersListResponse
type Scopes UsersList =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient UsersList'{..}
= go _ulEnterpriseId (Just _ulEmail) (Just AltJSON)
androidEnterpriseService
where go
= buildClient (Proxy :: Proxy UsersListResource)
mempty