Class ClusterSelector.Builder (4.38.0)

public static final class ClusterSelector.Builder extends GeneratedMessageV3.Builder<ClusterSelector.Builder> implements ClusterSelectorOrBuilder

A selector that chooses target cluster for jobs based on metadata.

Protobuf type google.cloud.dataproc.v1.ClusterSelector

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ClusterSelector build()
Returns
TypeDescription
ClusterSelector

buildPartial()

public ClusterSelector buildPartial()
Returns
TypeDescription
ClusterSelector

clear()

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

clearClusterLabels()

public ClusterSelector.Builder clearClusterLabels()
Returns
TypeDescription
ClusterSelector.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearZone()

public ClusterSelector.Builder clearZone()

Optional. The zone where workflow process executes. This parameter does not affect the selection of the cluster.

If unspecified, the zone of the first cluster matching the selector is used.

string zone = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ClusterSelector.Builder

This builder for chaining.

clone()

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

containsClusterLabels(String key)

public boolean containsClusterLabels(String key)

Required. The cluster labels. Cluster must have all labels to match.

map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getClusterLabels() (deprecated)

public Map<String,String> getClusterLabels()
Returns
TypeDescription
Map<String,String>

getClusterLabelsCount()

public int getClusterLabelsCount()

Required. The cluster labels. Cluster must have all labels to match.

map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

getClusterLabelsMap()

public Map<String,String> getClusterLabelsMap()

Required. The cluster labels. Cluster must have all labels to match.

map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Map<String,String>

getClusterLabelsOrDefault(String key, String defaultValue)

public String getClusterLabelsOrDefault(String key, String defaultValue)

Required. The cluster labels. Cluster must have all labels to match.

map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getClusterLabelsOrThrow(String key)

public String getClusterLabelsOrThrow(String key)

Required. The cluster labels. Cluster must have all labels to match.

map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getDefaultInstanceForType()

public ClusterSelector getDefaultInstanceForType()
Returns
TypeDescription
ClusterSelector

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMutableClusterLabels() (deprecated)

public Map<String,String> getMutableClusterLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getZone()

public String getZone()

Optional. The zone where workflow process executes. This parameter does not affect the selection of the cluster.

If unspecified, the zone of the first cluster matching the selector is used.

string zone = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The zone.

getZoneBytes()

public ByteString getZoneBytes()

Optional. The zone where workflow process executes. This parameter does not affect the selection of the cluster.

If unspecified, the zone of the first cluster matching the selector is used.

string zone = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for zone.

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(ClusterSelector other)

public ClusterSelector.Builder mergeFrom(ClusterSelector other)
Parameter
NameDescription
otherClusterSelector
Returns
TypeDescription
ClusterSelector.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllClusterLabels(Map<String,String> values)

public ClusterSelector.Builder putAllClusterLabels(Map<String,String> values)

Required. The cluster labels. Cluster must have all labels to match.

map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];

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

putClusterLabels(String key, String value)

public ClusterSelector.Builder putClusterLabels(String key, String value)

Required. The cluster labels. Cluster must have all labels to match.

map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
ClusterSelector.Builder

removeClusterLabels(String key)

public ClusterSelector.Builder removeClusterLabels(String key)

Required. The cluster labels. Cluster must have all labels to match.

map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
keyString
Returns
TypeDescription
ClusterSelector.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setZone(String value)

public ClusterSelector.Builder setZone(String value)

Optional. The zone where workflow process executes. This parameter does not affect the selection of the cluster.

If unspecified, the zone of the first cluster matching the selector is used.

string zone = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The zone to set.

Returns
TypeDescription
ClusterSelector.Builder

This builder for chaining.

setZoneBytes(ByteString value)

public ClusterSelector.Builder setZoneBytes(ByteString value)

Optional. The zone where workflow process executes. This parameter does not affect the selection of the cluster.

If unspecified, the zone of the first cluster matching the selector is used.

string zone = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for zone to set.

Returns
TypeDescription
ClusterSelector.Builder

This builder for chaining.