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
-
#ingestion_data_source_settings ⇒ Google::Apis::PubsubV1::IngestionDataSourceSettings
Settings for an ingestion data source on a topic.
-
#kms_key_name ⇒ String
Optional.
-
#labels ⇒ Hash<String,String>
Optional.
-
#message_retention_duration ⇒ String
Optional.
-
#message_storage_policy ⇒ Google::Apis::PubsubV1::MessageStoragePolicy
A policy constraining the storage of messages published to the topic.
-
#message_transforms ⇒ Array<Google::Apis::PubsubV1::MessageTransform>
Optional.
-
#name ⇒ String
Required.
-
#satisfies_pzs ⇒ Boolean
(also: #satisfies_pzs?)
Optional.
-
#schema_settings ⇒ Google::Apis::PubsubV1::SchemaSettings
Settings for validating messages published against a schema.
-
#state ⇒ String
Output only.
-
#tags ⇒ Hash<String,String>
Optional.
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.
2443 2444 2445 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2443 def initialize(**args) update!(**args) end |
Instance Attribute Details
#ingestion_data_source_settings ⇒ Google::Apis::PubsubV1::IngestionDataSourceSettings
Settings for an ingestion data source on a topic.
Corresponds to the JSON property ingestionDataSourceSettings
2371 2372 2373 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2371 def ingestion_data_source_settings @ingestion_data_source_settings end |
#kms_key_name ⇒ String
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/*.
Corresponds to the JSON property kmsKeyName
2378 2379 2380 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2378 def kms_key_name @kms_key_name end |
#labels ⇒ Hash<String,String>
Optional. See Creating and managing labels.
Corresponds to the JSON property labels
2384 2385 2386 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2384 def labels @labels end |
#message_retention_duration ⇒ String
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.
Corresponds to the JSON property messageRetentionDuration
2396 2397 2398 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2396 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
2401 2402 2403 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2401 def @message_storage_policy end |
#message_transforms ⇒ Array<Google::Apis::PubsubV1::MessageTransform>
Optional. Transforms to be applied to messages published to the topic.
Transforms are applied in the order specified.
Corresponds to the JSON property messageTransforms
2407 2408 2409 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2407 def @message_transforms end |
#name ⇒ String
Required. Identifier. 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
2417 2418 2419 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2417 def name @name end |
#satisfies_pzs ⇒ Boolean Also known as: satisfies_pzs?
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.
Corresponds to the JSON property satisfiesPzs
2423 2424 2425 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2423 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
2429 2430 2431 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2429 def schema_settings @schema_settings end |
#state ⇒ String
Output only. An output-only field indicating the state of the topic.
Corresponds to the JSON property state
2434 2435 2436 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2434 def state @state end |
#tags ⇒ Hash<String,String>
Optional. Input only. Immutable. Tag keys/values directly bound to this
resource. For example: "123/environment": "production", "123/costCenter": "
marketing"
Corresponds to the JSON property tags
2441 2442 2443 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2441 def @tags end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2448 def update!(**args) @ingestion_data_source_settings = args[:ingestion_data_source_settings] if args.key?(:ingestion_data_source_settings) @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) @message_transforms = args[:message_transforms] if args.key?(:message_transforms) @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) @state = args[:state] if args.key?(:state) @tags = args[:tags] if args.key?(:tags) end |