{-# 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.Snapshots.GetIAMPolicy
(
ProjectsSnapshotsGetIAMPolicyResource
, projectsSnapshotsGetIAMPolicy
, ProjectsSnapshotsGetIAMPolicy
, psgipXgafv
, psgipUploadProtocol
, psgipAccessToken
, psgipUploadType
, psgipResource
, psgipCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsSnapshotsGetIAMPolicyResource =
"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 ProjectsSnapshotsGetIAMPolicy = ProjectsSnapshotsGetIAMPolicy'
{ _psgipXgafv :: !(Maybe Xgafv)
, _psgipUploadProtocol :: !(Maybe Text)
, _psgipAccessToken :: !(Maybe Text)
, _psgipUploadType :: !(Maybe Text)
, _psgipResource :: !Text
, _psgipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSnapshotsGetIAMPolicy
:: Text
-> ProjectsSnapshotsGetIAMPolicy
projectsSnapshotsGetIAMPolicy pPsgipResource_ =
ProjectsSnapshotsGetIAMPolicy'
{ _psgipXgafv = Nothing
, _psgipUploadProtocol = Nothing
, _psgipAccessToken = Nothing
, _psgipUploadType = Nothing
, _psgipResource = pPsgipResource_
, _psgipCallback = Nothing
}
psgipXgafv :: Lens' ProjectsSnapshotsGetIAMPolicy (Maybe Xgafv)
psgipXgafv
= lens _psgipXgafv (\ s a -> s{_psgipXgafv = a})
psgipUploadProtocol :: Lens' ProjectsSnapshotsGetIAMPolicy (Maybe Text)
psgipUploadProtocol
= lens _psgipUploadProtocol
(\ s a -> s{_psgipUploadProtocol = a})
psgipAccessToken :: Lens' ProjectsSnapshotsGetIAMPolicy (Maybe Text)
psgipAccessToken
= lens _psgipAccessToken
(\ s a -> s{_psgipAccessToken = a})
psgipUploadType :: Lens' ProjectsSnapshotsGetIAMPolicy (Maybe Text)
psgipUploadType
= lens _psgipUploadType
(\ s a -> s{_psgipUploadType = a})
psgipResource :: Lens' ProjectsSnapshotsGetIAMPolicy Text
psgipResource
= lens _psgipResource
(\ s a -> s{_psgipResource = a})
psgipCallback :: Lens' ProjectsSnapshotsGetIAMPolicy (Maybe Text)
psgipCallback
= lens _psgipCallback
(\ s a -> s{_psgipCallback = a})
instance GoogleRequest ProjectsSnapshotsGetIAMPolicy
where
type Rs ProjectsSnapshotsGetIAMPolicy = Policy
type Scopes ProjectsSnapshotsGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsSnapshotsGetIAMPolicy'{..}
= go _psgipResource _psgipXgafv _psgipUploadProtocol
_psgipAccessToken
_psgipUploadType
_psgipCallback
(Just AltJSON)
pubSubService
where go
= buildClient
(Proxy ::
Proxy ProjectsSnapshotsGetIAMPolicyResource)
mempty