Class: Google::Apis::CloudbuildV1alpha2::Notification

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

Overview

Notification is the container which holds the data that is relevant to this particular notification.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Notification

Returns a new instance of Notification.


772
773
774
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 772

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

Instance Attribute Details

#filterString

The filter string to use for notification filtering. Currently, this is assumed to be a CEL program. See https://opensource.google/projects/cel for more. Corresponds to the JSON property filter

Returns:

  • (String)

748
749
750
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 748

def filter
  @filter
end

#http_deliveryGoogle::Apis::CloudbuildV1alpha2::HttpDelivery

HTTPDelivery is the delivery configuration for an HTTP notification. Corresponds to the JSON property httpDelivery


753
754
755
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 753

def http_delivery
  @http_delivery
end

#slack_deliveryGoogle::Apis::CloudbuildV1alpha2::SlackDelivery

SlackDelivery is the delivery configuration for delivering Slack messages via webhooks. See Slack webhook documentation at: https://api.slack.com/messaging/ webhooks. Corresponds to the JSON property slackDelivery


760
761
762
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 760

def slack_delivery
  @slack_delivery
end

#smtp_deliveryGoogle::Apis::CloudbuildV1alpha2::SmtpDelivery

SMTPDelivery is the delivery configuration for an SMTP (email) notification. Corresponds to the JSON property smtpDelivery


765
766
767
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 765

def smtp_delivery
  @smtp_delivery
end

#struct_deliveryHash<String,Object>

Escape hatch for users to supply custom delivery configs. Corresponds to the JSON property structDelivery

Returns:

  • (Hash<String,Object>)

770
771
772
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 770

def struct_delivery
  @struct_delivery
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


777
778
779
780
781
782
783
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 777

def update!(**args)
  @filter = args[:filter] if args.key?(:filter)
  @http_delivery = args[:http_delivery] if args.key?(:http_delivery)
  @slack_delivery = args[:slack_delivery] if args.key?(:slack_delivery)
  @smtp_delivery = args[:smtp_delivery] if args.key?(:smtp_delivery)
  @struct_delivery = args[:struct_delivery] if args.key?(:struct_delivery)
end