Class Topic

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.pubsub.v1.Topic
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, TopicOrBuilder, Serializable

public final class Topic extends com.google.protobuf.GeneratedMessageV3 implements TopicOrBuilder
 A topic resource.
 
Protobuf type google.pubsub.v1.Topic
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • LABELS_FIELD_NUMBER

      public static final int LABELS_FIELD_NUMBER
      See Also:
    • MESSAGE_STORAGE_POLICY_FIELD_NUMBER

      public static final int MESSAGE_STORAGE_POLICY_FIELD_NUMBER
      See Also:
    • KMS_KEY_NAME_FIELD_NUMBER

      public static final int KMS_KEY_NAME_FIELD_NUMBER
      See Also:
    • SCHEMA_SETTINGS_FIELD_NUMBER

      public static final int SCHEMA_SETTINGS_FIELD_NUMBER
      See Also:
    • SATISFIES_PZS_FIELD_NUMBER

      public static final int SATISFIES_PZS_FIELD_NUMBER
      See Also:
    • MESSAGE_RETENTION_DURATION_FIELD_NUMBER

      public static final int MESSAGE_RETENTION_DURATION_FIELD_NUMBER
      See Also:
    • STATE_FIELD_NUMBER

      public static final int STATE_FIELD_NUMBER
      See Also:
    • INGESTION_DATA_SOURCE_SETTINGS_FIELD_NUMBER

      public static final int INGESTION_DATA_SOURCE_SETTINGS_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapField

      protected com.google.protobuf.MapField internalGetMapField(int number)
      Overrides:
      internalGetMapField in class com.google.protobuf.GeneratedMessageV3
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • 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];
      Specified by:
      getName in interface TopicOrBuilder
      Returns:
      The name.
    • getNameBytes

      public 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];
      Specified by:
      getNameBytes in interface TopicOrBuilder
      Returns:
      The bytes for name.
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: TopicOrBuilder
       Optional. See [Creating and managing labels]
       (https://cloud.google.com/pubsub/docs/labels).
       
      map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsCount in interface TopicOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Optional. See [Creating and managing labels]
       (https://cloud.google.com/pubsub/docs/labels).
       
      map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsLabels in interface TopicOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface TopicOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Optional. See [Creating and managing labels]
       (https://cloud.google.com/pubsub/docs/labels).
       
      map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsMap in interface TopicOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Optional. See [Creating and managing labels]
       (https://cloud.google.com/pubsub/docs/labels).
       
      map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrDefault in interface TopicOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Optional. See [Creating and managing labels]
       (https://cloud.google.com/pubsub/docs/labels).
       
      map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrThrow in interface TopicOrBuilder
    • 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];
      Specified by:
      hasMessageStoragePolicy in interface TopicOrBuilder
      Returns:
      Whether the messageStoragePolicy field is set.
    • 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];
      Specified by:
      getMessageStoragePolicy in interface TopicOrBuilder
      Returns:
      The messageStoragePolicy.
    • 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];
      Specified by:
      getMessageStoragePolicyOrBuilder in interface TopicOrBuilder
    • 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];
      Specified by:
      getKmsKeyName in interface TopicOrBuilder
      Returns:
      The kmsKeyName.
    • getKmsKeyNameBytes

      public 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];
      Specified by:
      getKmsKeyNameBytes in interface TopicOrBuilder
      Returns:
      The bytes for kmsKeyName.
    • 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];
      Specified by:
      hasSchemaSettings in interface TopicOrBuilder
      Returns:
      Whether the schemaSettings field is set.
    • 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];
      Specified by:
      getSchemaSettings in interface TopicOrBuilder
      Returns:
      The schemaSettings.
    • 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];
      Specified by:
      getSchemaSettingsOrBuilder in interface TopicOrBuilder
    • 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];
      Specified by:
      getSatisfiesPzs in interface TopicOrBuilder
      Returns:
      The satisfiesPzs.
    • 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](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];
      Specified by:
      hasMessageRetentionDuration in interface TopicOrBuilder
      Returns:
      Whether the messageRetentionDuration field is set.
    • getMessageRetentionDuration

      public 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];
      Specified by:
      getMessageRetentionDuration in interface TopicOrBuilder
      Returns:
      The messageRetentionDuration.
    • getMessageRetentionDurationOrBuilder

      public 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];
      Specified by:
      getMessageRetentionDurationOrBuilder in interface TopicOrBuilder
    • 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];
      Specified by:
      getStateValue in interface TopicOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • 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];
      Specified by:
      getState in interface TopicOrBuilder
      Returns:
      The state.
    • hasIngestionDataSourceSettings

      public 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];
      Specified by:
      hasIngestionDataSourceSettings in interface TopicOrBuilder
      Returns:
      Whether the ingestionDataSourceSettings field is set.
    • getIngestionDataSourceSettings

      public 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];
      Specified by:
      getIngestionDataSourceSettings in interface TopicOrBuilder
      Returns:
      The ingestionDataSourceSettings.
    • getIngestionDataSourceSettingsOrBuilder

      public 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];
      Specified by:
      getIngestionDataSourceSettingsOrBuilder in interface TopicOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Topic parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Topic parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Topic parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Topic parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Topic parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Topic parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Topic parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Topic parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Topic parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Topic parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Topic parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Topic parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Topic.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Topic.Builder newBuilder()
    • newBuilder

      public static Topic.Builder newBuilder(Topic prototype)
    • toBuilder

      public Topic.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Topic.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static Topic getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Topic> parser()
    • getParserForType

      public com.google.protobuf.Parser<Topic> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public Topic getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder