{-# 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.Create
(
BillingAccountsCreateResource
, billingAccountsCreate
, BillingAccountsCreate
, bacXgafv
, bacUploadProtocol
, bacAccessToken
, bacUploadType
, bacPayload
, bacCallback
) where
import Network.Google.Billing.Types
import Network.Google.Prelude
type BillingAccountsCreateResource =
"v1" :>
"billingAccounts" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BillingAccount :>
Post '[JSON] BillingAccount
data BillingAccountsCreate = BillingAccountsCreate'
{ _bacXgafv :: !(Maybe Xgafv)
, _bacUploadProtocol :: !(Maybe Text)
, _bacAccessToken :: !(Maybe Text)
, _bacUploadType :: !(Maybe Text)
, _bacPayload :: !BillingAccount
, _bacCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
billingAccountsCreate
:: BillingAccount
-> BillingAccountsCreate
billingAccountsCreate pBacPayload_ =
BillingAccountsCreate'
{ _bacXgafv = Nothing
, _bacUploadProtocol = Nothing
, _bacAccessToken = Nothing
, _bacUploadType = Nothing
, _bacPayload = pBacPayload_
, _bacCallback = Nothing
}
bacXgafv :: Lens' BillingAccountsCreate (Maybe Xgafv)
bacXgafv = lens _bacXgafv (\ s a -> s{_bacXgafv = a})
bacUploadProtocol :: Lens' BillingAccountsCreate (Maybe Text)
bacUploadProtocol
= lens _bacUploadProtocol
(\ s a -> s{_bacUploadProtocol = a})
bacAccessToken :: Lens' BillingAccountsCreate (Maybe Text)
bacAccessToken
= lens _bacAccessToken
(\ s a -> s{_bacAccessToken = a})
bacUploadType :: Lens' BillingAccountsCreate (Maybe Text)
bacUploadType
= lens _bacUploadType
(\ s a -> s{_bacUploadType = a})
bacPayload :: Lens' BillingAccountsCreate BillingAccount
bacPayload
= lens _bacPayload (\ s a -> s{_bacPayload = a})
bacCallback :: Lens' BillingAccountsCreate (Maybe Text)
bacCallback
= lens _bacCallback (\ s a -> s{_bacCallback = a})
instance GoogleRequest BillingAccountsCreate where
type Rs BillingAccountsCreate = BillingAccount
type Scopes BillingAccountsCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient BillingAccountsCreate'{..}
= go _bacXgafv _bacUploadProtocol _bacAccessToken
_bacUploadType
_bacCallback
(Just AltJSON)
_bacPayload
billingService
where go
= buildClient
(Proxy :: Proxy BillingAccountsCreateResource)
mempty