# Interface Allocation.ShareSettingsOrBuilder (0.16.0)

0.16.0 (latest) 0.14.0 0.11.0 0.10.0 0.8.0 0.6.0 0.5.0 0.4.0 0.3.0 0.1.0

    public static interface Allocation.ShareSettingsOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getProjects(int index)

    public abstract String getProjects(int index)

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.

`repeated string projects = 2;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The projects at the given index. |

### getProjectsBytes(int index)

    public abstract ByteString getProjectsBytes(int index)

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.

`repeated string projects = 2;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the projects at the given index. |

### getProjectsCount()

    public abstract int getProjectsCount()

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.

`repeated string projects = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of projects. |

### getProjectsList()

    public abstract List<String> getProjectsList()

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.

`repeated string projects = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the projects. |

### getShareType()

    public abstract Allocation.ShareSettings.ShareType getShareType()

Type of sharing for this shared-reservation

`.google.cloud.capacityplanner.v1beta.Allocation.ShareSettings.ShareType share_type = 1;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-capacityplanner/latest/com.google.cloud.capacityplanner.v1beta.Allocation.ShareSettings.ShareType` | The shareType. |

### getShareTypeValue()

    public abstract int getShareTypeValue()

Type of sharing for this shared-reservation

`.google.cloud.capacityplanner.v1beta.Allocation.ShareSettings.ShareType share_type = 1;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for shareType. |