Interface TopicOrBuilder (1.126.6)

public interface TopicOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

containsLabels(String key)

public abstract 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

getIngestionDataSourceSettings()

public abstract IngestionDataSourceSettings getIngestionDataSourceSettings()

Optional. Settings for managed 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.

getIngestionDataSourceSettingsOrBuilder()

public abstract IngestionDataSourceSettingsOrBuilder getIngestionDataSourceSettingsOrBuilder()

Optional. Settings for managed 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 abstract 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 abstract 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 abstract Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public abstract int getLabelsCount()

Optional. See Creating and managing labels.

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

Returns
TypeDescription
int

getLabelsMap()

public abstract 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 abstract 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 abstract 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 abstract 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.

getMessageRetentionDurationOrBuilder()

public abstract 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 abstract 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.

getMessageStoragePolicyOrBuilder()

public abstract 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

getName()

public abstract 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 abstract 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 abstract 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 abstract 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.

getSchemaSettingsOrBuilder()

public abstract 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 abstract 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 abstract 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 abstract boolean hasIngestionDataSourceSettings()

Optional. Settings for managed 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 abstract 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 abstract 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 abstract 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.