Class ResourceLabels.Builder (2.33.0)

public static final class ResourceLabels.Builder extends GeneratedMessageV3.Builder<ResourceLabels.Builder> implements ResourceLabelsOrBuilder

Collection of GCP labels.

Protobuf type google.container.v1beta1.ResourceLabels

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ResourceLabels build()
Returns
TypeDescription
ResourceLabels

buildPartial()

public ResourceLabels buildPartial()
Returns
TypeDescription
ResourceLabels

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearLabels()

public ResourceLabels.Builder clearLabels()
Returns
TypeDescription
ResourceLabels.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public ResourceLabels.Builder clone()
Returns
TypeDescription
ResourceLabels.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Map of node label keys and node label values.

map<string, string> labels = 1;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public ResourceLabels getDefaultInstanceForType()
Returns
TypeDescription
ResourceLabels

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Map of node label keys and node label values.

map<string, string> labels = 1;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Map of node label keys and node label values.

map<string, string> labels = 1;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Map of node label keys and node label values.

map<string, string> labels = 1;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Map of node label keys and node label values.

map<string, string> labels = 1;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ResourceLabels other)

public ResourceLabels.Builder mergeFrom(ResourceLabels other)
Parameter
NameDescription
otherResourceLabels
Returns
TypeDescription
ResourceLabels.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ResourceLabels.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ResourceLabels.Builder
Overrides

putAllLabels(Map<String,String> values)

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

Map of node label keys and node label values.

map<string, string> labels = 1;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
ResourceLabels.Builder

putLabels(String key, String value)

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

Map of node label keys and node label values.

map<string, string> labels = 1;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
ResourceLabels.Builder

removeLabels(String key)

public ResourceLabels.Builder removeLabels(String key)

Map of node label keys and node label values.

map<string, string> labels = 1;

Parameter
NameDescription
keyString
Returns
TypeDescription
ResourceLabels.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public ResourceLabels.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ResourceLabels.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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