Class: Google::Apis::DataflowV1b3::WorkerMessageCode
- Inherits:
-
Object
- Object
- Google::Apis::DataflowV1b3::WorkerMessageCode
- 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
A message code is used to report status and error messages to the service. The message codes are intended to be machine readable. The service will take care of translating these into user understandable messages if necessary. Example use cases:
- Worker processes reporting successful startup.
- Worker processes reporting specific errors (e.g. package staging failure).
Instance Attribute Summary collapse
-
#code ⇒ String
The code is a string intended for consumption by a machine that identifies the type of message being sent.
-
#parameters ⇒ Hash<String,Object>
Parameters contains specific information about the code.
Instance Method Summary collapse
-
#initialize(**args) ⇒ WorkerMessageCode
constructor
A new instance of WorkerMessageCode.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ WorkerMessageCode
Returns a new instance of WorkerMessageCode
5461 5462 5463 |
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5461 def initialize(**args) update!(**args) end |
Instance Attribute Details
#code ⇒ String
The code is a string intended for consumption by a machine that identifies the type of message being sent. Examples:
- "HARNESS_STARTED" might be used to indicate the worker harness has started.
- "GCS_DOWNLOAD_ERROR" might be used to indicate an error downloading
a GCS file as part of the boot process of one of the worker containers.
This is a string and not an enum to make it easy to add new codes without
waiting for an API change.
Corresponds to the JSON property
code
5439 5440 5441 |
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5439 def code @code end |
#parameters ⇒ Hash<String,Object>
Parameters contains specific information about the code. This is a struct to allow parameters of different types. Examples:
- For a "HARNESS_STARTED" message parameters might provide the name of the worker and additional data like timing information.
- For a "GCS_DOWNLOAD_ERROR" parameters might contain fields listing
the GCS objects being downloaded and fields containing errors.
In general complex data structures should be avoided. If a worker
needs to send a specific and complicated data structure then please
consider defining a new proto and adding it to the data oneof in
WorkerMessageResponse.
Conventions:
Parameters should only be used for information that isn't typically passed
as a label.
hostname and other worker identifiers should almost always be passed
as labels since they will be included on most messages.
Corresponds to the JSON property
parameters
5459 5460 5461 |
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5459 def parameters @parameters end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5466 5467 5468 5469 |
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5466 def update!(**args) @code = args[:code] if args.key?(:code) @parameters = args[:parameters] if args.key?(:parameters) end |