{-# 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.Groups.Get
(
GroupsGetResource
, groupsGet
, GroupsGet
, ggGroupKey
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type GroupsGetResource =
"admin" :>
"directory" :>
"v1" :>
"groups" :>
Capture "groupKey" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Group
newtype GroupsGet = GroupsGet'
{ _ggGroupKey :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
groupsGet
:: Text
-> GroupsGet
groupsGet pGgGroupKey_ =
GroupsGet'
{ _ggGroupKey = pGgGroupKey_
}
ggGroupKey :: Lens' GroupsGet Text
ggGroupKey
= lens _ggGroupKey (\ s a -> s{_ggGroupKey = a})
instance GoogleRequest GroupsGet where
type Rs GroupsGet = Group
type Scopes GroupsGet =
'["https://www.googleapis.com/auth/admin.directory.group",
"https://www.googleapis.com/auth/admin.directory.group.readonly"]
requestClient GroupsGet'{..}
= go _ggGroupKey (Just AltJSON) directoryService
where go
= buildClient (Proxy :: Proxy GroupsGetResource)
mempty