{-# 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.PubSub.Projects.Subscriptions.GetIAMPolicy
(
ProjectsSubscriptionsGetIAMPolicyResource
, projectsSubscriptionsGetIAMPolicy
, ProjectsSubscriptionsGetIAMPolicy
, psgiampXgafv
, psgiampUploadProtocol
, psgiampAccessToken
, psgiampUploadType
, psgiampResource
, psgiampCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsSubscriptionsGetIAMPolicyResource =
"v1" :>
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] Policy
data ProjectsSubscriptionsGetIAMPolicy = ProjectsSubscriptionsGetIAMPolicy'
{ _psgiampXgafv :: !(Maybe Xgafv)
, _psgiampUploadProtocol :: !(Maybe Text)
, _psgiampAccessToken :: !(Maybe Text)
, _psgiampUploadType :: !(Maybe Text)
, _psgiampResource :: !Text
, _psgiampCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSubscriptionsGetIAMPolicy
:: Text
-> ProjectsSubscriptionsGetIAMPolicy
projectsSubscriptionsGetIAMPolicy pPsgiampResource_ =
ProjectsSubscriptionsGetIAMPolicy'
{ _psgiampXgafv = Nothing
, _psgiampUploadProtocol = Nothing
, _psgiampAccessToken = Nothing
, _psgiampUploadType = Nothing
, _psgiampResource = pPsgiampResource_
, _psgiampCallback = Nothing
}
psgiampXgafv :: Lens' ProjectsSubscriptionsGetIAMPolicy (Maybe Xgafv)
psgiampXgafv
= lens _psgiampXgafv (\ s a -> s{_psgiampXgafv = a})
psgiampUploadProtocol :: Lens' ProjectsSubscriptionsGetIAMPolicy (Maybe Text)
psgiampUploadProtocol
= lens _psgiampUploadProtocol
(\ s a -> s{_psgiampUploadProtocol = a})
psgiampAccessToken :: Lens' ProjectsSubscriptionsGetIAMPolicy (Maybe Text)
psgiampAccessToken
= lens _psgiampAccessToken
(\ s a -> s{_psgiampAccessToken = a})
psgiampUploadType :: Lens' ProjectsSubscriptionsGetIAMPolicy (Maybe Text)
psgiampUploadType
= lens _psgiampUploadType
(\ s a -> s{_psgiampUploadType = a})
psgiampResource :: Lens' ProjectsSubscriptionsGetIAMPolicy Text
psgiampResource
= lens _psgiampResource
(\ s a -> s{_psgiampResource = a})
psgiampCallback :: Lens' ProjectsSubscriptionsGetIAMPolicy (Maybe Text)
psgiampCallback
= lens _psgiampCallback
(\ s a -> s{_psgiampCallback = a})
instance GoogleRequest
ProjectsSubscriptionsGetIAMPolicy where
type Rs ProjectsSubscriptionsGetIAMPolicy = Policy
type Scopes ProjectsSubscriptionsGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsSubscriptionsGetIAMPolicy'{..}
= go _psgiampResource _psgiampXgafv
_psgiampUploadProtocol
_psgiampAccessToken
_psgiampUploadType
_psgiampCallback
(Just AltJSON)
pubSubService
where go
= buildClient
(Proxy ::
Proxy ProjectsSubscriptionsGetIAMPolicyResource)
mempty