{-# 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.CloudBilling.BillingAccounts.SetIAMPolicy
(
BillingAccountsSetIAMPolicyResource
, billingAccountsSetIAMPolicy
, BillingAccountsSetIAMPolicy
, basipXgafv
, basipUploadProtocol
, basipAccessToken
, basipUploadType
, basipPayload
, basipResource
, basipCallback
) where
import Network.Google.Billing.Types
import Network.Google.Prelude
type BillingAccountsSetIAMPolicyResource =
"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 BillingAccountsSetIAMPolicy = BillingAccountsSetIAMPolicy'
{ _basipXgafv :: !(Maybe Xgafv)
, _basipUploadProtocol :: !(Maybe Text)
, _basipAccessToken :: !(Maybe Text)
, _basipUploadType :: !(Maybe Text)
, _basipPayload :: !SetIAMPolicyRequest
, _basipResource :: !Text
, _basipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
billingAccountsSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> BillingAccountsSetIAMPolicy
billingAccountsSetIAMPolicy pBasipPayload_ pBasipResource_ =
BillingAccountsSetIAMPolicy'
{ _basipXgafv = Nothing
, _basipUploadProtocol = Nothing
, _basipAccessToken = Nothing
, _basipUploadType = Nothing
, _basipPayload = pBasipPayload_
, _basipResource = pBasipResource_
, _basipCallback = Nothing
}
basipXgafv :: Lens' BillingAccountsSetIAMPolicy (Maybe Xgafv)
basipXgafv
= lens _basipXgafv (\ s a -> s{_basipXgafv = a})
basipUploadProtocol :: Lens' BillingAccountsSetIAMPolicy (Maybe Text)
basipUploadProtocol
= lens _basipUploadProtocol
(\ s a -> s{_basipUploadProtocol = a})
basipAccessToken :: Lens' BillingAccountsSetIAMPolicy (Maybe Text)
basipAccessToken
= lens _basipAccessToken
(\ s a -> s{_basipAccessToken = a})
basipUploadType :: Lens' BillingAccountsSetIAMPolicy (Maybe Text)
basipUploadType
= lens _basipUploadType
(\ s a -> s{_basipUploadType = a})
basipPayload :: Lens' BillingAccountsSetIAMPolicy SetIAMPolicyRequest
basipPayload
= lens _basipPayload (\ s a -> s{_basipPayload = a})
basipResource :: Lens' BillingAccountsSetIAMPolicy Text
basipResource
= lens _basipResource
(\ s a -> s{_basipResource = a})
basipCallback :: Lens' BillingAccountsSetIAMPolicy (Maybe Text)
basipCallback
= lens _basipCallback
(\ s a -> s{_basipCallback = a})
instance GoogleRequest BillingAccountsSetIAMPolicy
where
type Rs BillingAccountsSetIAMPolicy = Policy
type Scopes BillingAccountsSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient BillingAccountsSetIAMPolicy'{..}
= go _basipResource _basipXgafv _basipUploadProtocol
_basipAccessToken
_basipUploadType
_basipCallback
(Just AltJSON)
_basipPayload
billingService
where go
= buildClient
(Proxy :: Proxy BillingAccountsSetIAMPolicyResource)
mempty