Class: Google::Apis::PubsubV1beta1a::Subscription

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

Overview

A subscription resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Subscription

Returns a new instance of Subscription



572
573
574
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 572

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

Instance Attribute Details

#ack_deadline_secondsFixnum

For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis). Corresponds to the JSON property ackDeadlineSeconds

Returns:

  • (Fixnum)


555
556
557
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 555

def ack_deadline_seconds
  @ack_deadline_seconds
end

#nameString

Name of the subscription. Corresponds to the JSON property name

Returns:

  • (String)


560
561
562
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 560

def name
  @name
end

#push_configGoogle::Apis::PubsubV1beta1a::PushConfig

Configuration for a push delivery endpoint. Corresponds to the JSON property pushConfig



565
566
567
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 565

def push_config
  @push_config
end

#topicString

The name of the topic from which this subscription is receiving messages. Corresponds to the JSON property topic

Returns:

  • (String)


570
571
572
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 570

def topic
  @topic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



577
578
579
580
581
582
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 577

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