{-# 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.ServiceBroker.SetIAMPolicy
(
SetIAMPolicyResource
, setIAMPolicy
, SetIAMPolicy
, sipXgafv
, sipUploadProtocol
, sipAccessToken
, sipUploadType
, sipPayload
, sipResource
, sipCallback
) where
import Network.Google.Prelude
import Network.Google.ServiceBroker.Types
type SetIAMPolicyResource =
"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] GoogleIAMV1__SetIAMPolicyRequest :>
Post '[JSON] GoogleIAMV1__Policy
data SetIAMPolicy = SetIAMPolicy'
{ _sipXgafv :: !(Maybe Xgafv)
, _sipUploadProtocol :: !(Maybe Text)
, _sipAccessToken :: !(Maybe Text)
, _sipUploadType :: !(Maybe Text)
, _sipPayload :: !GoogleIAMV1__SetIAMPolicyRequest
, _sipResource :: !Text
, _sipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
setIAMPolicy
:: GoogleIAMV1__SetIAMPolicyRequest
-> Text
-> SetIAMPolicy
setIAMPolicy pSipPayload_ pSipResource_ =
SetIAMPolicy'
{ _sipXgafv = Nothing
, _sipUploadProtocol = Nothing
, _sipAccessToken = Nothing
, _sipUploadType = Nothing
, _sipPayload = pSipPayload_
, _sipResource = pSipResource_
, _sipCallback = Nothing
}
sipXgafv :: Lens' SetIAMPolicy (Maybe Xgafv)
sipXgafv = lens _sipXgafv (\ s a -> s{_sipXgafv = a})
sipUploadProtocol :: Lens' SetIAMPolicy (Maybe Text)
sipUploadProtocol
= lens _sipUploadProtocol
(\ s a -> s{_sipUploadProtocol = a})
sipAccessToken :: Lens' SetIAMPolicy (Maybe Text)
sipAccessToken
= lens _sipAccessToken
(\ s a -> s{_sipAccessToken = a})
sipUploadType :: Lens' SetIAMPolicy (Maybe Text)
sipUploadType
= lens _sipUploadType
(\ s a -> s{_sipUploadType = a})
sipPayload :: Lens' SetIAMPolicy GoogleIAMV1__SetIAMPolicyRequest
sipPayload
= lens _sipPayload (\ s a -> s{_sipPayload = a})
sipResource :: Lens' SetIAMPolicy Text
sipResource
= lens _sipResource (\ s a -> s{_sipResource = a})
sipCallback :: Lens' SetIAMPolicy (Maybe Text)
sipCallback
= lens _sipCallback (\ s a -> s{_sipCallback = a})
instance GoogleRequest SetIAMPolicy where
type Rs SetIAMPolicy = GoogleIAMV1__Policy
type Scopes SetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient SetIAMPolicy'{..}
= go _sipResource _sipXgafv _sipUploadProtocol
_sipAccessToken
_sipUploadType
_sipCallback
(Just AltJSON)
_sipPayload
serviceBrokerService
where go
= buildClient (Proxy :: Proxy SetIAMPolicyResource)
mempty