# Google Cloud Capacity Planner V1beta Client - Class Allocation (0.1.2)

0.1.2 (latest) 0.1.1

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Capacity Planner V1beta Client class Allocation.

Repesents Allocation which is part of aggregated
reservations data response of "QueryReservations".

Generated from protobuf message `google.cloud.capacityplanner.v1beta.Allocation`

## Namespace

Google \\ Cloud \\ CapacityPlanner \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ specific_allocation` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.Allocation.SpecificSKUAllocation` Reservation for instances with specific machine shapes. |
| `↳ id` | `int|string` The unique identifier for the resource. This identifier is defined by the server. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The creation timestamp for this allocation. |
| `↳ zone` | `string` Zone in which the reservation resides. |
| `↳ description` | `string` A description while creating reservation. |
| `↳ allocation` | `string` The reservation resource name. |
| `↳ owner_project_id` | `string` |
| `↳ status` | `int` The status of the reservation. |
| `↳ share_settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.Allocation.ShareSettings` Specify share-settings to create a shared reservation. |
| `↳ auto_delete_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Absolute time in future when the reservation will be auto-deleted by Compute Engine. |

### getSpecificAllocation

Reservation for instances with specific machine shapes.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.Allocation.SpecificSKUAllocation|null` |   |

### hasSpecificAllocation

### setSpecificAllocation

Reservation for instances with specific machine shapes.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.Allocation.SpecificSKUAllocation` |

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

### getId

The unique identifier for the resource. This identifier is
defined by the server.

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

### setId

The unique identifier for the resource. This identifier is
defined by the server.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

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

### getCreateTime

The creation timestamp for this allocation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

The creation timestamp for this allocation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getZone

Zone in which the reservation resides.

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

### setZone

Zone in which the reservation resides.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getDescription

A description while creating reservation.

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

### setDescription

A description while creating reservation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getAllocation

The reservation resource name.

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

### setAllocation

The reservation resource name.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getOwnerProjectId

Generated from protobuf field `string owner_project_id = 10;`

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

### setOwnerProjectId

Generated from protobuf field `string owner_project_id = 10;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getStatus

The status of the reservation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Status](https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.Allocation.Status). |

### setStatus

The status of the reservation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Status](https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.Allocation.Status). |

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

### getShareSettings

Specify share-settings to create a shared reservation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.Allocation.ShareSettings|null` |   |

### hasShareSettings

### clearShareSettings

### setShareSettings

Specify share-settings to create a shared reservation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.Allocation.ShareSettings` |

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

### getAutoDeleteTime

Absolute time in future when the reservation will be
auto-deleted by Compute Engine.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasAutoDeleteTime

### clearAutoDeleteTime

### setAutoDeleteTime

Absolute time in future when the reservation will be
auto-deleted by Compute Engine.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getType

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