class Google::Apis::PubsubV1::Topic

A topic resource.

Attributes

kms_key_name[RW]

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/*`. Corresponds to the JSON property `kmsKeyName` @return [String]

labels[RW]

See [Creating and managing labels] (cloud.google.com/pubsub/docs/ labels). Corresponds to the JSON property `labels` @return [Hash<String,String>]

message_retention_duration[RW]

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](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 7 days or less than 10 minutes. Corresponds to the JSON property `messageRetentionDuration` @return [String]

message_storage_policy[RW]

A policy constraining the storage of messages published to the topic. Corresponds to the JSON property `messageStoragePolicy` @return [Google::Apis::PubsubV1::MessageStoragePolicy]

name[RW]

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”`. Corresponds to the JSON property `name` @return [String]

satisfies_pzs[RW]

Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. Corresponds to the JSON property `satisfiesPzs` @return [Boolean]

satisfies_pzs?[RW]

Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. Corresponds to the JSON property `satisfiesPzs` @return [Boolean]

schema_settings[RW]

Settings for validating messages published against a schema. Corresponds to the JSON property `schemaSettings` @return [Google::Apis::PubsubV1::SchemaSettings]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/pubsub_v1/classes.rb, line 1378
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/pubsub_v1/classes.rb, line 1383
def update!(**args)
  @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
  @labels = args[:labels] if args.key?(:labels)
  @message_retention_duration = args[:message_retention_duration] if args.key?(:message_retention_duration)
  @message_storage_policy = args[:message_storage_policy] if args.key?(:message_storage_policy)
  @name = args[:name] if args.key?(:name)
  @satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs)
  @schema_settings = args[:schema_settings] if args.key?(:schema_settings)
end