{-# 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.Users.Aliases.List
(
UsersAliasesListResource
, usersAliasesList
, UsersAliasesList
, ualEvent
, ualUserKey
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type UsersAliasesListResource =
"admin" :>
"directory" :>
"v1" :>
"users" :>
Capture "userKey" Text :>
"aliases" :>
QueryParam "event" UsersAliasesListEvent :>
QueryParam "alt" AltJSON :> Get '[JSON] Aliases
data UsersAliasesList = UsersAliasesList'
{ _ualEvent :: !(Maybe UsersAliasesListEvent)
, _ualUserKey :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersAliasesList
:: Text
-> UsersAliasesList
usersAliasesList pUalUserKey_ =
UsersAliasesList'
{ _ualEvent = Nothing
, _ualUserKey = pUalUserKey_
}
ualEvent :: Lens' UsersAliasesList (Maybe UsersAliasesListEvent)
ualEvent = lens _ualEvent (\ s a -> s{_ualEvent = a})
ualUserKey :: Lens' UsersAliasesList Text
ualUserKey
= lens _ualUserKey (\ s a -> s{_ualUserKey = a})
instance GoogleRequest UsersAliasesList where
type Rs UsersAliasesList = Aliases
type Scopes UsersAliasesList =
'["https://www.googleapis.com/auth/admin.directory.user",
"https://www.googleapis.com/auth/admin.directory.user.alias",
"https://www.googleapis.com/auth/admin.directory.user.alias.readonly",
"https://www.googleapis.com/auth/admin.directory.user.readonly"]
requestClient UsersAliasesList'{..}
= go _ualUserKey _ualEvent (Just AltJSON)
directoryService
where go
= buildClient
(Proxy :: Proxy UsersAliasesListResource)
mempty