{-# 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.Topics.GetIAMPolicy
(
ProjectsTopicsGetIAMPolicyResource
, projectsTopicsGetIAMPolicy
, ProjectsTopicsGetIAMPolicy
, ptgipXgafv
, ptgipUploadProtocol
, ptgipAccessToken
, ptgipUploadType
, ptgipResource
, ptgipCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsTopicsGetIAMPolicyResource =
"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 ProjectsTopicsGetIAMPolicy = ProjectsTopicsGetIAMPolicy'
{ _ptgipXgafv :: !(Maybe Xgafv)
, _ptgipUploadProtocol :: !(Maybe Text)
, _ptgipAccessToken :: !(Maybe Text)
, _ptgipUploadType :: !(Maybe Text)
, _ptgipResource :: !Text
, _ptgipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsTopicsGetIAMPolicy
:: Text
-> ProjectsTopicsGetIAMPolicy
projectsTopicsGetIAMPolicy pPtgipResource_ =
ProjectsTopicsGetIAMPolicy'
{ _ptgipXgafv = Nothing
, _ptgipUploadProtocol = Nothing
, _ptgipAccessToken = Nothing
, _ptgipUploadType = Nothing
, _ptgipResource = pPtgipResource_
, _ptgipCallback = Nothing
}
ptgipXgafv :: Lens' ProjectsTopicsGetIAMPolicy (Maybe Xgafv)
ptgipXgafv
= lens _ptgipXgafv (\ s a -> s{_ptgipXgafv = a})
ptgipUploadProtocol :: Lens' ProjectsTopicsGetIAMPolicy (Maybe Text)
ptgipUploadProtocol
= lens _ptgipUploadProtocol
(\ s a -> s{_ptgipUploadProtocol = a})
ptgipAccessToken :: Lens' ProjectsTopicsGetIAMPolicy (Maybe Text)
ptgipAccessToken
= lens _ptgipAccessToken
(\ s a -> s{_ptgipAccessToken = a})
ptgipUploadType :: Lens' ProjectsTopicsGetIAMPolicy (Maybe Text)
ptgipUploadType
= lens _ptgipUploadType
(\ s a -> s{_ptgipUploadType = a})
ptgipResource :: Lens' ProjectsTopicsGetIAMPolicy Text
ptgipResource
= lens _ptgipResource
(\ s a -> s{_ptgipResource = a})
ptgipCallback :: Lens' ProjectsTopicsGetIAMPolicy (Maybe Text)
ptgipCallback
= lens _ptgipCallback
(\ s a -> s{_ptgipCallback = a})
instance GoogleRequest ProjectsTopicsGetIAMPolicy
where
type Rs ProjectsTopicsGetIAMPolicy = Policy
type Scopes ProjectsTopicsGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsTopicsGetIAMPolicy'{..}
= go _ptgipResource _ptgipXgafv _ptgipUploadProtocol
_ptgipAccessToken
_ptgipUploadType
_ptgipCallback
(Just AltJSON)
pubSubService
where go
= buildClient
(Proxy :: Proxy ProjectsTopicsGetIAMPolicyResource)
mempty