Class: Google::Apis::DataflowV1b3::WorkerShutdownNotice

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

Overview

Shutdown notification from workers. This is to be sent by the shutdown script of the worker VM so that the backend knows that the VM is being shut down.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ WorkerShutdownNotice

Returns a new instance of WorkerShutdownNotice



5219
5220
5221
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5219

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

Instance Attribute Details

#reasonString

The reason for the worker shutdown. Current possible values are: "UNKNOWN": shutdown reason is unknown. "PREEMPTION": shutdown reason is preemption. Other possible reasons may be added in the future. Note that this must match the names of the enum specified in google3/cloud/dataflow/router/protos/cloud_worker_messages_service.proto. Corresponds to the JSON property reason

Returns:

  • (String)


5217
5218
5219
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5217

def reason
  @reason
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5224
5225
5226
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5224

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