Package com.google.cloud.managedkafka.v1
Class Topic.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Topic.Builder>
com.google.cloud.managedkafka.v1.Topic.Builder
- All Implemented Interfaces:
TopicOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Topic
public static final class Topic.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Topic.Builder>
implements TopicOrBuilder
A Kafka topic in a given cluster.Protobuf type
google.cloud.managedkafka.v1.Topic-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Identifier.Required.Required.booleancontainsConfigs(String key) Optional.Deprecated.intOptional.Optional.getConfigsOrDefault(String key, String defaultValue) Optional.getConfigsOrThrow(String key) Optional.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDeprecated.getName()Identifier.com.google.protobuf.ByteStringIdentifier.intRequired.intRequired.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) putAllConfigs(Map<String, String> values) Optional.putConfigs(String key, String value) Optional.removeConfigs(String key) Optional.Identifier.setNameBytes(com.google.protobuf.ByteString value) Identifier.setPartitionCount(int value) Required.setReplicationFactor(int value) Required.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<Topic.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<Topic.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Topic.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Topic.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Topic.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Topic.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Topic.Builder>
-
mergeFrom
public Topic.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Topic.Builder>- Throws:
IOException
-
getName
Identifier. The name of the topic. The `topic` segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}string name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Specified by:
getNamein interfaceTopicOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Identifier. The name of the topic. The `topic` segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}string name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Specified by:
getNameBytesin interfaceTopicOrBuilder- Returns:
- The bytes for name.
-
setName
Identifier. The name of the topic. The `topic` segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}string name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
Identifier. The name of the topic. The `topic` segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}string name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Returns:
- This builder for chaining.
-
setNameBytes
Identifier. The name of the topic. The `topic` segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}string name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getPartitionCount
public int getPartitionCount()Required. The number of partitions this topic has. The partition count can only be increased, not decreased. Please note that if partitions are increased for a topic that has a key, the partitioning logic or the ordering of the messages will be affected.
int32 partition_count = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPartitionCountin interfaceTopicOrBuilder- Returns:
- The partitionCount.
-
setPartitionCount
Required. The number of partitions this topic has. The partition count can only be increased, not decreased. Please note that if partitions are increased for a topic that has a key, the partitioning logic or the ordering of the messages will be affected.
int32 partition_count = 2 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The partitionCount to set.- Returns:
- This builder for chaining.
-
clearPartitionCount
Required. The number of partitions this topic has. The partition count can only be increased, not decreased. Please note that if partitions are increased for a topic that has a key, the partitioning logic or the ordering of the messages will be affected.
int32 partition_count = 2 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
getReplicationFactor
public int getReplicationFactor()Required. Immutable. The number of replicas of each partition. A replication factor of 3 is recommended for high availability.
int32 replication_factor = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];- Specified by:
getReplicationFactorin interfaceTopicOrBuilder- Returns:
- The replicationFactor.
-
setReplicationFactor
Required. Immutable. The number of replicas of each partition. A replication factor of 3 is recommended for high availability.
int32 replication_factor = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];- Parameters:
value- The replicationFactor to set.- Returns:
- This builder for chaining.
-
clearReplicationFactor
Required. Immutable. The number of replicas of each partition. A replication factor of 3 is recommended for high availability.
int32 replication_factor = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];- Returns:
- This builder for chaining.
-
getConfigsCount
public int getConfigsCount()Description copied from interface:TopicOrBuilderOptional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: `cleanup.policy`, `compression.type`.
map<string, string> configs = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getConfigsCountin interfaceTopicOrBuilder
-
containsConfigs
Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: `cleanup.policy`, `compression.type`.
map<string, string> configs = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
containsConfigsin interfaceTopicOrBuilder
-
getConfigs
Deprecated.UsegetConfigsMap()instead.- Specified by:
getConfigsin interfaceTopicOrBuilder
-
getConfigsMap
Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: `cleanup.policy`, `compression.type`.
map<string, string> configs = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getConfigsMapin interfaceTopicOrBuilder
-
getConfigsOrDefault
Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: `cleanup.policy`, `compression.type`.
map<string, string> configs = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getConfigsOrDefaultin interfaceTopicOrBuilder
-
getConfigsOrThrow
Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: `cleanup.policy`, `compression.type`.
map<string, string> configs = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getConfigsOrThrowin interfaceTopicOrBuilder
-
clearConfigs
-
removeConfigs
Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: `cleanup.policy`, `compression.type`.
map<string, string> configs = 4 [(.google.api.field_behavior) = OPTIONAL]; -
getMutableConfigs
Deprecated.Use alternate mutation accessors instead. -
putConfigs
Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: `cleanup.policy`, `compression.type`.
map<string, string> configs = 4 [(.google.api.field_behavior) = OPTIONAL]; -
putAllConfigs
Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: `cleanup.policy`, `compression.type`.
map<string, string> configs = 4 [(.google.api.field_behavior) = OPTIONAL];
-