{-# 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.RoleAssignments.Get
(
RoleAssignmentsGetResource
, roleAssignmentsGet
, RoleAssignmentsGet
, ragCustomer
, ragRoleAssignmentId
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type RoleAssignmentsGetResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"roleassignments" :>
Capture "roleAssignmentId" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] RoleAssignment
data RoleAssignmentsGet = RoleAssignmentsGet'
{ _ragCustomer :: !Text
, _ragRoleAssignmentId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
roleAssignmentsGet
:: Text
-> Text
-> RoleAssignmentsGet
roleAssignmentsGet pRagCustomer_ pRagRoleAssignmentId_ =
RoleAssignmentsGet'
{ _ragCustomer = pRagCustomer_
, _ragRoleAssignmentId = pRagRoleAssignmentId_
}
ragCustomer :: Lens' RoleAssignmentsGet Text
ragCustomer
= lens _ragCustomer (\ s a -> s{_ragCustomer = a})
ragRoleAssignmentId :: Lens' RoleAssignmentsGet Text
ragRoleAssignmentId
= lens _ragRoleAssignmentId
(\ s a -> s{_ragRoleAssignmentId = a})
instance GoogleRequest RoleAssignmentsGet where
type Rs RoleAssignmentsGet = RoleAssignment
type Scopes RoleAssignmentsGet =
'["https://www.googleapis.com/auth/admin.directory.rolemanagement",
"https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"]
requestClient RoleAssignmentsGet'{..}
= go _ragCustomer _ragRoleAssignmentId (Just AltJSON)
directoryService
where go
= buildClient
(Proxy :: Proxy RoleAssignmentsGetResource)
mempty