Class: Google::Apis::CloudbuildV1::PubsubConfig

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

Overview

PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PubsubConfig

Returns a new instance of PubsubConfig.



3828
3829
3830
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3828

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

Instance Attribute Details

#service_account_emailString

Service account that will make the push request. Corresponds to the JSON property serviceAccountEmail

Returns:

  • (String)


3808
3809
3810
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3808

def 
  @service_account_email
end

#stateString

Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests. Corresponds to the JSON property state

Returns:

  • (String)


3814
3815
3816
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3814

def state
  @state
end

#subscriptionString

Output only. Name of the subscription. Format is projects/project/ subscriptions/subscription`. Corresponds to the JSON propertysubscription`

Returns:

  • (String)


3820
3821
3822
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3820

def subscription
  @subscription
end

#topicString

Optional. The name of the topic from which this subscription is receiving messages. Format is projects/project/topics/topic`. Corresponds to the JSON propertytopic`

Returns:

  • (String)


3826
3827
3828
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3826

def topic
  @topic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3833
3834
3835
3836
3837
3838
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3833

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