{-# 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.IapWeb.Services.Versions.SetIAMPolicy
(
ProjectsIapWebServicesVersionsSetIAMPolicyResource
, projectsIapWebServicesVersionsSetIAMPolicy
, ProjectsIapWebServicesVersionsSetIAMPolicy
, piwsvsipXgafv
, piwsvsipUploadProtocol
, piwsvsipAccessToken
, piwsvsipUploadType
, piwsvsipPayload
, piwsvsipResource
, piwsvsipCallback
) where
import Network.Google.IAP.Types
import Network.Google.Prelude
type ProjectsIapWebServicesVersionsSetIAMPolicyResource
=
"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 ProjectsIapWebServicesVersionsSetIAMPolicy = ProjectsIapWebServicesVersionsSetIAMPolicy'
{ _piwsvsipXgafv :: !(Maybe Xgafv)
, _piwsvsipUploadProtocol :: !(Maybe Text)
, _piwsvsipAccessToken :: !(Maybe Text)
, _piwsvsipUploadType :: !(Maybe Text)
, _piwsvsipPayload :: !SetIAMPolicyRequest
, _piwsvsipResource :: !Text
, _piwsvsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsIapWebServicesVersionsSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsIapWebServicesVersionsSetIAMPolicy
projectsIapWebServicesVersionsSetIAMPolicy pPiwsvsipPayload_ pPiwsvsipResource_ =
ProjectsIapWebServicesVersionsSetIAMPolicy'
{ _piwsvsipXgafv = Nothing
, _piwsvsipUploadProtocol = Nothing
, _piwsvsipAccessToken = Nothing
, _piwsvsipUploadType = Nothing
, _piwsvsipPayload = pPiwsvsipPayload_
, _piwsvsipResource = pPiwsvsipResource_
, _piwsvsipCallback = Nothing
}
piwsvsipXgafv :: Lens' ProjectsIapWebServicesVersionsSetIAMPolicy (Maybe Xgafv)
piwsvsipXgafv
= lens _piwsvsipXgafv
(\ s a -> s{_piwsvsipXgafv = a})
piwsvsipUploadProtocol :: Lens' ProjectsIapWebServicesVersionsSetIAMPolicy (Maybe Text)
piwsvsipUploadProtocol
= lens _piwsvsipUploadProtocol
(\ s a -> s{_piwsvsipUploadProtocol = a})
piwsvsipAccessToken :: Lens' ProjectsIapWebServicesVersionsSetIAMPolicy (Maybe Text)
piwsvsipAccessToken
= lens _piwsvsipAccessToken
(\ s a -> s{_piwsvsipAccessToken = a})
piwsvsipUploadType :: Lens' ProjectsIapWebServicesVersionsSetIAMPolicy (Maybe Text)
piwsvsipUploadType
= lens _piwsvsipUploadType
(\ s a -> s{_piwsvsipUploadType = a})
piwsvsipPayload :: Lens' ProjectsIapWebServicesVersionsSetIAMPolicy SetIAMPolicyRequest
piwsvsipPayload
= lens _piwsvsipPayload
(\ s a -> s{_piwsvsipPayload = a})
piwsvsipResource :: Lens' ProjectsIapWebServicesVersionsSetIAMPolicy Text
piwsvsipResource
= lens _piwsvsipResource
(\ s a -> s{_piwsvsipResource = a})
piwsvsipCallback :: Lens' ProjectsIapWebServicesVersionsSetIAMPolicy (Maybe Text)
piwsvsipCallback
= lens _piwsvsipCallback
(\ s a -> s{_piwsvsipCallback = a})
instance GoogleRequest
ProjectsIapWebServicesVersionsSetIAMPolicy where
type Rs ProjectsIapWebServicesVersionsSetIAMPolicy =
Policy
type Scopes
ProjectsIapWebServicesVersionsSetIAMPolicy
= '["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsIapWebServicesVersionsSetIAMPolicy'{..}
= go _piwsvsipResource _piwsvsipXgafv
_piwsvsipUploadProtocol
_piwsvsipAccessToken
_piwsvsipUploadType
_piwsvsipCallback
(Just AltJSON)
_piwsvsipPayload
iAPService
where go
= buildClient
(Proxy ::
Proxy
ProjectsIapWebServicesVersionsSetIAMPolicyResource)
mempty