{-# 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.Roles.Get
(
RolesGetResource
, rolesGet
, RolesGet
, rgRoleId
, rgCustomer
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type RolesGetResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"roles" :>
Capture "roleId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Role
data RolesGet = RolesGet'
{ _rgRoleId :: !Text
, _rgCustomer :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
rolesGet
:: Text
-> Text
-> RolesGet
rolesGet pRgRoleId_ pRgCustomer_ =
RolesGet'
{ _rgRoleId = pRgRoleId_
, _rgCustomer = pRgCustomer_
}
rgRoleId :: Lens' RolesGet Text
rgRoleId = lens _rgRoleId (\ s a -> s{_rgRoleId = a})
rgCustomer :: Lens' RolesGet Text
rgCustomer
= lens _rgCustomer (\ s a -> s{_rgCustomer = a})
instance GoogleRequest RolesGet where
type Rs RolesGet = Role
type Scopes RolesGet =
'["https://www.googleapis.com/auth/admin.directory.rolemanagement",
"https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"]
requestClient RolesGet'{..}
= go _rgCustomer _rgRoleId (Just AltJSON)
directoryService
where go
= buildClient (Proxy :: Proxy RolesGetResource)
mempty