{-# 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.IAP.Projects.IapTunnel.SetIAMPolicy
(
ProjectsIapTunnelSetIAMPolicyResource
, projectsIapTunnelSetIAMPolicy
, ProjectsIapTunnelSetIAMPolicy
, pitsipXgafv
, pitsipUploadProtocol
, pitsipAccessToken
, pitsipUploadType
, pitsipPayload
, pitsipResource
, pitsipCallback
) where
import Network.Google.IAP.Types
import Network.Google.Prelude
type ProjectsIapTunnelSetIAMPolicyResource =
"v1" :>
CaptureMode "resource" "setIamPolicy" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SetIAMPolicyRequest :>
Post '[JSON] Policy
data ProjectsIapTunnelSetIAMPolicy = ProjectsIapTunnelSetIAMPolicy'
{ _pitsipXgafv :: !(Maybe Xgafv)
, _pitsipUploadProtocol :: !(Maybe Text)
, _pitsipAccessToken :: !(Maybe Text)
, _pitsipUploadType :: !(Maybe Text)
, _pitsipPayload :: !SetIAMPolicyRequest
, _pitsipResource :: !Text
, _pitsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsIapTunnelSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsIapTunnelSetIAMPolicy
projectsIapTunnelSetIAMPolicy pPitsipPayload_ pPitsipResource_ =
ProjectsIapTunnelSetIAMPolicy'
{ _pitsipXgafv = Nothing
, _pitsipUploadProtocol = Nothing
, _pitsipAccessToken = Nothing
, _pitsipUploadType = Nothing
, _pitsipPayload = pPitsipPayload_
, _pitsipResource = pPitsipResource_
, _pitsipCallback = Nothing
}
pitsipXgafv :: Lens' ProjectsIapTunnelSetIAMPolicy (Maybe Xgafv)
pitsipXgafv
= lens _pitsipXgafv (\ s a -> s{_pitsipXgafv = a})
pitsipUploadProtocol :: Lens' ProjectsIapTunnelSetIAMPolicy (Maybe Text)
pitsipUploadProtocol
= lens _pitsipUploadProtocol
(\ s a -> s{_pitsipUploadProtocol = a})
pitsipAccessToken :: Lens' ProjectsIapTunnelSetIAMPolicy (Maybe Text)
pitsipAccessToken
= lens _pitsipAccessToken
(\ s a -> s{_pitsipAccessToken = a})
pitsipUploadType :: Lens' ProjectsIapTunnelSetIAMPolicy (Maybe Text)
pitsipUploadType
= lens _pitsipUploadType
(\ s a -> s{_pitsipUploadType = a})
pitsipPayload :: Lens' ProjectsIapTunnelSetIAMPolicy SetIAMPolicyRequest
pitsipPayload
= lens _pitsipPayload
(\ s a -> s{_pitsipPayload = a})
pitsipResource :: Lens' ProjectsIapTunnelSetIAMPolicy Text
pitsipResource
= lens _pitsipResource
(\ s a -> s{_pitsipResource = a})
pitsipCallback :: Lens' ProjectsIapTunnelSetIAMPolicy (Maybe Text)
pitsipCallback
= lens _pitsipCallback
(\ s a -> s{_pitsipCallback = a})
instance GoogleRequest ProjectsIapTunnelSetIAMPolicy
where
type Rs ProjectsIapTunnelSetIAMPolicy = Policy
type Scopes ProjectsIapTunnelSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsIapTunnelSetIAMPolicy'{..}
= go _pitsipResource _pitsipXgafv
_pitsipUploadProtocol
_pitsipAccessToken
_pitsipUploadType
_pitsipCallback
(Just AltJSON)
_pitsipPayload
iAPService
where go
= buildClient
(Proxy ::
Proxy ProjectsIapTunnelSetIAMPolicyResource)
mempty