{-# 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.GetIAMPolicy
(
BillingAccountsGetIAMPolicyResource
, billingAccountsGetIAMPolicy
, BillingAccountsGetIAMPolicy
, bagipXgafv
, bagipUploadProtocol
, bagipAccessToken
, bagipUploadType
, bagipResource
, bagipCallback
) where
import Network.Google.Billing.Types
import Network.Google.Prelude
type BillingAccountsGetIAMPolicyResource =
"v1" :>
CaptureMode "resource" "getIamPolicy" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Policy
data BillingAccountsGetIAMPolicy = BillingAccountsGetIAMPolicy'
{ _bagipXgafv :: !(Maybe Xgafv)
, _bagipUploadProtocol :: !(Maybe Text)
, _bagipAccessToken :: !(Maybe Text)
, _bagipUploadType :: !(Maybe Text)
, _bagipResource :: !Text
, _bagipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
billingAccountsGetIAMPolicy
:: Text
-> BillingAccountsGetIAMPolicy
billingAccountsGetIAMPolicy pBagipResource_ =
BillingAccountsGetIAMPolicy'
{ _bagipXgafv = Nothing
, _bagipUploadProtocol = Nothing
, _bagipAccessToken = Nothing
, _bagipUploadType = Nothing
, _bagipResource = pBagipResource_
, _bagipCallback = Nothing
}
bagipXgafv :: Lens' BillingAccountsGetIAMPolicy (Maybe Xgafv)
bagipXgafv
= lens _bagipXgafv (\ s a -> s{_bagipXgafv = a})
bagipUploadProtocol :: Lens' BillingAccountsGetIAMPolicy (Maybe Text)
bagipUploadProtocol
= lens _bagipUploadProtocol
(\ s a -> s{_bagipUploadProtocol = a})
bagipAccessToken :: Lens' BillingAccountsGetIAMPolicy (Maybe Text)
bagipAccessToken
= lens _bagipAccessToken
(\ s a -> s{_bagipAccessToken = a})
bagipUploadType :: Lens' BillingAccountsGetIAMPolicy (Maybe Text)
bagipUploadType
= lens _bagipUploadType
(\ s a -> s{_bagipUploadType = a})
bagipResource :: Lens' BillingAccountsGetIAMPolicy Text
bagipResource
= lens _bagipResource
(\ s a -> s{_bagipResource = a})
bagipCallback :: Lens' BillingAccountsGetIAMPolicy (Maybe Text)
bagipCallback
= lens _bagipCallback
(\ s a -> s{_bagipCallback = a})
instance GoogleRequest BillingAccountsGetIAMPolicy
where
type Rs BillingAccountsGetIAMPolicy = Policy
type Scopes BillingAccountsGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient BillingAccountsGetIAMPolicy'{..}
= go _bagipResource _bagipXgafv _bagipUploadProtocol
_bagipAccessToken
_bagipUploadType
_bagipCallback
(Just AltJSON)
billingService
where go
= buildClient
(Proxy :: Proxy BillingAccountsGetIAMPolicyResource)
mempty