Class NodeGroup.Builder (0.3.0)

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

NodeGroup represents a dynamic collection of nodes that satisfy specific criteria. A node is considered part of this group if it matches the defined constraints.

Protobuf type google.cloud.apptopology.v1.NodeGroup

Implements

NodeGroupOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllAnyLabels(Iterable<String> values)

public NodeGroup.Builder addAllAnyLabels(Iterable<String> values)

Optional. A node must have at least one of these labels to be included in the group. If empty or unset, this constraint is not applied.

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

Parameter
Name Description
values Iterable<String>

The anyLabels to add.

Returns
Type Description
NodeGroup.Builder

This builder for chaining.

addAnyLabels(String value)

public NodeGroup.Builder addAnyLabels(String value)

Optional. A node must have at least one of these labels to be included in the group. If empty or unset, this constraint is not applied.

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

Parameter
Name Description
value String

The anyLabels to add.

Returns
Type Description
NodeGroup.Builder

This builder for chaining.

addAnyLabelsBytes(ByteString value)

public NodeGroup.Builder addAnyLabelsBytes(ByteString value)

Optional. A node must have at least one of these labels to be included in the group. If empty or unset, this constraint is not applied.

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

Parameter
Name Description
value ByteString

The bytes of the anyLabels 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

clearAnyLabels()

public NodeGroup.Builder clearAnyLabels()

Optional. A node must have at least one of these labels to be included in the group. If empty or unset, this constraint is not applied.

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

Returns
Type Description
NodeGroup.Builder

This builder for chaining.

getAnyLabels(int index)

public String getAnyLabels(int index)

Optional. A node must have at least one of these labels to be included in the group. If empty or unset, this constraint is not applied.

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

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The anyLabels at the given index.

getAnyLabelsBytes(int index)

public ByteString getAnyLabelsBytes(int index)

Optional. A node must have at least one of these labels to be included in the group. If empty or unset, this constraint is not applied.

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

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the anyLabels at the given index.

getAnyLabelsCount()

public int getAnyLabelsCount()

Optional. A node must have at least one of these labels to be included in the group. If empty or unset, this constraint is not applied.

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

Returns
Type Description
int

The count of anyLabels.

getAnyLabelsList()

public ProtocolStringList getAnyLabelsList()

Optional. A node must have at least one of these labels to be included in the group. If empty or unset, this constraint is not applied.

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

Returns
Type Description
ProtocolStringList

A list containing the anyLabels.

getDefaultInstanceForType()

public NodeGroup getDefaultInstanceForType()
Returns
Type Description
NodeGroup

getDescriptorForType()

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

internalGetFieldAccessorTable()

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

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

setAnyLabels(int index, String value)

public NodeGroup.Builder setAnyLabels(int index, String value)

Optional. A node must have at least one of these labels to be included in the group. If empty or unset, this constraint is not applied.

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

Parameters
Name Description
index int

The index to set the value at.

value String

The anyLabels to set.

Returns
Type Description
NodeGroup.Builder

This builder for chaining.