{-# 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.SetIAMPolicy
(
ProjectsIapWebSetIAMPolicyResource
, projectsIapWebSetIAMPolicy
, ProjectsIapWebSetIAMPolicy
, piwsipXgafv
, piwsipUploadProtocol
, piwsipAccessToken
, piwsipUploadType
, piwsipPayload
, piwsipResource
, piwsipCallback
) where
import Network.Google.IAP.Types
import Network.Google.Prelude
type ProjectsIapWebSetIAMPolicyResource =
"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 ProjectsIapWebSetIAMPolicy = ProjectsIapWebSetIAMPolicy'
{ _piwsipXgafv :: !(Maybe Xgafv)
, _piwsipUploadProtocol :: !(Maybe Text)
, _piwsipAccessToken :: !(Maybe Text)
, _piwsipUploadType :: !(Maybe Text)
, _piwsipPayload :: !SetIAMPolicyRequest
, _piwsipResource :: !Text
, _piwsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsIapWebSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsIapWebSetIAMPolicy
projectsIapWebSetIAMPolicy pPiwsipPayload_ pPiwsipResource_ =
ProjectsIapWebSetIAMPolicy'
{ _piwsipXgafv = Nothing
, _piwsipUploadProtocol = Nothing
, _piwsipAccessToken = Nothing
, _piwsipUploadType = Nothing
, _piwsipPayload = pPiwsipPayload_
, _piwsipResource = pPiwsipResource_
, _piwsipCallback = Nothing
}
piwsipXgafv :: Lens' ProjectsIapWebSetIAMPolicy (Maybe Xgafv)
piwsipXgafv
= lens _piwsipXgafv (\ s a -> s{_piwsipXgafv = a})
piwsipUploadProtocol :: Lens' ProjectsIapWebSetIAMPolicy (Maybe Text)
piwsipUploadProtocol
= lens _piwsipUploadProtocol
(\ s a -> s{_piwsipUploadProtocol = a})
piwsipAccessToken :: Lens' ProjectsIapWebSetIAMPolicy (Maybe Text)
piwsipAccessToken
= lens _piwsipAccessToken
(\ s a -> s{_piwsipAccessToken = a})
piwsipUploadType :: Lens' ProjectsIapWebSetIAMPolicy (Maybe Text)
piwsipUploadType
= lens _piwsipUploadType
(\ s a -> s{_piwsipUploadType = a})
piwsipPayload :: Lens' ProjectsIapWebSetIAMPolicy SetIAMPolicyRequest
piwsipPayload
= lens _piwsipPayload
(\ s a -> s{_piwsipPayload = a})
piwsipResource :: Lens' ProjectsIapWebSetIAMPolicy Text
piwsipResource
= lens _piwsipResource
(\ s a -> s{_piwsipResource = a})
piwsipCallback :: Lens' ProjectsIapWebSetIAMPolicy (Maybe Text)
piwsipCallback
= lens _piwsipCallback
(\ s a -> s{_piwsipCallback = a})
instance GoogleRequest ProjectsIapWebSetIAMPolicy
where
type Rs ProjectsIapWebSetIAMPolicy = Policy
type Scopes ProjectsIapWebSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsIapWebSetIAMPolicy'{..}
= go _piwsipResource _piwsipXgafv
_piwsipUploadProtocol
_piwsipAccessToken
_piwsipUploadType
_piwsipCallback
(Just AltJSON)
_piwsipPayload
iAPService
where go
= buildClient
(Proxy :: Proxy ProjectsIapWebSetIAMPolicyResource)
mempty