Class: Google::Apis::EventarcV1::Pubsub

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

Overview

Represents a Pub/Sub transport.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Pubsub

Returns a new instance of Pubsub.



731
732
733
# File 'lib/google/apis/eventarc_v1/classes.rb', line 731

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

Instance Attribute Details

#subscriptionString

Output only. The name of the Pub/Sub subscription created and managed by Eventarc system as a transport for the event delivery. Format: projects/ PROJECT_ID/subscriptions/SUBSCRIPTION_NAME`. Corresponds to the JSON propertysubscription`

Returns:

  • (String)


720
721
722
# File 'lib/google/apis/eventarc_v1/classes.rb', line 720

def subscription
  @subscription
end

#topicString

Optional. The name of the Pub/Sub topic created and managed by Eventarc system as a transport for the event delivery. Format: projects/PROJECT_ID/topics/ TOPIC_NAME`. You may set an existing topic for triggers of the typegoogle. cloud.pubsub.topic.v1.messagePublishedonly. The topic you provide here will not be deleted by Eventarc at trigger deletion. Corresponds to the JSON propertytopic`

Returns:

  • (String)


729
730
731
# File 'lib/google/apis/eventarc_v1/classes.rb', line 729

def topic
  @topic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



736
737
738
739
# File 'lib/google/apis/eventarc_v1/classes.rb', line 736

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