{-# 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.Patch
(
BillingAccountsPatchResource
, billingAccountsPatch
, BillingAccountsPatch
, bapXgafv
, bapUploadProtocol
, bapUpdateMask
, bapAccessToken
, bapUploadType
, bapPayload
, bapName
, bapCallback
) where
import Network.Google.Billing.Types
import Network.Google.Prelude
type BillingAccountsPatchResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BillingAccount :>
Patch '[JSON] BillingAccount
data BillingAccountsPatch = BillingAccountsPatch'
{ _bapXgafv :: !(Maybe Xgafv)
, _bapUploadProtocol :: !(Maybe Text)
, _bapUpdateMask :: !(Maybe GFieldMask)
, _bapAccessToken :: !(Maybe Text)
, _bapUploadType :: !(Maybe Text)
, _bapPayload :: !BillingAccount
, _bapName :: !Text
, _bapCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
billingAccountsPatch
:: BillingAccount
-> Text
-> BillingAccountsPatch
billingAccountsPatch pBapPayload_ pBapName_ =
BillingAccountsPatch'
{ _bapXgafv = Nothing
, _bapUploadProtocol = Nothing
, _bapUpdateMask = Nothing
, _bapAccessToken = Nothing
, _bapUploadType = Nothing
, _bapPayload = pBapPayload_
, _bapName = pBapName_
, _bapCallback = Nothing
}
bapXgafv :: Lens' BillingAccountsPatch (Maybe Xgafv)
bapXgafv = lens _bapXgafv (\ s a -> s{_bapXgafv = a})
bapUploadProtocol :: Lens' BillingAccountsPatch (Maybe Text)
bapUploadProtocol
= lens _bapUploadProtocol
(\ s a -> s{_bapUploadProtocol = a})
bapUpdateMask :: Lens' BillingAccountsPatch (Maybe GFieldMask)
bapUpdateMask
= lens _bapUpdateMask
(\ s a -> s{_bapUpdateMask = a})
bapAccessToken :: Lens' BillingAccountsPatch (Maybe Text)
bapAccessToken
= lens _bapAccessToken
(\ s a -> s{_bapAccessToken = a})
bapUploadType :: Lens' BillingAccountsPatch (Maybe Text)
bapUploadType
= lens _bapUploadType
(\ s a -> s{_bapUploadType = a})
bapPayload :: Lens' BillingAccountsPatch BillingAccount
bapPayload
= lens _bapPayload (\ s a -> s{_bapPayload = a})
bapName :: Lens' BillingAccountsPatch Text
bapName = lens _bapName (\ s a -> s{_bapName = a})
bapCallback :: Lens' BillingAccountsPatch (Maybe Text)
bapCallback
= lens _bapCallback (\ s a -> s{_bapCallback = a})
instance GoogleRequest BillingAccountsPatch where
type Rs BillingAccountsPatch = BillingAccount
type Scopes BillingAccountsPatch =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient BillingAccountsPatch'{..}
= go _bapName _bapXgafv _bapUploadProtocol
_bapUpdateMask
_bapAccessToken
_bapUploadType
_bapCallback
(Just AltJSON)
_bapPayload
billingService
where go
= buildClient
(Proxy :: Proxy BillingAccountsPatchResource)
mempty