{-# 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.TestIAMPermissions
(
BillingAccountsTestIAMPermissionsResource
, billingAccountsTestIAMPermissions
, BillingAccountsTestIAMPermissions
, batipXgafv
, batipUploadProtocol
, batipAccessToken
, batipUploadType
, batipPayload
, batipResource
, batipCallback
) where
import Network.Google.Billing.Types
import Network.Google.Prelude
type BillingAccountsTestIAMPermissionsResource =
"v1" :>
CaptureMode "resource" "testIamPermissions" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestIAMPermissionsRequest :>
Post '[JSON] TestIAMPermissionsResponse
data BillingAccountsTestIAMPermissions = BillingAccountsTestIAMPermissions'
{ _batipXgafv :: !(Maybe Xgafv)
, _batipUploadProtocol :: !(Maybe Text)
, _batipAccessToken :: !(Maybe Text)
, _batipUploadType :: !(Maybe Text)
, _batipPayload :: !TestIAMPermissionsRequest
, _batipResource :: !Text
, _batipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
billingAccountsTestIAMPermissions
:: TestIAMPermissionsRequest
-> Text
-> BillingAccountsTestIAMPermissions
billingAccountsTestIAMPermissions pBatipPayload_ pBatipResource_ =
BillingAccountsTestIAMPermissions'
{ _batipXgafv = Nothing
, _batipUploadProtocol = Nothing
, _batipAccessToken = Nothing
, _batipUploadType = Nothing
, _batipPayload = pBatipPayload_
, _batipResource = pBatipResource_
, _batipCallback = Nothing
}
batipXgafv :: Lens' BillingAccountsTestIAMPermissions (Maybe Xgafv)
batipXgafv
= lens _batipXgafv (\ s a -> s{_batipXgafv = a})
batipUploadProtocol :: Lens' BillingAccountsTestIAMPermissions (Maybe Text)
batipUploadProtocol
= lens _batipUploadProtocol
(\ s a -> s{_batipUploadProtocol = a})
batipAccessToken :: Lens' BillingAccountsTestIAMPermissions (Maybe Text)
batipAccessToken
= lens _batipAccessToken
(\ s a -> s{_batipAccessToken = a})
batipUploadType :: Lens' BillingAccountsTestIAMPermissions (Maybe Text)
batipUploadType
= lens _batipUploadType
(\ s a -> s{_batipUploadType = a})
batipPayload :: Lens' BillingAccountsTestIAMPermissions TestIAMPermissionsRequest
batipPayload
= lens _batipPayload (\ s a -> s{_batipPayload = a})
batipResource :: Lens' BillingAccountsTestIAMPermissions Text
batipResource
= lens _batipResource
(\ s a -> s{_batipResource = a})
batipCallback :: Lens' BillingAccountsTestIAMPermissions (Maybe Text)
batipCallback
= lens _batipCallback
(\ s a -> s{_batipCallback = a})
instance GoogleRequest
BillingAccountsTestIAMPermissions where
type Rs BillingAccountsTestIAMPermissions =
TestIAMPermissionsResponse
type Scopes BillingAccountsTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient BillingAccountsTestIAMPermissions'{..}
= go _batipResource _batipXgafv _batipUploadProtocol
_batipAccessToken
_batipUploadType
_batipCallback
(Just AltJSON)
_batipPayload
billingService
where go
= buildClient
(Proxy ::
Proxy BillingAccountsTestIAMPermissionsResource)
mempty