Class Topic.Builder (1.127.3)

public static final class Topic.Builder extends GeneratedMessageV3.Builder<Topic.Builder> implements TopicOrBuilder

A topic resource.

Protobuf type google.pubsub.v1.Topic

Implements

TopicOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Topic build()
Returns
TypeDescription
Topic

buildPartial()

public Topic buildPartial()
Returns
TypeDescription
Topic

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearIngestionDataSourceSettings()

public Topic.Builder clearIngestionDataSourceSettings()

Optional. Settings for ingestion from a data source into this topic.

.google.pubsub.v1.IngestionDataSourceSettings ingestion_data_source_settings = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Topic.Builder

clearKmsKeyName()

public Topic.Builder clearKmsKeyName()

Optional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic.

The expected format is projects/*/locations/*/keyRings/*/cryptoKeys/*.

string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Topic.Builder

This builder for chaining.

clearLabels()

public Topic.Builder clearLabels()
Returns
TypeDescription
Topic.Builder

clearMessageRetentionDuration()

public Topic.Builder clearMessageRetentionDuration()

Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last message_retention_duration are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up to message_retention_duration in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.

.google.protobuf.Duration message_retention_duration = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Topic.Builder

clearMessageStoragePolicy()

public Topic.Builder clearMessageStoragePolicy()

Optional. Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.

.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Topic.Builder

clearName()

public Topic.Builder clearName()

Required. The name of the topic. It must have the format "projects/{project}/topics/{topic}". {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".

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

Returns
TypeDescription
Topic.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSatisfiesPzs()

public Topic.Builder clearSatisfiesPzs()

Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.

bool satisfies_pzs = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Topic.Builder

This builder for chaining.

clearSchemaSettings()

public Topic.Builder clearSchemaSettings()

Optional. Settings for validating messages published against a schema.

.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Topic.Builder

clearState()

public Topic.Builder clearState()

Output only. An output-only field indicating the state of the topic.

.google.pubsub.v1.Topic.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Topic.Builder

This builder for chaining.

clone()

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

containsLabels(String key)

public boolean containsLabels(String key)

Optional. See Creating and managing labels.

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

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public Topic getDefaultInstanceForType()
Returns
TypeDescription
Topic

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getIngestionDataSourceSettings()

public IngestionDataSourceSettings getIngestionDataSourceSettings()

Optional. Settings for ingestion from a data source into this topic.

.google.pubsub.v1.IngestionDataSourceSettings ingestion_data_source_settings = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
IngestionDataSourceSettings

The ingestionDataSourceSettings.

getIngestionDataSourceSettingsBuilder()

public IngestionDataSourceSettings.Builder getIngestionDataSourceSettingsBuilder()

Optional. Settings for ingestion from a data source into this topic.

.google.pubsub.v1.IngestionDataSourceSettings ingestion_data_source_settings = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
IngestionDataSourceSettings.Builder

getIngestionDataSourceSettingsOrBuilder()

public IngestionDataSourceSettingsOrBuilder getIngestionDataSourceSettingsOrBuilder()

Optional. Settings for ingestion from a data source into this topic.

.google.pubsub.v1.IngestionDataSourceSettings ingestion_data_source_settings = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
IngestionDataSourceSettingsOrBuilder

getKmsKeyName()

public String getKmsKeyName()

Optional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic.

The expected format is projects/*/locations/*/keyRings/*/cryptoKeys/*.

string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The kmsKeyName.

getKmsKeyNameBytes()

public ByteString getKmsKeyNameBytes()

Optional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic.

The expected format is projects/*/locations/*/keyRings/*/cryptoKeys/*.

string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for kmsKeyName.

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. See Creating and managing labels.

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

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Optional. See Creating and managing labels.

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

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Optional. See Creating and managing labels.

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

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Optional. See Creating and managing labels.

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

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMessageRetentionDuration()

public Duration getMessageRetentionDuration()

Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last message_retention_duration are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up to message_retention_duration in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.

.google.protobuf.Duration message_retention_duration = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Duration

The messageRetentionDuration.

getMessageRetentionDurationBuilder()

public Duration.Builder getMessageRetentionDurationBuilder()

Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last message_retention_duration are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up to message_retention_duration in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.

.google.protobuf.Duration message_retention_duration = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Builder

getMessageRetentionDurationOrBuilder()

public DurationOrBuilder getMessageRetentionDurationOrBuilder()

Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last message_retention_duration are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up to message_retention_duration in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.

.google.protobuf.Duration message_retention_duration = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
DurationOrBuilder

getMessageStoragePolicy()

public MessageStoragePolicy getMessageStoragePolicy()

Optional. Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.

.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
MessageStoragePolicy

The messageStoragePolicy.

getMessageStoragePolicyBuilder()

public MessageStoragePolicy.Builder getMessageStoragePolicyBuilder()

Optional. Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.

.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
MessageStoragePolicy.Builder

getMessageStoragePolicyOrBuilder()

public MessageStoragePolicyOrBuilder getMessageStoragePolicyOrBuilder()

Optional. Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.

.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
MessageStoragePolicyOrBuilder

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getName()

public String getName()

Required. The name of the topic. It must have the format "projects/{project}/topics/{topic}". {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".

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

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The name of the topic. It must have the format "projects/{project}/topics/{topic}". {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".

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

Returns
TypeDescription
ByteString

The bytes for name.

getSatisfiesPzs()

public boolean getSatisfiesPzs()

Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.

bool satisfies_pzs = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The satisfiesPzs.

getSchemaSettings()

public SchemaSettings getSchemaSettings()

Optional. Settings for validating messages published against a schema.

.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
SchemaSettings

The schemaSettings.

getSchemaSettingsBuilder()

public SchemaSettings.Builder getSchemaSettingsBuilder()

Optional. Settings for validating messages published against a schema.

.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
SchemaSettings.Builder

getSchemaSettingsOrBuilder()

public SchemaSettingsOrBuilder getSchemaSettingsOrBuilder()

Optional. Settings for validating messages published against a schema.

.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
SchemaSettingsOrBuilder

getState()

public Topic.State getState()

Output only. An output-only field indicating the state of the topic.

.google.pubsub.v1.Topic.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Topic.State

The state.

getStateValue()

public int getStateValue()

Output only. An output-only field indicating the state of the topic.

.google.pubsub.v1.Topic.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for state.

hasIngestionDataSourceSettings()

public boolean hasIngestionDataSourceSettings()

Optional. Settings for ingestion from a data source into this topic.

.google.pubsub.v1.IngestionDataSourceSettings ingestion_data_source_settings = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the ingestionDataSourceSettings field is set.

hasMessageRetentionDuration()

public boolean hasMessageRetentionDuration()

Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last message_retention_duration are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up to message_retention_duration in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.

.google.protobuf.Duration message_retention_duration = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the messageRetentionDuration field is set.

hasMessageStoragePolicy()

public boolean hasMessageStoragePolicy()

Optional. Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.

.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the messageStoragePolicy field is set.

hasSchemaSettings()

public boolean hasSchemaSettings()

Optional. Settings for validating messages published against a schema.

.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the schemaSettings field is set.

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(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(Topic other)

public Topic.Builder mergeFrom(Topic other)
Parameter
NameDescription
otherTopic
Returns
TypeDescription
Topic.Builder

mergeIngestionDataSourceSettings(IngestionDataSourceSettings value)

public Topic.Builder mergeIngestionDataSourceSettings(IngestionDataSourceSettings value)

Optional. Settings for ingestion from a data source into this topic.

.google.pubsub.v1.IngestionDataSourceSettings ingestion_data_source_settings = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueIngestionDataSourceSettings
Returns
TypeDescription
Topic.Builder

mergeMessageRetentionDuration(Duration value)

public Topic.Builder mergeMessageRetentionDuration(Duration value)

Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last message_retention_duration are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up to message_retention_duration in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.

.google.protobuf.Duration message_retention_duration = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueDuration
Returns
TypeDescription
Topic.Builder

mergeMessageStoragePolicy(MessageStoragePolicy value)

public Topic.Builder mergeMessageStoragePolicy(MessageStoragePolicy value)

Optional. Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.

.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueMessageStoragePolicy
Returns
TypeDescription
Topic.Builder

mergeSchemaSettings(SchemaSettings value)

public Topic.Builder mergeSchemaSettings(SchemaSettings value)

Optional. Settings for validating messages published against a schema.

.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueSchemaSettings
Returns
TypeDescription
Topic.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllLabels(Map<String,String> values)

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

Optional. See Creating and managing labels.

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

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

putLabels(String key, String value)

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

Optional. See Creating and managing labels.

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

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
Topic.Builder

removeLabels(String key)

public Topic.Builder removeLabels(String key)

Optional. See Creating and managing labels.

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

Parameter
NameDescription
keyString
Returns
TypeDescription
Topic.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setIngestionDataSourceSettings(IngestionDataSourceSettings value)

public Topic.Builder setIngestionDataSourceSettings(IngestionDataSourceSettings value)

Optional. Settings for ingestion from a data source into this topic.

.google.pubsub.v1.IngestionDataSourceSettings ingestion_data_source_settings = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueIngestionDataSourceSettings
Returns
TypeDescription
Topic.Builder

setIngestionDataSourceSettings(IngestionDataSourceSettings.Builder builderForValue)

public Topic.Builder setIngestionDataSourceSettings(IngestionDataSourceSettings.Builder builderForValue)

Optional. Settings for ingestion from a data source into this topic.

.google.pubsub.v1.IngestionDataSourceSettings ingestion_data_source_settings = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueIngestionDataSourceSettings.Builder
Returns
TypeDescription
Topic.Builder

setKmsKeyName(String value)

public Topic.Builder setKmsKeyName(String value)

Optional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic.

The expected format is projects/*/locations/*/keyRings/*/cryptoKeys/*.

string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The kmsKeyName to set.

Returns
TypeDescription
Topic.Builder

This builder for chaining.

setKmsKeyNameBytes(ByteString value)

public Topic.Builder setKmsKeyNameBytes(ByteString value)

Optional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic.

The expected format is projects/*/locations/*/keyRings/*/cryptoKeys/*.

string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for kmsKeyName to set.

Returns
TypeDescription
Topic.Builder

This builder for chaining.

setMessageRetentionDuration(Duration value)

public Topic.Builder setMessageRetentionDuration(Duration value)

Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last message_retention_duration are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up to message_retention_duration in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.

.google.protobuf.Duration message_retention_duration = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueDuration
Returns
TypeDescription
Topic.Builder

setMessageRetentionDuration(Duration.Builder builderForValue)

public Topic.Builder setMessageRetentionDuration(Duration.Builder builderForValue)

Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last message_retention_duration are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up to message_retention_duration in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.

.google.protobuf.Duration message_retention_duration = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Topic.Builder

setMessageStoragePolicy(MessageStoragePolicy value)

public Topic.Builder setMessageStoragePolicy(MessageStoragePolicy value)

Optional. Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.

.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueMessageStoragePolicy
Returns
TypeDescription
Topic.Builder

setMessageStoragePolicy(MessageStoragePolicy.Builder builderForValue)

public Topic.Builder setMessageStoragePolicy(MessageStoragePolicy.Builder builderForValue)

Optional. Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.

.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueMessageStoragePolicy.Builder
Returns
TypeDescription
Topic.Builder

setName(String value)

public Topic.Builder setName(String value)

Required. The name of the topic. It must have the format "projects/{project}/topics/{topic}". {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".

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

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Topic.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Topic.Builder setNameBytes(ByteString value)

Required. The name of the topic. It must have the format "projects/{project}/topics/{topic}". {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".

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

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Topic.Builder

This builder for chaining.

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

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

setSatisfiesPzs(boolean value)

public Topic.Builder setSatisfiesPzs(boolean value)

Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.

bool satisfies_pzs = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueboolean

The satisfiesPzs to set.

Returns
TypeDescription
Topic.Builder

This builder for chaining.

setSchemaSettings(SchemaSettings value)

public Topic.Builder setSchemaSettings(SchemaSettings value)

Optional. Settings for validating messages published against a schema.

.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueSchemaSettings
Returns
TypeDescription
Topic.Builder

setSchemaSettings(SchemaSettings.Builder builderForValue)

public Topic.Builder setSchemaSettings(SchemaSettings.Builder builderForValue)

Optional. Settings for validating messages published against a schema.

.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueSchemaSettings.Builder
Returns
TypeDescription
Topic.Builder

setState(Topic.State value)

public Topic.Builder setState(Topic.State value)

Output only. An output-only field indicating the state of the topic.

.google.pubsub.v1.Topic.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTopic.State

The state to set.

Returns
TypeDescription
Topic.Builder

This builder for chaining.

setStateValue(int value)

public Topic.Builder setStateValue(int value)

Output only. An output-only field indicating the state of the topic.

.google.pubsub.v1.Topic.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
Topic.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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