Class: Google::Apis::PubsubV1::Topic

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Topic

Returns a new instance of Topic.



2553
2554
2555
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2553

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#ingestion_data_source_settingsGoogle::Apis::PubsubV1::IngestionDataSourceSettings

Settings for an ingestion data source on a topic. Corresponds to the JSON property ingestionDataSourceSettings



2480
2481
2482
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2480

def ingestion_data_source_settings
  @ingestion_data_source_settings
end

#kms_key_nameString

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

Returns:

  • (String)


2487
2488
2489
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2487

def kms_key_name
  @kms_key_name
end

#labelsHash<String,String>

Optional. See Creating and managing labels. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


2493
2494
2495
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2493

def labels
  @labels
end

#message_retention_durationString

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

Returns:

  • (String)


2505
2506
2507
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2505

def message_retention_duration
  @message_retention_duration
end

#message_storage_policyGoogle::Apis::PubsubV1::MessageStoragePolicy

A policy constraining the storage of messages published to the topic. Corresponds to the JSON property messageStoragePolicy



2510
2511
2512
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2510

def message_storage_policy
  @message_storage_policy
end

#message_transformsArray<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



2516
2517
2518
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2516

def message_transforms
  @message_transforms
end

#nameString

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

Returns:

  • (String)


2526
2527
2528
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2526

def name
  @name
end

#satisfies_pzsBoolean 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

Returns:

  • (Boolean)


2532
2533
2534
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2532

def satisfies_pzs
  @satisfies_pzs
end

#schema_settingsGoogle::Apis::PubsubV1::SchemaSettings

Settings for validating messages published against a schema. Corresponds to the JSON property schemaSettings



2538
2539
2540
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2538

def schema_settings
  @schema_settings
end

#stateString

Output only. An output-only field indicating the state of the topic. Corresponds to the JSON property state

Returns:

  • (String)


2543
2544
2545
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2543

def state
  @state
end

#tagsHash<String,String>

Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": " marketing" See https://$universe.dns_names.final_documentation_domain/pubsub/ docs/tags for more information on using tags with Pub/Sub resources. Corresponds to the JSON property tags

Returns:

  • (Hash<String,String>)


2551
2552
2553
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2551

def tags
  @tags
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
# File 'lib/google/apis/pubsub_v1/classes.rb', line 2558

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