Class: Google::Apis::SourcerepoV1::PubsubConfig

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

Overview

Configuration to publish a Cloud Pub/Sub message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PubsubConfig

Returns a new instance of PubsubConfig.



519
520
521
# File 'lib/google/apis/sourcerepo_v1/classes.rb', line 519

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

Instance Attribute Details

#message_formatString

The format of the Cloud Pub/Sub messages. Corresponds to the JSON property messageFormat

Returns:

  • (String)


502
503
504
# File 'lib/google/apis/sourcerepo_v1/classes.rb', line 502

def message_format
  @message_format
end

#service_account_emailString

Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account. Corresponds to the JSON property serviceAccountEmail

Returns:

  • (String)


511
512
513
# File 'lib/google/apis/sourcerepo_v1/classes.rb', line 511

def 
  @service_account_email
end

#topicString

A topic of Cloud Pub/Sub. Values are of the form projects//topics/. The project needs to be the same project as this config is in. Corresponds to the JSON property topic

Returns:

  • (String)


517
518
519
# File 'lib/google/apis/sourcerepo_v1/classes.rb', line 517

def topic
  @topic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



524
525
526
527
528
# File 'lib/google/apis/sourcerepo_v1/classes.rb', line 524

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