Class: Google::Apis::BatchV1::JobNotification

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

Overview

Notification configurations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ JobNotification

Returns a new instance of JobNotification.



1061
1062
1063
# File 'lib/google/apis/batch_v1/classes.rb', line 1061

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

Instance Attribute Details

#messageGoogle::Apis::BatchV1::Message

Message details. Describe the attribute that a message should have. Without specified message attributes, no message will be sent by default. Corresponds to the JSON property message



1051
1052
1053
# File 'lib/google/apis/batch_v1/classes.rb', line 1051

def message
  @message
end

#pubsub_topicString

The Pub/Sub topic where notifications like the job state changes will be published. This topic exist in the same project as the job and billings will be charged to this project. If not specified, no Pub/Sub messages will be sent. Topic format: projects/project/topics/topic`. Corresponds to the JSON propertypubsubTopic`

Returns:

  • (String)


1059
1060
1061
# File 'lib/google/apis/batch_v1/classes.rb', line 1059

def pubsub_topic
  @pubsub_topic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1066
1067
1068
1069
# File 'lib/google/apis/batch_v1/classes.rb', line 1066

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