Class: Google::Apis::PubsubV1::Topic
- Inherits:
-
Object
- Object
- Google::Apis::PubsubV1::Topic
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/pubsub_v1/classes.rb,
lib/google/apis/pubsub_v1/representations.rb,
lib/google/apis/pubsub_v1/representations.rb
Overview
A topic resource.
Instance Attribute Summary collapse
-
#kms_key_name ⇒ String
The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic.
- #labels ⇒ Hash<String,String>
-
#message_retention_duration ⇒ String
Indicates the minimum duration to retain a message after it is published to the topic.
-
#message_storage_policy ⇒ Google::Apis::PubsubV1::MessageStoragePolicy
A policy constraining the storage of messages published to the topic.
-
#name ⇒ String
Required.
-
#satisfies_pzs ⇒ Boolean
(also: #satisfies_pzs?)
Reserved for future use.
-
#schema_settings ⇒ Google::Apis::PubsubV1::SchemaSettings
Settings for validating messages published against a schema.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Topic
constructor
A new instance of Topic.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Topic
Returns a new instance of Topic.
1573 1574 1575 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1573 def initialize(**args) update!(**args) end |
Instance Attribute Details
#kms_key_name ⇒ String
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
1527 1528 1529 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1527 def kms_key_name @kms_key_name end |
#labels ⇒ Hash<String,String>
See Creating and managing labels.
Corresponds to the JSON property labels
1533 1534 1535 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1533 def labels @labels end |
#message_retention_duration ⇒ String
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.
Corresponds to the JSON property messageRetentionDuration
1545 1546 1547 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1545 def @message_retention_duration end |
#message_storage_policy ⇒ Google::Apis::PubsubV1::MessageStoragePolicy
A policy constraining the storage of messages published to the topic.
Corresponds to the JSON property messageStoragePolicy
1550 1551 1552 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1550 def @message_storage_policy end |
#name ⇒ String
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
1559 1560 1561 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1559 def name @name end |
#satisfies_pzs ⇒ Boolean Also known as: satisfies_pzs?
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
1565 1566 1567 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1565 def satisfies_pzs @satisfies_pzs end |
#schema_settings ⇒ Google::Apis::PubsubV1::SchemaSettings
Settings for validating messages published against a schema.
Corresponds to the JSON property schemaSettings
1571 1572 1573 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1571 def schema_settings @schema_settings end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1578 1579 1580 1581 1582 1583 1584 1585 1586 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1578 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 |