Package com.google.pubsub.v1
Interface TopicOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
Topic
,Topic.Builder
public interface TopicOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsLabels
(String key) Optional.Optional.Optional.Optional.com.google.protobuf.ByteString
Optional.Deprecated.int
Optional.Optional.getLabelsOrDefault
(String key, String defaultValue) Optional.getLabelsOrThrow
(String key) Optional.com.google.protobuf.Duration
Optional.com.google.protobuf.DurationOrBuilder
Optional.Optional.Optional.getName()
Required.com.google.protobuf.ByteString
Required.boolean
Optional.Optional.Optional.getState()
Output only.int
Output only.boolean
Optional.boolean
Optional.boolean
Optional.boolean
Optional.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getName
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:
- The name.
-
getNameBytes
com.google.protobuf.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:
- The bytes for name.
-
getLabelsCount
int getLabelsCount()Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
-
containsLabels
Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
-
getLabels
Deprecated.UsegetLabelsMap()
instead. -
getLabelsMap
Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
-
getLabelsOrDefault
Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
-
getLabelsOrThrow
Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
-
hasMessageStoragePolicy
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:
- Whether the messageStoragePolicy field is set.
-
getMessageStoragePolicy
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:
- The messageStoragePolicy.
-
getMessageStoragePolicyOrBuilder
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];
-
getKmsKeyName
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:
- The kmsKeyName.
-
getKmsKeyNameBytes
com.google.protobuf.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:
- The bytes for kmsKeyName.
-
hasSchemaSettings
boolean hasSchemaSettings()Optional. Settings for validating messages published against a schema.
.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];
- Returns:
- Whether the schemaSettings field is set.
-
getSchemaSettings
SchemaSettings getSchemaSettings()Optional. Settings for validating messages published against a schema.
.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];
- Returns:
- The schemaSettings.
-
getSchemaSettingsOrBuilder
SchemaSettingsOrBuilder getSchemaSettingsOrBuilder()Optional. Settings for validating messages published against a schema.
.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];
-
getSatisfiesPzs
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:
- The satisfiesPzs.
-
hasMessageRetentionDuration
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](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) 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:
- Whether the messageRetentionDuration field is set.
-
getMessageRetentionDuration
com.google.protobuf.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](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) 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:
- The messageRetentionDuration.
-
getMessageRetentionDurationOrBuilder
com.google.protobuf.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](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) 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];
-
getStateValue
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:
- The enum numeric value on the wire for state.
-
getState
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:
- The state.
-
hasIngestionDataSourceSettings
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:
- Whether the ingestionDataSourceSettings field is set.
-
getIngestionDataSourceSettings
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:
- The ingestionDataSourceSettings.
-
getIngestionDataSourceSettingsOrBuilder
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];
-