Google Cloud Billing Budgets V1 Client - Class BudgetAmount (1.3.1)

Reference documentation and code samples for the Google Cloud Billing Budgets V1 Client class BudgetAmount.

The budgeted amount for each usage period.

Generated from protobuf message google.cloud.billing.budgets.v1.BudgetAmount

Namespace

Google \ Cloud \ Billing \ Budgets \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ specified_amount Google\Type\Money

A specified amount to use as the budget. currency_code is optional. If specified when creating a budget, it must match the currency of the billing account. If specified when updating a budget, it must match the currency_code of the existing budget. The currency_code is provided on output.

↳ last_period_amount Google\Cloud\Billing\Budgets\V1\LastPeriodAmount

Use the last period's actual spend as the budget for the present period. LastPeriodAmount can only be set when the budget's time period is a Filter.calendar_period. It cannot be set in combination with Filter.custom_period.

getSpecifiedAmount

A specified amount to use as the budget.

currency_code is optional. If specified when creating a budget, it must match the currency of the billing account. If specified when updating a budget, it must match the currency_code of the existing budget. The currency_code is provided on output.

Returns
TypeDescription
Google\Type\Money|null

hasSpecifiedAmount

setSpecifiedAmount

A specified amount to use as the budget.

currency_code is optional. If specified when creating a budget, it must match the currency of the billing account. If specified when updating a budget, it must match the currency_code of the existing budget. The currency_code is provided on output.

Parameter
NameDescription
var Google\Type\Money
Returns
TypeDescription
$this

getLastPeriodAmount

Use the last period's actual spend as the budget for the present period.

LastPeriodAmount can only be set when the budget's time period is a Filter.calendar_period. It cannot be set in combination with Filter.custom_period.

Returns
TypeDescription
Google\Cloud\Billing\Budgets\V1\LastPeriodAmount|null

hasLastPeriodAmount

setLastPeriodAmount

Use the last period's actual spend as the budget for the present period.

LastPeriodAmount can only be set when the budget's time period is a Filter.calendar_period. It cannot be set in combination with Filter.custom_period.

Parameter
NameDescription
var Google\Cloud\Billing\Budgets\V1\LastPeriodAmount
Returns
TypeDescription
$this

getBudgetAmount

Returns
TypeDescription
string