Class: Google::Apis::PubsubliteV1::Subscription

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

Metadata about a subscription resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Subscription

Returns a new instance of Subscription.



916
917
918
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 916

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

Instance Attribute Details

#delivery_configGoogle::Apis::PubsubliteV1::DeliveryConfig

The settings for a subscription's message delivery. Corresponds to the JSON property deliveryConfig



896
897
898
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 896

def delivery_config
  @delivery_config
end

#export_configGoogle::Apis::PubsubliteV1::ExportConfig

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



902
903
904
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 902

def export_config
  @export_config
end

#nameString

The name of the subscription. Structured like: projects/project_number/ locations/location/subscriptions/subscription_id Corresponds to the JSON property name

Returns:

  • (String)


908
909
910
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 908

def name
  @name
end

#topicString

The name of the topic this subscription is attached to. Structured like: projects/project_number/locations/location/topics/topic_id Corresponds to the JSON property topic

Returns:

  • (String)


914
915
916
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 914

def topic
  @topic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



921
922
923
924
925
926
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 921

def update!(**args)
  @delivery_config = args[:delivery_config] if args.key?(:delivery_config)
  @export_config = args[:export_config] if args.key?(:export_config)
  @name = args[:name] if args.key?(:name)
  @topic = args[:topic] if args.key?(:topic)
end