# Google Cloud Billing Budgets V1 Client - Class BudgetAmount (2.1.2)

2.1.2 (latest) 2.1.1 2.0.5 1.4.5 1.3.1 1.2.2 1.1.0 1.0.5 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** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ specified_amount` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Money.html` 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` | `https://docs.cloud.google.com/php/docs/reference/cloud-billing-budgets/latest/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](https://docs.cloud.google.com/php/docs/reference/cloud-billing-budgets/latest/V1.Filter#_Google_Cloud_Billing_Budgets_V1_Filter__getCalendarPeriod__). It cannot be set in combination with [Filter.custom_period](https://docs.cloud.google.com/php/docs/reference/cloud-billing-budgets/latest/V1.Filter#_Google_Cloud_Billing_Budgets_V1_Filter__getCustomPeriod__). |

### 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** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Money.html|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** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Money.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$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](https://docs.cloud.google.com/php/docs/reference/cloud-billing-budgets/latest/V1.Filter#_Google_Cloud_Billing_Budgets_V1_Filter__getCalendarPeriod__).
It cannot be set in combination with
[Filter.custom_period](https://docs.cloud.google.com/php/docs/reference/cloud-billing-budgets/latest/V1.Filter#_Google_Cloud_Billing_Budgets_V1_Filter__getCustomPeriod__).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-billing-budgets/latest/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](https://docs.cloud.google.com/php/docs/reference/cloud-billing-budgets/latest/V1.Filter#_Google_Cloud_Billing_Budgets_V1_Filter__getCalendarPeriod__).
It cannot be set in combination with
[Filter.custom_period](https://docs.cloud.google.com/php/docs/reference/cloud-billing-budgets/latest/V1.Filter#_Google_Cloud_Billing_Budgets_V1_Filter__getCustomPeriod__).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-billing-budgets/latest/V1.LastPeriodAmount` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBudgetAmount

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |