Class SetInstanceLabelsRequest.Builder (1.34.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SetInstanceLabelsRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SetInstanceLabelsRequest.Builder
Overrides

build()

public SetInstanceLabelsRequest build()
Returns
TypeDescription
SetInstanceLabelsRequest

buildPartial()

public SetInstanceLabelsRequest buildPartial()
Returns
TypeDescription
SetInstanceLabelsRequest

clear()

public SetInstanceLabelsRequest.Builder clear()
Returns
TypeDescription
SetInstanceLabelsRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public SetInstanceLabelsRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
SetInstanceLabelsRequest.Builder
Overrides

clearLabels()

public SetInstanceLabelsRequest.Builder clearLabels()
Returns
TypeDescription
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
TypeDescription
SetInstanceLabelsRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SetInstanceLabelsRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
SetInstanceLabelsRequest.Builder
Overrides

clone()

public SetInstanceLabelsRequest.Builder clone()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public SetInstanceLabelsRequest getDefaultInstanceForType()
Returns
TypeDescription
SetInstanceLabelsRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SetInstanceLabelsRequest other)

public SetInstanceLabelsRequest.Builder mergeFrom(SetInstanceLabelsRequest other)
Parameter
NameDescription
otherSetInstanceLabelsRequest
Returns
TypeDescription
SetInstanceLabelsRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SetInstanceLabelsRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SetInstanceLabelsRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public SetInstanceLabelsRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
SetInstanceLabelsRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SetInstanceLabelsRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuesMap<String,String>
Returns
TypeDescription
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
NameDescription
keyString
valueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
SetInstanceLabelsRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public SetInstanceLabelsRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
SetInstanceLabelsRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SetInstanceLabelsRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SetInstanceLabelsRequest.Builder
Overrides