Class NodeGroup.Builder (4.39.0)

public static final class NodeGroup.Builder extends GeneratedMessageV3.Builder<NodeGroup.Builder> implements NodeGroupOrBuilder

Dataproc Node Group. The Dataproc NodeGroup resource is not related to the Dataproc NodeGroupAffinity resource.

Protobuf type google.cloud.dataproc.v1.NodeGroup

Implements

NodeGroupOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllRoles(Iterable<? extends NodeGroup.Role> values)

public NodeGroup.Builder addAllRoles(Iterable<? extends NodeGroup.Role> values)

Required. Node group roles.

repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<? extends com.google.cloud.dataproc.v1.NodeGroup.Role>

The roles to add.

Returns
Type Description
NodeGroup.Builder

This builder for chaining.

addAllRolesValue(Iterable<Integer> values)

public NodeGroup.Builder addAllRolesValue(Iterable<Integer> values)

Required. Node group roles.

repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<Integer>

The enum numeric values on the wire for roles to add.

Returns
Type Description
NodeGroup.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addRoles(NodeGroup.Role value)

public NodeGroup.Builder addRoles(NodeGroup.Role value)

Required. Node group roles.

repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value NodeGroup.Role

The roles to add.

Returns
Type Description
NodeGroup.Builder

This builder for chaining.

addRolesValue(int value)

public NodeGroup.Builder addRolesValue(int value)

Required. Node group roles.

repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for roles to add.

Returns
Type Description
NodeGroup.Builder

This builder for chaining.

build()

public NodeGroup build()
Returns
Type Description
NodeGroup

buildPartial()

public NodeGroup buildPartial()
Returns
Type Description
NodeGroup

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearLabels()

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

clearName()

public NodeGroup.Builder clearName()

The Node group resource name.

string name = 1;

Returns
Type Description
NodeGroup.Builder

This builder for chaining.

clearNodeGroupConfig()

public NodeGroup.Builder clearNodeGroupConfig()

Optional. The node group instance group configuration.

.google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
NodeGroup.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRoles()

public NodeGroup.Builder clearRoles()

Required. Node group roles.

repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
NodeGroup.Builder

This builder for chaining.

clone()

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

containsLabels(String key)

public boolean containsLabels(String key)

Optional. Node group labels.

  • Label keys must consist of from 1 to 63 characters and conform to RFC 1035.
  • Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035.
  • The node group must have no more than 32 labels.

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public NodeGroup getDefaultInstanceForType()
Returns
Type Description
NodeGroup

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

Optional. Node group labels.

  • Label keys must consist of from 1 to 63 characters and conform to RFC 1035.
  • Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035.
  • The node group must have no more than 32 labels.

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Optional. Node group labels.

  • Label keys must consist of from 1 to 63 characters and conform to RFC 1035.
  • Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035.
  • The node group must have no more than 32 labels.

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Optional. Node group labels.

  • Label keys must consist of from 1 to 63 characters and conform to RFC 1035.
  • Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035.
  • The node group must have no more than 32 labels.

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Optional. Node group labels.

  • Label keys must consist of from 1 to 63 characters and conform to RFC 1035.
  • Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035.
  • The node group must have no more than 32 labels.

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

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

The Node group resource name.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The Node group resource name.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getNodeGroupConfig()

public InstanceGroupConfig getNodeGroupConfig()

Optional. The node group instance group configuration.

.google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
InstanceGroupConfig

The nodeGroupConfig.

getNodeGroupConfigBuilder()

public InstanceGroupConfig.Builder getNodeGroupConfigBuilder()

Optional. The node group instance group configuration.

.google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
InstanceGroupConfig.Builder

getNodeGroupConfigOrBuilder()

public InstanceGroupConfigOrBuilder getNodeGroupConfigOrBuilder()

Optional. The node group instance group configuration.

.google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
InstanceGroupConfigOrBuilder

getRoles(int index)

public NodeGroup.Role getRoles(int index)

Required. Node group roles.

repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
NodeGroup.Role

The roles at the given index.

getRolesCount()

public int getRolesCount()

Required. Node group roles.

repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of roles.

getRolesList()

public List<NodeGroup.Role> getRolesList()

Required. Node group roles.

repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Role>

A list containing the roles.

getRolesValue(int index)

public int getRolesValue(int index)

Required. Node group roles.

repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of roles at the given index.

getRolesValueList()

public List<Integer> getRolesValueList()

Required. Node group roles.

repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for roles.

hasNodeGroupConfig()

public boolean hasNodeGroupConfig()

Optional. The node group instance group configuration.

.google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the nodeGroupConfig field is set.

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

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeNodeGroupConfig(InstanceGroupConfig value)

public NodeGroup.Builder mergeNodeGroupConfig(InstanceGroupConfig value)

Optional. The node group instance group configuration.

.google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value InstanceGroupConfig
Returns
Type Description
NodeGroup.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllLabels(Map<String,String> values)

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

Optional. Node group labels.

  • Label keys must consist of from 1 to 63 characters and conform to RFC 1035.
  • Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035.
  • The node group must have no more than 32 labels.

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

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

putLabels(String key, String value)

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

Optional. Node group labels.

  • Label keys must consist of from 1 to 63 characters and conform to RFC 1035.
  • Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035.
  • The node group must have no more than 32 labels.

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

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

removeLabels(String key)

public NodeGroup.Builder removeLabels(String key)

Optional. Node group labels.

  • Label keys must consist of from 1 to 63 characters and conform to RFC 1035.
  • Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035.
  • The node group must have no more than 32 labels.

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
NodeGroup.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public NodeGroup.Builder setName(String value)

The Node group resource name.

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
NodeGroup.Builder

This builder for chaining.

setNameBytes(ByteString value)

public NodeGroup.Builder setNameBytes(ByteString value)

The Node group resource name.

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
NodeGroup.Builder

This builder for chaining.

setNodeGroupConfig(InstanceGroupConfig value)

public NodeGroup.Builder setNodeGroupConfig(InstanceGroupConfig value)

Optional. The node group instance group configuration.

.google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value InstanceGroupConfig
Returns
Type Description
NodeGroup.Builder

setNodeGroupConfig(InstanceGroupConfig.Builder builderForValue)

public NodeGroup.Builder setNodeGroupConfig(InstanceGroupConfig.Builder builderForValue)

Optional. The node group instance group configuration.

.google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue InstanceGroupConfig.Builder
Returns
Type Description
NodeGroup.Builder

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

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

setRoles(int index, NodeGroup.Role value)

public NodeGroup.Builder setRoles(int index, NodeGroup.Role value)

Required. Node group roles.

repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value NodeGroup.Role

The roles to set.

Returns
Type Description
NodeGroup.Builder

This builder for chaining.

setRolesValue(int index, int value)

public NodeGroup.Builder setRolesValue(int index, int value)

Required. Node group roles.

repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value int

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

Returns
Type Description
NodeGroup.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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