Class Allocation.ShareSettings.Builder (0.1.0)

public static final class Allocation.ShareSettings.Builder extends GeneratedMessageV3.Builder<Allocation.ShareSettings.Builder> implements Allocation.ShareSettingsOrBuilder

The share setting for reservation.

Protobuf type google.cloud.capacityplanner.v1beta.Allocation.ShareSettings

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllProjects(Iterable<String> values)

public Allocation.ShareSettings.Builder addAllProjects(Iterable<String> values)

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
values Iterable<String>

The projects to add.

Returns
Type Description
Allocation.ShareSettings.Builder

This builder for chaining.

addProjects(String value)

public Allocation.ShareSettings.Builder addProjects(String value)

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
value String

The projects to add.

Returns
Type Description
Allocation.ShareSettings.Builder

This builder for chaining.

addProjectsBytes(ByteString value)

public Allocation.ShareSettings.Builder addProjectsBytes(ByteString value)

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
value ByteString

The bytes of the projects to add.

Returns
Type Description
Allocation.ShareSettings.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Allocation.ShareSettings.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Allocation.ShareSettings.Builder
Overrides

build()

public Allocation.ShareSettings build()
Returns
Type Description
Allocation.ShareSettings

buildPartial()

public Allocation.ShareSettings buildPartial()
Returns
Type Description
Allocation.ShareSettings

clear()

public Allocation.ShareSettings.Builder clear()
Returns
Type Description
Allocation.ShareSettings.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Allocation.ShareSettings.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Allocation.ShareSettings.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Allocation.ShareSettings.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Allocation.ShareSettings.Builder
Overrides

clearProjects()

public Allocation.ShareSettings.Builder clearProjects()

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
Allocation.ShareSettings.Builder

This builder for chaining.

clearShareType()

public Allocation.ShareSettings.Builder clearShareType()

Type of sharing for this shared-reservation

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

Returns
Type Description
Allocation.ShareSettings.Builder

This builder for chaining.

clone()

public Allocation.ShareSettings.Builder clone()
Returns
Type Description
Allocation.ShareSettings.Builder
Overrides

getDefaultInstanceForType()

public Allocation.ShareSettings getDefaultInstanceForType()
Returns
Type Description
Allocation.ShareSettings

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getProjects(int index)

public 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 int

The index of the element to return.

Returns
Type Description
String

The projects at the given index.

getProjectsBytes(int index)

public 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 int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the projects at the given index.

getProjectsCount()

public 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
int

The count of projects.

getProjectsList()

public ProtocolStringList 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
ProtocolStringList

A list containing the projects.

getShareType()

public Allocation.ShareSettings.ShareType getShareType()

Type of sharing for this shared-reservation

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

Returns
Type Description
Allocation.ShareSettings.ShareType

The shareType.

getShareTypeValue()

public int getShareTypeValue()

Type of sharing for this shared-reservation

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

Returns
Type Description
int

The enum numeric value on the wire for shareType.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Allocation.ShareSettings other)

public Allocation.ShareSettings.Builder mergeFrom(Allocation.ShareSettings other)
Parameter
Name Description
other Allocation.ShareSettings
Returns
Type Description
Allocation.ShareSettings.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Allocation.ShareSettings.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Allocation.ShareSettings.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Allocation.ShareSettings.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Allocation.ShareSettings.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Allocation.ShareSettings.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Allocation.ShareSettings.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Allocation.ShareSettings.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Allocation.ShareSettings.Builder
Overrides

setProjects(int index, String value)

public Allocation.ShareSettings.Builder setProjects(int index, String value)

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;

Parameters
Name Description
index int

The index to set the value at.

value String

The projects to set.

Returns
Type Description
Allocation.ShareSettings.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Allocation.ShareSettings.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Allocation.ShareSettings.Builder
Overrides

setShareType(Allocation.ShareSettings.ShareType value)

public Allocation.ShareSettings.Builder setShareType(Allocation.ShareSettings.ShareType value)

Type of sharing for this shared-reservation

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

Parameter
Name Description
value Allocation.ShareSettings.ShareType

The shareType to set.

Returns
Type Description
Allocation.ShareSettings.Builder

This builder for chaining.

setShareTypeValue(int value)

public Allocation.ShareSettings.Builder setShareTypeValue(int value)

Type of sharing for this shared-reservation

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

Parameter
Name Description
value int

The enum numeric value on the wire for shareType to set.

Returns
Type Description
Allocation.ShareSettings.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Allocation.ShareSettings.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Allocation.ShareSettings.Builder
Overrides