Class: Google::Apis::BatchV1::Message

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

Message details. Describe the conditions under which messages will be sent. If no attribute is defined, no message will be sent by default. One message should specify either the job or the task level attributes, but not both. For example, job level: JOB_STATE_CHANGED and/or a specified new_job_state; task level: TASK_STATE_CHANGED and/or a specified new_task_state.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Message

Returns a new instance of Message.



1565
1566
1567
# File 'lib/google/apis/batch_v1/classes.rb', line 1565

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

Instance Attribute Details

#new_job_stateString

The new job state. Corresponds to the JSON property newJobState

Returns:

  • (String)


1553
1554
1555
# File 'lib/google/apis/batch_v1/classes.rb', line 1553

def new_job_state
  @new_job_state
end

#new_task_stateString

The new task state. Corresponds to the JSON property newTaskState

Returns:

  • (String)


1558
1559
1560
# File 'lib/google/apis/batch_v1/classes.rb', line 1558

def new_task_state
  @new_task_state
end

#typeString

The message type. Corresponds to the JSON property type

Returns:

  • (String)


1563
1564
1565
# File 'lib/google/apis/batch_v1/classes.rb', line 1563

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1570
1571
1572
1573
1574
# File 'lib/google/apis/batch_v1/classes.rb', line 1570

def update!(**args)
  @new_job_state = args[:new_job_state] if args.key?(:new_job_state)
  @new_task_state = args[:new_task_state] if args.key?(:new_task_state)
  @type = args[:type] if args.key?(:type)
end