{-# 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.Get
(
BillingAccountsGetResource
, billingAccountsGet
, BillingAccountsGet
, bagXgafv
, bagUploadProtocol
, bagAccessToken
, bagUploadType
, bagName
, bagCallback
) where
import Network.Google.Billing.Types
import Network.Google.Prelude
type BillingAccountsGetResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] BillingAccount
data BillingAccountsGet = BillingAccountsGet'
{ _bagXgafv :: !(Maybe Xgafv)
, _bagUploadProtocol :: !(Maybe Text)
, _bagAccessToken :: !(Maybe Text)
, _bagUploadType :: !(Maybe Text)
, _bagName :: !Text
, _bagCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
billingAccountsGet
:: Text
-> BillingAccountsGet
billingAccountsGet pBagName_ =
BillingAccountsGet'
{ _bagXgafv = Nothing
, _bagUploadProtocol = Nothing
, _bagAccessToken = Nothing
, _bagUploadType = Nothing
, _bagName = pBagName_
, _bagCallback = Nothing
}
bagXgafv :: Lens' BillingAccountsGet (Maybe Xgafv)
bagXgafv = lens _bagXgafv (\ s a -> s{_bagXgafv = a})
bagUploadProtocol :: Lens' BillingAccountsGet (Maybe Text)
bagUploadProtocol
= lens _bagUploadProtocol
(\ s a -> s{_bagUploadProtocol = a})
bagAccessToken :: Lens' BillingAccountsGet (Maybe Text)
bagAccessToken
= lens _bagAccessToken
(\ s a -> s{_bagAccessToken = a})
bagUploadType :: Lens' BillingAccountsGet (Maybe Text)
bagUploadType
= lens _bagUploadType
(\ s a -> s{_bagUploadType = a})
bagName :: Lens' BillingAccountsGet Text
bagName = lens _bagName (\ s a -> s{_bagName = a})
bagCallback :: Lens' BillingAccountsGet (Maybe Text)
bagCallback
= lens _bagCallback (\ s a -> s{_bagCallback = a})
instance GoogleRequest BillingAccountsGet where
type Rs BillingAccountsGet = BillingAccount
type Scopes BillingAccountsGet =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient BillingAccountsGet'{..}
= go _bagName _bagXgafv _bagUploadProtocol
_bagAccessToken
_bagUploadType
_bagCallback
(Just AltJSON)
billingService
where go
= buildClient
(Proxy :: Proxy BillingAccountsGetResource)
mempty