Class Cluster.Builder (0.7.0)

public static final class Cluster.Builder extends GeneratedMessageV3.Builder<Cluster.Builder> implements ClusterOrBuilder

An Apache Kafka cluster deployed in a location.

Protobuf type google.cloud.managedkafka.v1.Cluster

Implements

ClusterOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Cluster build()
Returns
Type Description
Cluster

buildPartial()

public Cluster buildPartial()
Returns
Type Description
Cluster

clear()

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

clearCapacityConfig()

public Cluster.Builder clearCapacityConfig()

Required. Capacity configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.CapacityConfig capacity_config = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Cluster.Builder

clearCreateTime()

public Cluster.Builder clearCreateTime()

Output only. The time when the cluster was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Cluster.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearGcpConfig()

public Cluster.Builder clearGcpConfig()

Required. Configuration properties for a Kafka cluster deployed to Google Cloud Platform.

.google.cloud.managedkafka.v1.GcpConfig gcp_config = 9 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Cluster.Builder

clearLabels()

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

clearName()

public Cluster.Builder clearName()

Identifier. The name of the cluster. Structured like: projects/{project_number}/locations/{location}/clusters/{cluster_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
Cluster.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPlatformConfig()

public Cluster.Builder clearPlatformConfig()
Returns
Type Description
Cluster.Builder

clearRebalanceConfig()

public Cluster.Builder clearRebalanceConfig()

Optional. Rebalance configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.RebalanceConfig rebalance_config = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Cluster.Builder

clearState()

public Cluster.Builder clearState()

Output only. The current state of the cluster.

.google.cloud.managedkafka.v1.Cluster.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Cluster.Builder

This builder for chaining.

clearUpdateTime()

public Cluster.Builder clearUpdateTime()

Output only. The time when the cluster was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Cluster.Builder

clone()

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

containsLabels(String key)

public boolean containsLabels(String key)

Optional. Labels as key value pairs.

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

Parameter
Name Description
key String
Returns
Type Description
boolean

getCapacityConfig()

public CapacityConfig getCapacityConfig()

Required. Capacity configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.CapacityConfig capacity_config = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CapacityConfig

The capacityConfig.

getCapacityConfigBuilder()

public CapacityConfig.Builder getCapacityConfigBuilder()

Required. Capacity configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.CapacityConfig capacity_config = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CapacityConfig.Builder

getCapacityConfigOrBuilder()

public CapacityConfigOrBuilder getCapacityConfigOrBuilder()

Required. Capacity configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.CapacityConfig capacity_config = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CapacityConfigOrBuilder

getCreateTime()

public Timestamp getCreateTime()

Output only. The time when the cluster was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time when the cluster was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time when the cluster was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Cluster getDefaultInstanceForType()
Returns
Type Description
Cluster

getDescriptorForType()

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

getGcpConfig()

public GcpConfig getGcpConfig()

Required. Configuration properties for a Kafka cluster deployed to Google Cloud Platform.

.google.cloud.managedkafka.v1.GcpConfig gcp_config = 9 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GcpConfig

The gcpConfig.

getGcpConfigBuilder()

public GcpConfig.Builder getGcpConfigBuilder()

Required. Configuration properties for a Kafka cluster deployed to Google Cloud Platform.

.google.cloud.managedkafka.v1.GcpConfig gcp_config = 9 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GcpConfig.Builder

getGcpConfigOrBuilder()

public GcpConfigOrBuilder getGcpConfigOrBuilder()

Required. Configuration properties for a Kafka cluster deployed to Google Cloud Platform.

.google.cloud.managedkafka.v1.GcpConfig gcp_config = 9 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GcpConfigOrBuilder

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. Labels as key value pairs.

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

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Optional. Labels as key value pairs.

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. Labels as key value pairs.

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. Labels as key value pairs.

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

Identifier. The name of the cluster. Structured like: projects/{project_number}/locations/{location}/clusters/{cluster_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The name of the cluster. Structured like: projects/{project_number}/locations/{location}/clusters/{cluster_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getPlatformConfigCase()

public Cluster.PlatformConfigCase getPlatformConfigCase()
Returns
Type Description
Cluster.PlatformConfigCase

getRebalanceConfig()

public RebalanceConfig getRebalanceConfig()

Optional. Rebalance configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.RebalanceConfig rebalance_config = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
RebalanceConfig

The rebalanceConfig.

getRebalanceConfigBuilder()

public RebalanceConfig.Builder getRebalanceConfigBuilder()

Optional. Rebalance configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.RebalanceConfig rebalance_config = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
RebalanceConfig.Builder

getRebalanceConfigOrBuilder()

public RebalanceConfigOrBuilder getRebalanceConfigOrBuilder()

Optional. Rebalance configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.RebalanceConfig rebalance_config = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
RebalanceConfigOrBuilder

getState()

public Cluster.State getState()

Output only. The current state of the cluster.

.google.cloud.managedkafka.v1.Cluster.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Cluster.State

The state.

getStateValue()

public int getStateValue()

Output only. The current state of the cluster.

.google.cloud.managedkafka.v1.Cluster.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The time when the cluster was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. The time when the cluster was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time when the cluster was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCapacityConfig()

public boolean hasCapacityConfig()

Required. Capacity configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.CapacityConfig capacity_config = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the capacityConfig field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. The time when the cluster was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasGcpConfig()

public boolean hasGcpConfig()

Required. Configuration properties for a Kafka cluster deployed to Google Cloud Platform.

.google.cloud.managedkafka.v1.GcpConfig gcp_config = 9 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the gcpConfig field is set.

hasRebalanceConfig()

public boolean hasRebalanceConfig()

Optional. Rebalance configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.RebalanceConfig rebalance_config = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the rebalanceConfig field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The time when the cluster was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime 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

mergeCapacityConfig(CapacityConfig value)

public Cluster.Builder mergeCapacityConfig(CapacityConfig value)

Required. Capacity configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.CapacityConfig capacity_config = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value CapacityConfig
Returns
Type Description
Cluster.Builder

mergeCreateTime(Timestamp value)

public Cluster.Builder mergeCreateTime(Timestamp value)

Output only. The time when the cluster was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Cluster.Builder

mergeFrom(Cluster other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeGcpConfig(GcpConfig value)

public Cluster.Builder mergeGcpConfig(GcpConfig value)

Required. Configuration properties for a Kafka cluster deployed to Google Cloud Platform.

.google.cloud.managedkafka.v1.GcpConfig gcp_config = 9 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value GcpConfig
Returns
Type Description
Cluster.Builder

mergeRebalanceConfig(RebalanceConfig value)

public Cluster.Builder mergeRebalanceConfig(RebalanceConfig value)

Optional. Rebalance configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.RebalanceConfig rebalance_config = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value RebalanceConfig
Returns
Type Description
Cluster.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public Cluster.Builder mergeUpdateTime(Timestamp value)

Output only. The time when the cluster was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Cluster.Builder

putAllLabels(Map<String,String> values)

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

Optional. Labels as key value pairs.

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

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

putLabels(String key, String value)

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

Optional. Labels as key value pairs.

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

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

removeLabels(String key)

public Cluster.Builder removeLabels(String key)

Optional. Labels as key value pairs.

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

Parameter
Name Description
key String
Returns
Type Description
Cluster.Builder

setCapacityConfig(CapacityConfig value)

public Cluster.Builder setCapacityConfig(CapacityConfig value)

Required. Capacity configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.CapacityConfig capacity_config = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value CapacityConfig
Returns
Type Description
Cluster.Builder

setCapacityConfig(CapacityConfig.Builder builderForValue)

public Cluster.Builder setCapacityConfig(CapacityConfig.Builder builderForValue)

Required. Capacity configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.CapacityConfig capacity_config = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue CapacityConfig.Builder
Returns
Type Description
Cluster.Builder

setCreateTime(Timestamp value)

public Cluster.Builder setCreateTime(Timestamp value)

Output only. The time when the cluster was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Cluster.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Cluster.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time when the cluster was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Cluster.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setGcpConfig(GcpConfig value)

public Cluster.Builder setGcpConfig(GcpConfig value)

Required. Configuration properties for a Kafka cluster deployed to Google Cloud Platform.

.google.cloud.managedkafka.v1.GcpConfig gcp_config = 9 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value GcpConfig
Returns
Type Description
Cluster.Builder

setGcpConfig(GcpConfig.Builder builderForValue)

public Cluster.Builder setGcpConfig(GcpConfig.Builder builderForValue)

Required. Configuration properties for a Kafka cluster deployed to Google Cloud Platform.

.google.cloud.managedkafka.v1.GcpConfig gcp_config = 9 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue GcpConfig.Builder
Returns
Type Description
Cluster.Builder

setName(String value)

public Cluster.Builder setName(String value)

Identifier. The name of the cluster. Structured like: projects/{project_number}/locations/{location}/clusters/{cluster_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Cluster.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Cluster.Builder setNameBytes(ByteString value)

Identifier. The name of the cluster. Structured like: projects/{project_number}/locations/{location}/clusters/{cluster_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Cluster.Builder

This builder for chaining.

setRebalanceConfig(RebalanceConfig value)

public Cluster.Builder setRebalanceConfig(RebalanceConfig value)

Optional. Rebalance configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.RebalanceConfig rebalance_config = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value RebalanceConfig
Returns
Type Description
Cluster.Builder

setRebalanceConfig(RebalanceConfig.Builder builderForValue)

public Cluster.Builder setRebalanceConfig(RebalanceConfig.Builder builderForValue)

Optional. Rebalance configuration for the Kafka cluster.

.google.cloud.managedkafka.v1.RebalanceConfig rebalance_config = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue RebalanceConfig.Builder
Returns
Type Description
Cluster.Builder

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

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

setState(Cluster.State value)

public Cluster.Builder setState(Cluster.State value)

Output only. The current state of the cluster.

.google.cloud.managedkafka.v1.Cluster.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Cluster.State

The state to set.

Returns
Type Description
Cluster.Builder

This builder for chaining.

setStateValue(int value)

public Cluster.Builder setStateValue(int value)

Output only. The current state of the cluster.

.google.cloud.managedkafka.v1.Cluster.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

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

Returns
Type Description
Cluster.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public Cluster.Builder setUpdateTime(Timestamp value)

Output only. The time when the cluster was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Cluster.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Cluster.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. The time when the cluster was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Cluster.Builder