{-# 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.BinaryAuthorization.Projects.Policy.GetIAMPolicy
(
ProjectsPolicyGetIAMPolicyResource
, projectsPolicyGetIAMPolicy
, ProjectsPolicyGetIAMPolicy
, ppgipXgafv
, ppgipUploadProtocol
, ppgipAccessToken
, ppgipUploadType
, ppgipResource
, ppgipCallback
) where
import Network.Google.BinaryAuthorization.Types
import Network.Google.Prelude
type ProjectsPolicyGetIAMPolicyResource =
"v1beta1" :>
CaptureMode "resource" "getIamPolicy" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] IAMPolicy
data ProjectsPolicyGetIAMPolicy = ProjectsPolicyGetIAMPolicy'
{ _ppgipXgafv :: !(Maybe Xgafv)
, _ppgipUploadProtocol :: !(Maybe Text)
, _ppgipAccessToken :: !(Maybe Text)
, _ppgipUploadType :: !(Maybe Text)
, _ppgipResource :: !Text
, _ppgipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsPolicyGetIAMPolicy
:: Text
-> ProjectsPolicyGetIAMPolicy
projectsPolicyGetIAMPolicy pPpgipResource_ =
ProjectsPolicyGetIAMPolicy'
{ _ppgipXgafv = Nothing
, _ppgipUploadProtocol = Nothing
, _ppgipAccessToken = Nothing
, _ppgipUploadType = Nothing
, _ppgipResource = pPpgipResource_
, _ppgipCallback = Nothing
}
ppgipXgafv :: Lens' ProjectsPolicyGetIAMPolicy (Maybe Xgafv)
ppgipXgafv
= lens _ppgipXgafv (\ s a -> s{_ppgipXgafv = a})
ppgipUploadProtocol :: Lens' ProjectsPolicyGetIAMPolicy (Maybe Text)
ppgipUploadProtocol
= lens _ppgipUploadProtocol
(\ s a -> s{_ppgipUploadProtocol = a})
ppgipAccessToken :: Lens' ProjectsPolicyGetIAMPolicy (Maybe Text)
ppgipAccessToken
= lens _ppgipAccessToken
(\ s a -> s{_ppgipAccessToken = a})
ppgipUploadType :: Lens' ProjectsPolicyGetIAMPolicy (Maybe Text)
ppgipUploadType
= lens _ppgipUploadType
(\ s a -> s{_ppgipUploadType = a})
ppgipResource :: Lens' ProjectsPolicyGetIAMPolicy Text
ppgipResource
= lens _ppgipResource
(\ s a -> s{_ppgipResource = a})
ppgipCallback :: Lens' ProjectsPolicyGetIAMPolicy (Maybe Text)
ppgipCallback
= lens _ppgipCallback
(\ s a -> s{_ppgipCallback = a})
instance GoogleRequest ProjectsPolicyGetIAMPolicy
where
type Rs ProjectsPolicyGetIAMPolicy = IAMPolicy
type Scopes ProjectsPolicyGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsPolicyGetIAMPolicy'{..}
= go _ppgipResource _ppgipXgafv _ppgipUploadProtocol
_ppgipAccessToken
_ppgipUploadType
_ppgipCallback
(Just AltJSON)
binaryAuthorizationService
where go
= buildClient
(Proxy :: Proxy ProjectsPolicyGetIAMPolicyResource)
mempty