Class SetInstanceLabelsRequest.Builder (1.42.0)

public static final class SetInstanceLabelsRequest.Builder extends GeneratedMessageV3.Builder<SetInstanceLabelsRequest.Builder> implements SetInstanceLabelsRequestOrBuilder

Request for setting instance labels.

Protobuf type google.cloud.notebooks.v1.SetInstanceLabelsRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SetInstanceLabelsRequest build()
Returns
Type Description
SetInstanceLabelsRequest

buildPartial()

public SetInstanceLabelsRequest buildPartial()
Returns
Type Description
SetInstanceLabelsRequest

clear()

public SetInstanceLabelsRequest.Builder clear()
Returns
Type Description
SetInstanceLabelsRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearLabels()

public SetInstanceLabelsRequest.Builder clearLabels()
Returns
Type Description
SetInstanceLabelsRequest.Builder

clearName()

public SetInstanceLabelsRequest.Builder clearName()

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SetInstanceLabelsRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public SetInstanceLabelsRequest.Builder clone()
Returns
Type Description
SetInstanceLabelsRequest.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Labels to apply to this instance. These can be later modified by the setLabels method

map<string, string> labels = 2;

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public SetInstanceLabelsRequest getDefaultInstanceForType()
Returns
Type Description
SetInstanceLabelsRequest

getDescriptorForType()

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

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Labels to apply to this instance. These can be later modified by the setLabels method

map<string, string> labels = 2;

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Labels to apply to this instance. These can be later modified by the setLabels method

map<string, string> labels = 2;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Labels to apply to this instance. These can be later modified by the setLabels method

map<string, string> labels = 2;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Labels to apply to this instance. These can be later modified by the setLabels method

map<string, string> labels = 2;

Parameter
Name Description
key String
Returns
Type Description
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public String getName()

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for name.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SetInstanceLabelsRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllLabels(Map<String,String> values)

public SetInstanceLabelsRequest.Builder putAllLabels(Map<String,String> values)

Labels to apply to this instance. These can be later modified by the setLabels method

map<string, string> labels = 2;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
SetInstanceLabelsRequest.Builder

putLabels(String key, String value)

public SetInstanceLabelsRequest.Builder putLabels(String key, String value)

Labels to apply to this instance. These can be later modified by the setLabels method

map<string, string> labels = 2;

Parameters
Name Description
key String
value String
Returns
Type Description
SetInstanceLabelsRequest.Builder

removeLabels(String key)

public SetInstanceLabelsRequest.Builder removeLabels(String key)

Labels to apply to this instance. These can be later modified by the setLabels method

map<string, string> labels = 2;

Parameter
Name Description
key String
Returns
Type Description
SetInstanceLabelsRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public SetInstanceLabelsRequest.Builder setName(String value)

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
SetInstanceLabelsRequest.Builder

This builder for chaining.

setNameBytes(ByteString value)

public SetInstanceLabelsRequest.Builder setNameBytes(ByteString value)

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
SetInstanceLabelsRequest.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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