{-# 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.SetIAMPolicy
(
ProjectsIapWebServicesSetIAMPolicyResource
, projectsIapWebServicesSetIAMPolicy
, ProjectsIapWebServicesSetIAMPolicy
, piwssipXgafv
, piwssipUploadProtocol
, piwssipAccessToken
, piwssipUploadType
, piwssipPayload
, piwssipResource
, piwssipCallback
) where
import Network.Google.IAP.Types
import Network.Google.Prelude
type ProjectsIapWebServicesSetIAMPolicyResource =
"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 ProjectsIapWebServicesSetIAMPolicy = ProjectsIapWebServicesSetIAMPolicy'
{ _piwssipXgafv :: !(Maybe Xgafv)
, _piwssipUploadProtocol :: !(Maybe Text)
, _piwssipAccessToken :: !(Maybe Text)
, _piwssipUploadType :: !(Maybe Text)
, _piwssipPayload :: !SetIAMPolicyRequest
, _piwssipResource :: !Text
, _piwssipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsIapWebServicesSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsIapWebServicesSetIAMPolicy
projectsIapWebServicesSetIAMPolicy pPiwssipPayload_ pPiwssipResource_ =
ProjectsIapWebServicesSetIAMPolicy'
{ _piwssipXgafv = Nothing
, _piwssipUploadProtocol = Nothing
, _piwssipAccessToken = Nothing
, _piwssipUploadType = Nothing
, _piwssipPayload = pPiwssipPayload_
, _piwssipResource = pPiwssipResource_
, _piwssipCallback = Nothing
}
piwssipXgafv :: Lens' ProjectsIapWebServicesSetIAMPolicy (Maybe Xgafv)
piwssipXgafv
= lens _piwssipXgafv (\ s a -> s{_piwssipXgafv = a})
piwssipUploadProtocol :: Lens' ProjectsIapWebServicesSetIAMPolicy (Maybe Text)
piwssipUploadProtocol
= lens _piwssipUploadProtocol
(\ s a -> s{_piwssipUploadProtocol = a})
piwssipAccessToken :: Lens' ProjectsIapWebServicesSetIAMPolicy (Maybe Text)
piwssipAccessToken
= lens _piwssipAccessToken
(\ s a -> s{_piwssipAccessToken = a})
piwssipUploadType :: Lens' ProjectsIapWebServicesSetIAMPolicy (Maybe Text)
piwssipUploadType
= lens _piwssipUploadType
(\ s a -> s{_piwssipUploadType = a})
piwssipPayload :: Lens' ProjectsIapWebServicesSetIAMPolicy SetIAMPolicyRequest
piwssipPayload
= lens _piwssipPayload
(\ s a -> s{_piwssipPayload = a})
piwssipResource :: Lens' ProjectsIapWebServicesSetIAMPolicy Text
piwssipResource
= lens _piwssipResource
(\ s a -> s{_piwssipResource = a})
piwssipCallback :: Lens' ProjectsIapWebServicesSetIAMPolicy (Maybe Text)
piwssipCallback
= lens _piwssipCallback
(\ s a -> s{_piwssipCallback = a})
instance GoogleRequest
ProjectsIapWebServicesSetIAMPolicy where
type Rs ProjectsIapWebServicesSetIAMPolicy = Policy
type Scopes ProjectsIapWebServicesSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsIapWebServicesSetIAMPolicy'{..}
= go _piwssipResource _piwssipXgafv
_piwssipUploadProtocol
_piwssipAccessToken
_piwssipUploadType
_piwssipCallback
(Just AltJSON)
_piwssipPayload
iAPService
where go
= buildClient
(Proxy ::
Proxy ProjectsIapWebServicesSetIAMPolicyResource)
mempty