# Google Cloud Capacity Planner V1beta Client - Class ShareSettings (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 ShareSettings.

The share setting for reservation.

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

## Namespace

Google \\ Cloud \\ CapacityPlanner \\ V1beta \\ Allocation

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ share_type` | `int` Type of sharing for this shared-reservation |
| `↳ projects` | `string[]` A List of Project names to specify consumer projects for this shared-reservation. This is only valid when share_type's value is SPECIFIC_PROJECTS. |

### getShareType

Type of sharing for this shared-reservation

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

### setShareType

Type of sharing for this shared-reservation

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

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

### getProjects

A List of Project names to specify consumer projects for this
shared-reservation. This is only valid when share_type's value is
SPECIFIC_PROJECTS.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setProjects

A List of Project names to specify consumer projects for this
shared-reservation. This is only valid when share_type's value is
SPECIFIC_PROJECTS.

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

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