{-# 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.CloudUserAccounts.Users.Get
(
UsersGetResource
, usersGet
, UsersGet
, ugProject
, ugUser
) where
import Network.Google.Prelude
import Network.Google.UserAccounts.Types
type UsersGetResource =
"clouduseraccounts" :>
"beta" :>
"projects" :>
Capture "project" Text :>
"global" :>
"users" :>
Capture "user" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] User
-- | Returns the specified User resource.
--
-- /See:/ 'usersGet' smart constructor.
data UsersGet = UsersGet'
{ _ugProject :: !Text
, _ugUser :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'UsersGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ugProject'
--
-- * 'ugUser'
usersGet
:: Text -- ^ 'ugProject'
-> Text -- ^ 'ugUser'
-> UsersGet
usersGet pUgProject_ pUgUser_ =
UsersGet'
{ _ugProject = pUgProject_
, _ugUser = pUgUser_
}
-- | Project ID for this request.
ugProject :: Lens' UsersGet Text
ugProject
= lens _ugProject (\ s a -> s{_ugProject = a})
-- | Name of the user resource to return.
ugUser :: Lens' UsersGet Text
ugUser = lens _ugUser (\ s a -> s{_ugUser = a})
instance GoogleRequest UsersGet where
type Rs UsersGet = User
type Scopes UsersGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/cloud.useraccounts",
"https://www.googleapis.com/auth/cloud.useraccounts.readonly"]
requestClient UsersGet'{..}
= go _ugProject _ugUser (Just AltJSON)
userAccountsService
where go
= buildClient (Proxy :: Proxy UsersGetResource)
mempty