Class: Google::Apis::PubsubliteV1::ExportConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/pubsublite_v1/classes.rb,
lib/google/apis/pubsublite_v1/representations.rb,
lib/google/apis/pubsublite_v1/representations.rb

Overview

Configuration for a Pub/Sub Lite subscription that writes messages to a destination. User subscriber clients must not connect to this subscription.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ExportConfig

Returns a new instance of ExportConfig.



347
348
349
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 347

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

Instance Attribute Details

#current_stateString

Output only. The current state of the export, which may be different to the desired state due to errors. This field is output only. Corresponds to the JSON property currentState

Returns:

  • (String)


323
324
325
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 323

def current_state
  @current_state
end

#dead_letter_topicString

Optional. The name of an optional Pub/Sub Lite topic to publish messages that can not be exported to the destination. For example, the message can not be published to the Pub/Sub service because it does not satisfy the constraints documented at https://cloud.google.com/pubsub/docs/publisher. Structured like: projects/project_number/locations/location/topics/topic_id. Must be within the same project and location as the subscription. The topic may be changed or removed. Corresponds to the JSON property deadLetterTopic

Returns:

  • (String)


334
335
336
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 334

def dead_letter_topic
  @dead_letter_topic
end

#desired_stateString

The desired state of this export. Setting this to values other than ACTIVE and PAUSED will result in an error. Corresponds to the JSON property desiredState

Returns:

  • (String)


340
341
342
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 340

def desired_state
  @desired_state
end

#pubsub_configGoogle::Apis::PubsubliteV1::PubSubConfig

Configuration for exporting to a Pub/Sub topic. Corresponds to the JSON property pubsubConfig



345
346
347
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 345

def pubsub_config
  @pubsub_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



352
353
354
355
356
357
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 352

def update!(**args)
  @current_state = args[:current_state] if args.key?(:current_state)
  @dead_letter_topic = args[:dead_letter_topic] if args.key?(:dead_letter_topic)
  @desired_state = args[:desired_state] if args.key?(:desired_state)
  @pubsub_config = args[:pubsub_config] if args.key?(:pubsub_config)
end