{-# 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.Groups.Get
(
GroupsGetResource
, groupsGet
, GroupsGet
, ggProject
, ggGroupName
) where
import Network.Google.Prelude
import Network.Google.UserAccounts.Types
type GroupsGetResource =
"clouduseraccounts" :>
"beta" :>
"projects" :>
Capture "project" Text :>
"global" :>
"groups" :>
Capture "groupName" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Group
-- | Returns the specified Group resource.
--
-- /See:/ 'groupsGet' smart constructor.
data GroupsGet = GroupsGet'
{ _ggProject :: !Text
, _ggGroupName :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'GroupsGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ggProject'
--
-- * 'ggGroupName'
groupsGet
:: Text -- ^ 'ggProject'
-> Text -- ^ 'ggGroupName'
-> GroupsGet
groupsGet pGgProject_ pGgGroupName_ =
GroupsGet'
{ _ggProject = pGgProject_
, _ggGroupName = pGgGroupName_
}
-- | Project ID for this request.
ggProject :: Lens' GroupsGet Text
ggProject
= lens _ggProject (\ s a -> s{_ggProject = a})
-- | Name of the Group resource to return.
ggGroupName :: Lens' GroupsGet Text
ggGroupName
= lens _ggGroupName (\ s a -> s{_ggGroupName = a})
instance GoogleRequest GroupsGet where
type Rs GroupsGet = Group
type Scopes GroupsGet =
'["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 GroupsGet'{..}
= go _ggProject _ggGroupName (Just AltJSON)
userAccountsService
where go
= buildClient (Proxy :: Proxy GroupsGetResource)
mempty