Class: Google::Apis::CloudbuildV1beta1::Notification

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudbuild_v1beta1/classes.rb,
lib/google/apis/cloudbuild_v1beta1/representations.rb,
lib/google/apis/cloudbuild_v1beta1/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

Constructor Details

#initialize(**args) ⇒ Notification

Returns a new instance of Notification.



1385
1386
1387
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 1385

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)


1361
1362
1363
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 1361

def filter
  @filter
end

#http_deliveryGoogle::Apis::CloudbuildV1beta1::HttpDelivery

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



1366
1367
1368
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 1366

def http_delivery
  @http_delivery
end

#slack_deliveryGoogle::Apis::CloudbuildV1beta1::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



1373
1374
1375
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 1373

def slack_delivery
  @slack_delivery
end

#smtp_deliveryGoogle::Apis::CloudbuildV1beta1::SmtpDelivery

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



1378
1379
1380
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 1378

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>)


1383
1384
1385
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 1383

def struct_delivery
  @struct_delivery
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1390
1391
1392
1393
1394
1395
1396
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 1390

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