temporalio 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -0
  3. data/Cargo.lock +659 -370
  4. data/Cargo.toml +2 -2
  5. data/Gemfile +3 -3
  6. data/README.md +589 -47
  7. data/Rakefile +10 -296
  8. data/ext/Cargo.toml +1 -0
  9. data/lib/temporalio/activity/complete_async_error.rb +1 -1
  10. data/lib/temporalio/activity/context.rb +5 -2
  11. data/lib/temporalio/activity/definition.rb +163 -65
  12. data/lib/temporalio/activity/info.rb +22 -21
  13. data/lib/temporalio/activity.rb +2 -59
  14. data/lib/temporalio/api/activity/v1/message.rb +25 -0
  15. data/lib/temporalio/api/cloud/account/v1/message.rb +28 -0
  16. data/lib/temporalio/api/cloud/cloudservice/v1/request_response.rb +34 -1
  17. data/lib/temporalio/api/cloud/cloudservice/v1/service.rb +1 -1
  18. data/lib/temporalio/api/cloud/identity/v1/message.rb +6 -1
  19. data/lib/temporalio/api/cloud/namespace/v1/message.rb +8 -1
  20. data/lib/temporalio/api/cloud/nexus/v1/message.rb +31 -0
  21. data/lib/temporalio/api/cloud/operation/v1/message.rb +2 -1
  22. data/lib/temporalio/api/cloud/region/v1/message.rb +2 -1
  23. data/lib/temporalio/api/cloud/resource/v1/message.rb +23 -0
  24. data/lib/temporalio/api/cloud/sink/v1/message.rb +24 -0
  25. data/lib/temporalio/api/cloud/usage/v1/message.rb +31 -0
  26. data/lib/temporalio/api/common/v1/message.rb +7 -1
  27. data/lib/temporalio/api/enums/v1/event_type.rb +1 -1
  28. data/lib/temporalio/api/enums/v1/failed_cause.rb +1 -1
  29. data/lib/temporalio/api/enums/v1/reset.rb +1 -1
  30. data/lib/temporalio/api/history/v1/message.rb +1 -1
  31. data/lib/temporalio/api/nexus/v1/message.rb +2 -2
  32. data/lib/temporalio/api/operatorservice/v1/service.rb +1 -1
  33. data/lib/temporalio/api/payload_visitor.rb +1513 -0
  34. data/lib/temporalio/api/schedule/v1/message.rb +2 -1
  35. data/lib/temporalio/api/testservice/v1/request_response.rb +31 -0
  36. data/lib/temporalio/api/testservice/v1/service.rb +23 -0
  37. data/lib/temporalio/api/workflow/v1/message.rb +1 -1
  38. data/lib/temporalio/api/workflowservice/v1/request_response.rb +17 -2
  39. data/lib/temporalio/api/workflowservice/v1/service.rb +1 -1
  40. data/lib/temporalio/api.rb +1 -0
  41. data/lib/temporalio/cancellation.rb +34 -14
  42. data/lib/temporalio/client/async_activity_handle.rb +12 -37
  43. data/lib/temporalio/client/connection/cloud_service.rb +309 -231
  44. data/lib/temporalio/client/connection/operator_service.rb +36 -84
  45. data/lib/temporalio/client/connection/service.rb +6 -5
  46. data/lib/temporalio/client/connection/test_service.rb +111 -0
  47. data/lib/temporalio/client/connection/workflow_service.rb +264 -441
  48. data/lib/temporalio/client/connection.rb +90 -44
  49. data/lib/temporalio/client/interceptor.rb +160 -60
  50. data/lib/temporalio/client/schedule.rb +967 -0
  51. data/lib/temporalio/client/schedule_handle.rb +126 -0
  52. data/lib/temporalio/client/workflow_execution.rb +7 -10
  53. data/lib/temporalio/client/workflow_handle.rb +38 -95
  54. data/lib/temporalio/client/workflow_update_handle.rb +3 -5
  55. data/lib/temporalio/client.rb +122 -42
  56. data/lib/temporalio/common_enums.rb +17 -0
  57. data/lib/temporalio/converters/data_converter.rb +4 -7
  58. data/lib/temporalio/converters/failure_converter.rb +5 -3
  59. data/lib/temporalio/converters/payload_converter/composite.rb +4 -0
  60. data/lib/temporalio/converters/payload_converter.rb +6 -8
  61. data/lib/temporalio/converters/raw_value.rb +20 -0
  62. data/lib/temporalio/error/failure.rb +1 -1
  63. data/lib/temporalio/error.rb +10 -2
  64. data/lib/temporalio/internal/bridge/api/core_interface.rb +5 -1
  65. data/lib/temporalio/internal/bridge/api/nexus/nexus.rb +33 -0
  66. data/lib/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rb +5 -1
  67. data/lib/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rb +4 -1
  68. data/lib/temporalio/internal/bridge/client.rb +11 -6
  69. data/lib/temporalio/internal/bridge/testing.rb +20 -0
  70. data/lib/temporalio/internal/bridge/worker.rb +2 -0
  71. data/lib/temporalio/internal/bridge.rb +1 -1
  72. data/lib/temporalio/internal/client/implementation.rb +245 -70
  73. data/lib/temporalio/internal/metric.rb +122 -0
  74. data/lib/temporalio/internal/proto_utils.rb +86 -7
  75. data/lib/temporalio/internal/worker/activity_worker.rb +52 -24
  76. data/lib/temporalio/internal/worker/multi_runner.rb +51 -7
  77. data/lib/temporalio/internal/worker/workflow_instance/child_workflow_handle.rb +54 -0
  78. data/lib/temporalio/internal/worker/workflow_instance/context.rb +329 -0
  79. data/lib/temporalio/internal/worker/workflow_instance/details.rb +44 -0
  80. data/lib/temporalio/internal/worker/workflow_instance/external_workflow_handle.rb +32 -0
  81. data/lib/temporalio/internal/worker/workflow_instance/externally_immutable_hash.rb +22 -0
  82. data/lib/temporalio/internal/worker/workflow_instance/handler_execution.rb +25 -0
  83. data/lib/temporalio/internal/worker/workflow_instance/handler_hash.rb +41 -0
  84. data/lib/temporalio/internal/worker/workflow_instance/illegal_call_tracer.rb +97 -0
  85. data/lib/temporalio/internal/worker/workflow_instance/inbound_implementation.rb +62 -0
  86. data/lib/temporalio/internal/worker/workflow_instance/outbound_implementation.rb +415 -0
  87. data/lib/temporalio/internal/worker/workflow_instance/replay_safe_logger.rb +37 -0
  88. data/lib/temporalio/internal/worker/workflow_instance/replay_safe_metric.rb +40 -0
  89. data/lib/temporalio/internal/worker/workflow_instance/scheduler.rb +163 -0
  90. data/lib/temporalio/internal/worker/workflow_instance.rb +730 -0
  91. data/lib/temporalio/internal/worker/workflow_worker.rb +196 -0
  92. data/lib/temporalio/metric.rb +109 -0
  93. data/lib/temporalio/retry_policy.rb +37 -14
  94. data/lib/temporalio/runtime.rb +118 -75
  95. data/lib/temporalio/search_attributes.rb +80 -37
  96. data/lib/temporalio/testing/activity_environment.rb +2 -2
  97. data/lib/temporalio/testing/workflow_environment.rb +251 -5
  98. data/lib/temporalio/version.rb +1 -1
  99. data/lib/temporalio/worker/activity_executor/thread_pool.rb +9 -217
  100. data/lib/temporalio/worker/activity_executor.rb +3 -3
  101. data/lib/temporalio/worker/interceptor.rb +340 -66
  102. data/lib/temporalio/worker/thread_pool.rb +237 -0
  103. data/lib/temporalio/worker/workflow_executor/thread_pool.rb +230 -0
  104. data/lib/temporalio/worker/workflow_executor.rb +26 -0
  105. data/lib/temporalio/worker.rb +201 -30
  106. data/lib/temporalio/workflow/activity_cancellation_type.rb +20 -0
  107. data/lib/temporalio/workflow/child_workflow_cancellation_type.rb +21 -0
  108. data/lib/temporalio/workflow/child_workflow_handle.rb +43 -0
  109. data/lib/temporalio/workflow/definition.rb +566 -0
  110. data/lib/temporalio/workflow/external_workflow_handle.rb +41 -0
  111. data/lib/temporalio/workflow/future.rb +151 -0
  112. data/lib/temporalio/workflow/handler_unfinished_policy.rb +13 -0
  113. data/lib/temporalio/workflow/info.rb +82 -0
  114. data/lib/temporalio/workflow/parent_close_policy.rb +19 -0
  115. data/lib/temporalio/workflow/update_info.rb +20 -0
  116. data/lib/temporalio/workflow.rb +523 -0
  117. data/lib/temporalio.rb +4 -0
  118. data/temporalio.gemspec +2 -2
  119. metadata +50 -8
@@ -0,0 +1,1513 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated code. DO NOT EDIT!
4
+
5
+ require 'temporalio/api'
6
+ require 'temporalio/internal/bridge/api'
7
+
8
+ module Temporalio
9
+ module Api
10
+ # Visitor for payloads within the protobuf structure. This visitor is thread safe and can be used multiple
11
+ # times since it stores no mutable state.
12
+ #
13
+ # @note WARNING: This class is not considered stable for external use and may change as needed for internal
14
+ # reasons.
15
+ class PayloadVisitor
16
+ # Create a new visitor, calling the block on every {Common::V1::Payload} or
17
+ # {Google::Protobuf::RepeatedField<Payload>} encountered.
18
+ #
19
+ # @param on_enter [Proc, nil] Proc called at the beginning of the processing for every protobuf value
20
+ # _except_ the ones calling the block.
21
+ # @param on_exit [Proc, nil] Proc called at the end of the processing for every protobuf value _except_ the
22
+ # ones calling the block.
23
+ # @param skip_search_attributes [Boolean] If true, payloads within search attributes do not call the block.
24
+ # @param traverse_any [Boolean] If true, when a [Google::Protobuf::Any] is encountered, it is unpacked,
25
+ # visited, then repacked.
26
+ # @yield [value] Block called with the visited payload value.
27
+ # @yieldparam [Common::V1::Payload, Google::Protobuf::RepeatedField<Payload>] Payload or payload list.
28
+ def initialize(
29
+ on_enter: nil,
30
+ on_exit: nil,
31
+ skip_search_attributes: false,
32
+ traverse_any: false,
33
+ &block
34
+ )
35
+ raise ArgumentError, 'Block required' unless block_given?
36
+ @on_enter = on_enter
37
+ @on_exit = on_exit
38
+ @skip_search_attributes = skip_search_attributes
39
+ @traverse_any = traverse_any
40
+ @block = block
41
+ end
42
+
43
+ # Visit the given protobuf message.
44
+ #
45
+ # @param value [Google::Protobuf::Message] Message to visit.
46
+ def run(value)
47
+ return unless value.is_a?(Google::Protobuf::MessageExts)
48
+ method_name = method_name_from_proto_name(value.class.descriptor.name)
49
+ send(method_name, value) if respond_to?(method_name, true)
50
+ nil
51
+ end
52
+
53
+ # @!visibility private
54
+ def _run_activation(value)
55
+ coresdk_workflow_activation_workflow_activation(value)
56
+ end
57
+
58
+ # @!visibility private
59
+ def _run_activation_completion(value)
60
+ coresdk_workflow_completion_workflow_activation_completion(value)
61
+ end
62
+
63
+ private
64
+
65
+ def method_name_from_proto_name(name)
66
+ name
67
+ .sub('temporal.api.', 'api_')
68
+ .gsub('.', '_')
69
+ .gsub(/([a-z])([A-Z])/, '\1_\2')
70
+ .downcase
71
+ end
72
+
73
+ def api_common_v1_payload(value)
74
+ @block.call(value)
75
+ end
76
+
77
+ def api_common_v1_payload_repeated(value)
78
+ @block.call(value)
79
+ end
80
+
81
+ def google_protobuf_any(value)
82
+ return unless @traverse_any
83
+ desc = Google::Protobuf::DescriptorPool.generated_pool.lookup(value.type_name)
84
+ unpacked = value.unpack(desc.msgclass)
85
+ run(unpacked)
86
+ value.pack(unpacked)
87
+ end
88
+
89
+ ### Generated method bodies below ###
90
+
91
+ def api_batch_v1_batch_operation_signal(value)
92
+ @on_enter&.call(value)
93
+ api_common_v1_payloads(value.input) if value.has_input?
94
+ api_common_v1_header(value.header) if value.has_header?
95
+ @on_exit&.call(value)
96
+ end
97
+
98
+ def api_batch_v1_batch_operation_termination(value)
99
+ @on_enter&.call(value)
100
+ api_common_v1_payloads(value.details) if value.has_details?
101
+ @on_exit&.call(value)
102
+ end
103
+
104
+ def api_cloud_cloudservice_v1_add_namespace_region_response(value)
105
+ @on_enter&.call(value)
106
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
107
+ @on_exit&.call(value)
108
+ end
109
+
110
+ def api_cloud_cloudservice_v1_create_api_key_response(value)
111
+ @on_enter&.call(value)
112
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
113
+ @on_exit&.call(value)
114
+ end
115
+
116
+ def api_cloud_cloudservice_v1_create_namespace_export_sink_response(value)
117
+ @on_enter&.call(value)
118
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
119
+ @on_exit&.call(value)
120
+ end
121
+
122
+ def api_cloud_cloudservice_v1_create_namespace_response(value)
123
+ @on_enter&.call(value)
124
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
125
+ @on_exit&.call(value)
126
+ end
127
+
128
+ def api_cloud_cloudservice_v1_create_nexus_endpoint_response(value)
129
+ @on_enter&.call(value)
130
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
131
+ @on_exit&.call(value)
132
+ end
133
+
134
+ def api_cloud_cloudservice_v1_create_service_account_response(value)
135
+ @on_enter&.call(value)
136
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
137
+ @on_exit&.call(value)
138
+ end
139
+
140
+ def api_cloud_cloudservice_v1_create_user_group_response(value)
141
+ @on_enter&.call(value)
142
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
143
+ @on_exit&.call(value)
144
+ end
145
+
146
+ def api_cloud_cloudservice_v1_create_user_response(value)
147
+ @on_enter&.call(value)
148
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
149
+ @on_exit&.call(value)
150
+ end
151
+
152
+ def api_cloud_cloudservice_v1_delete_api_key_response(value)
153
+ @on_enter&.call(value)
154
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
155
+ @on_exit&.call(value)
156
+ end
157
+
158
+ def api_cloud_cloudservice_v1_delete_namespace_export_sink_response(value)
159
+ @on_enter&.call(value)
160
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
161
+ @on_exit&.call(value)
162
+ end
163
+
164
+ def api_cloud_cloudservice_v1_delete_namespace_response(value)
165
+ @on_enter&.call(value)
166
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
167
+ @on_exit&.call(value)
168
+ end
169
+
170
+ def api_cloud_cloudservice_v1_delete_nexus_endpoint_response(value)
171
+ @on_enter&.call(value)
172
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
173
+ @on_exit&.call(value)
174
+ end
175
+
176
+ def api_cloud_cloudservice_v1_delete_service_account_response(value)
177
+ @on_enter&.call(value)
178
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
179
+ @on_exit&.call(value)
180
+ end
181
+
182
+ def api_cloud_cloudservice_v1_delete_user_group_response(value)
183
+ @on_enter&.call(value)
184
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
185
+ @on_exit&.call(value)
186
+ end
187
+
188
+ def api_cloud_cloudservice_v1_delete_user_response(value)
189
+ @on_enter&.call(value)
190
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
191
+ @on_exit&.call(value)
192
+ end
193
+
194
+ def api_cloud_cloudservice_v1_failover_namespace_region_response(value)
195
+ @on_enter&.call(value)
196
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
197
+ @on_exit&.call(value)
198
+ end
199
+
200
+ def api_cloud_cloudservice_v1_get_async_operation_response(value)
201
+ @on_enter&.call(value)
202
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
203
+ @on_exit&.call(value)
204
+ end
205
+
206
+ def api_cloud_cloudservice_v1_rename_custom_search_attribute_response(value)
207
+ @on_enter&.call(value)
208
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
209
+ @on_exit&.call(value)
210
+ end
211
+
212
+ def api_cloud_cloudservice_v1_set_user_group_namespace_access_response(value)
213
+ @on_enter&.call(value)
214
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
215
+ @on_exit&.call(value)
216
+ end
217
+
218
+ def api_cloud_cloudservice_v1_set_user_namespace_access_response(value)
219
+ @on_enter&.call(value)
220
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
221
+ @on_exit&.call(value)
222
+ end
223
+
224
+ def api_cloud_cloudservice_v1_update_account_response(value)
225
+ @on_enter&.call(value)
226
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
227
+ @on_exit&.call(value)
228
+ end
229
+
230
+ def api_cloud_cloudservice_v1_update_api_key_response(value)
231
+ @on_enter&.call(value)
232
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
233
+ @on_exit&.call(value)
234
+ end
235
+
236
+ def api_cloud_cloudservice_v1_update_namespace_export_sink_response(value)
237
+ @on_enter&.call(value)
238
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
239
+ @on_exit&.call(value)
240
+ end
241
+
242
+ def api_cloud_cloudservice_v1_update_namespace_response(value)
243
+ @on_enter&.call(value)
244
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
245
+ @on_exit&.call(value)
246
+ end
247
+
248
+ def api_cloud_cloudservice_v1_update_nexus_endpoint_response(value)
249
+ @on_enter&.call(value)
250
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
251
+ @on_exit&.call(value)
252
+ end
253
+
254
+ def api_cloud_cloudservice_v1_update_service_account_response(value)
255
+ @on_enter&.call(value)
256
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
257
+ @on_exit&.call(value)
258
+ end
259
+
260
+ def api_cloud_cloudservice_v1_update_user_group_response(value)
261
+ @on_enter&.call(value)
262
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
263
+ @on_exit&.call(value)
264
+ end
265
+
266
+ def api_cloud_cloudservice_v1_update_user_response(value)
267
+ @on_enter&.call(value)
268
+ api_cloud_operation_v1_async_operation(value.async_operation) if value.has_async_operation?
269
+ @on_exit&.call(value)
270
+ end
271
+
272
+ def api_cloud_operation_v1_async_operation(value)
273
+ @on_enter&.call(value)
274
+ google_protobuf_any(value.operation_input) if value.has_operation_input?
275
+ @on_exit&.call(value)
276
+ end
277
+
278
+ def api_command_v1_cancel_workflow_execution_command_attributes(value)
279
+ @on_enter&.call(value)
280
+ api_common_v1_payloads(value.details) if value.has_details?
281
+ @on_exit&.call(value)
282
+ end
283
+
284
+ def api_command_v1_command(value)
285
+ @on_enter&.call(value)
286
+ api_sdk_v1_user_metadata(value.user_metadata) if value.has_user_metadata?
287
+ api_command_v1_schedule_activity_task_command_attributes(value.schedule_activity_task_command_attributes) if value.has_schedule_activity_task_command_attributes?
288
+ api_command_v1_complete_workflow_execution_command_attributes(value.complete_workflow_execution_command_attributes) if value.has_complete_workflow_execution_command_attributes?
289
+ api_command_v1_fail_workflow_execution_command_attributes(value.fail_workflow_execution_command_attributes) if value.has_fail_workflow_execution_command_attributes?
290
+ api_command_v1_cancel_workflow_execution_command_attributes(value.cancel_workflow_execution_command_attributes) if value.has_cancel_workflow_execution_command_attributes?
291
+ api_command_v1_record_marker_command_attributes(value.record_marker_command_attributes) if value.has_record_marker_command_attributes?
292
+ api_command_v1_continue_as_new_workflow_execution_command_attributes(value.continue_as_new_workflow_execution_command_attributes) if value.has_continue_as_new_workflow_execution_command_attributes?
293
+ api_command_v1_start_child_workflow_execution_command_attributes(value.start_child_workflow_execution_command_attributes) if value.has_start_child_workflow_execution_command_attributes?
294
+ api_command_v1_signal_external_workflow_execution_command_attributes(value.signal_external_workflow_execution_command_attributes) if value.has_signal_external_workflow_execution_command_attributes?
295
+ api_command_v1_upsert_workflow_search_attributes_command_attributes(value.upsert_workflow_search_attributes_command_attributes) if value.has_upsert_workflow_search_attributes_command_attributes?
296
+ api_command_v1_modify_workflow_properties_command_attributes(value.modify_workflow_properties_command_attributes) if value.has_modify_workflow_properties_command_attributes?
297
+ api_command_v1_schedule_nexus_operation_command_attributes(value.schedule_nexus_operation_command_attributes) if value.has_schedule_nexus_operation_command_attributes?
298
+ @on_exit&.call(value)
299
+ end
300
+
301
+ def api_command_v1_complete_workflow_execution_command_attributes(value)
302
+ @on_enter&.call(value)
303
+ api_common_v1_payloads(value.result) if value.has_result?
304
+ @on_exit&.call(value)
305
+ end
306
+
307
+ def api_command_v1_continue_as_new_workflow_execution_command_attributes(value)
308
+ @on_enter&.call(value)
309
+ api_common_v1_payloads(value.input) if value.has_input?
310
+ api_failure_v1_failure(value.failure) if value.has_failure?
311
+ api_common_v1_payloads(value.last_completion_result) if value.has_last_completion_result?
312
+ api_common_v1_header(value.header) if value.has_header?
313
+ api_common_v1_memo(value.memo) if value.has_memo?
314
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
315
+ @on_exit&.call(value)
316
+ end
317
+
318
+ def api_command_v1_fail_workflow_execution_command_attributes(value)
319
+ @on_enter&.call(value)
320
+ api_failure_v1_failure(value.failure) if value.has_failure?
321
+ @on_exit&.call(value)
322
+ end
323
+
324
+ def api_command_v1_modify_workflow_properties_command_attributes(value)
325
+ @on_enter&.call(value)
326
+ api_common_v1_memo(value.upserted_memo) if value.has_upserted_memo?
327
+ @on_exit&.call(value)
328
+ end
329
+
330
+ def api_command_v1_record_marker_command_attributes(value)
331
+ @on_enter&.call(value)
332
+ value.details.values.each { |v| api_common_v1_payloads(v) }
333
+ api_common_v1_header(value.header) if value.has_header?
334
+ api_failure_v1_failure(value.failure) if value.has_failure?
335
+ @on_exit&.call(value)
336
+ end
337
+
338
+ def api_command_v1_schedule_activity_task_command_attributes(value)
339
+ @on_enter&.call(value)
340
+ api_common_v1_header(value.header) if value.has_header?
341
+ api_common_v1_payloads(value.input) if value.has_input?
342
+ @on_exit&.call(value)
343
+ end
344
+
345
+ def api_command_v1_schedule_nexus_operation_command_attributes(value)
346
+ @on_enter&.call(value)
347
+ api_common_v1_payload(value.input) if value.has_input?
348
+ @on_exit&.call(value)
349
+ end
350
+
351
+ def api_command_v1_signal_external_workflow_execution_command_attributes(value)
352
+ @on_enter&.call(value)
353
+ api_common_v1_payloads(value.input) if value.has_input?
354
+ api_common_v1_header(value.header) if value.has_header?
355
+ @on_exit&.call(value)
356
+ end
357
+
358
+ def api_command_v1_start_child_workflow_execution_command_attributes(value)
359
+ @on_enter&.call(value)
360
+ api_common_v1_payloads(value.input) if value.has_input?
361
+ api_common_v1_header(value.header) if value.has_header?
362
+ api_common_v1_memo(value.memo) if value.has_memo?
363
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
364
+ @on_exit&.call(value)
365
+ end
366
+
367
+ def api_command_v1_upsert_workflow_search_attributes_command_attributes(value)
368
+ @on_enter&.call(value)
369
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
370
+ @on_exit&.call(value)
371
+ end
372
+
373
+ def api_common_v1_header(value)
374
+ @on_enter&.call(value)
375
+ value.fields.values.each { |v| api_common_v1_payload(v) }
376
+ @on_exit&.call(value)
377
+ end
378
+
379
+ def api_common_v1_memo(value)
380
+ @on_enter&.call(value)
381
+ value.fields.values.each { |v| api_common_v1_payload(v) }
382
+ @on_exit&.call(value)
383
+ end
384
+
385
+ def api_common_v1_payloads(value)
386
+ @on_enter&.call(value)
387
+ api_common_v1_payload_repeated(value.payloads) unless value.payloads.empty?
388
+ @on_exit&.call(value)
389
+ end
390
+
391
+ def api_common_v1_search_attributes(value)
392
+ return if @skip_search_attributes
393
+ @on_enter&.call(value)
394
+ value.indexed_fields.values.each { |v| api_common_v1_payload(v) }
395
+ @on_exit&.call(value)
396
+ end
397
+
398
+ def api_export_v1_workflow_execution(value)
399
+ @on_enter&.call(value)
400
+ api_history_v1_history(value.history) if value.has_history?
401
+ @on_exit&.call(value)
402
+ end
403
+
404
+ def api_export_v1_workflow_executions(value)
405
+ @on_enter&.call(value)
406
+ value.items.each { |v| api_export_v1_workflow_execution(v) }
407
+ @on_exit&.call(value)
408
+ end
409
+
410
+ def api_failure_v1_application_failure_info(value)
411
+ @on_enter&.call(value)
412
+ api_common_v1_payloads(value.details) if value.has_details?
413
+ @on_exit&.call(value)
414
+ end
415
+
416
+ def api_failure_v1_canceled_failure_info(value)
417
+ @on_enter&.call(value)
418
+ api_common_v1_payloads(value.details) if value.has_details?
419
+ @on_exit&.call(value)
420
+ end
421
+
422
+ def api_failure_v1_failure(value)
423
+ @on_enter&.call(value)
424
+ api_common_v1_payload(value.encoded_attributes) if value.has_encoded_attributes?
425
+ api_failure_v1_failure(value.cause) if value.has_cause?
426
+ api_failure_v1_application_failure_info(value.application_failure_info) if value.has_application_failure_info?
427
+ api_failure_v1_timeout_failure_info(value.timeout_failure_info) if value.has_timeout_failure_info?
428
+ api_failure_v1_canceled_failure_info(value.canceled_failure_info) if value.has_canceled_failure_info?
429
+ api_failure_v1_reset_workflow_failure_info(value.reset_workflow_failure_info) if value.has_reset_workflow_failure_info?
430
+ @on_exit&.call(value)
431
+ end
432
+
433
+ def api_failure_v1_reset_workflow_failure_info(value)
434
+ @on_enter&.call(value)
435
+ api_common_v1_payloads(value.last_heartbeat_details) if value.has_last_heartbeat_details?
436
+ @on_exit&.call(value)
437
+ end
438
+
439
+ def api_failure_v1_timeout_failure_info(value)
440
+ @on_enter&.call(value)
441
+ api_common_v1_payloads(value.last_heartbeat_details) if value.has_last_heartbeat_details?
442
+ @on_exit&.call(value)
443
+ end
444
+
445
+ def api_history_v1_activity_task_canceled_event_attributes(value)
446
+ @on_enter&.call(value)
447
+ api_common_v1_payloads(value.details) if value.has_details?
448
+ @on_exit&.call(value)
449
+ end
450
+
451
+ def api_history_v1_activity_task_completed_event_attributes(value)
452
+ @on_enter&.call(value)
453
+ api_common_v1_payloads(value.result) if value.has_result?
454
+ @on_exit&.call(value)
455
+ end
456
+
457
+ def api_history_v1_activity_task_failed_event_attributes(value)
458
+ @on_enter&.call(value)
459
+ api_failure_v1_failure(value.failure) if value.has_failure?
460
+ @on_exit&.call(value)
461
+ end
462
+
463
+ def api_history_v1_activity_task_scheduled_event_attributes(value)
464
+ @on_enter&.call(value)
465
+ api_common_v1_header(value.header) if value.has_header?
466
+ api_common_v1_payloads(value.input) if value.has_input?
467
+ @on_exit&.call(value)
468
+ end
469
+
470
+ def api_history_v1_activity_task_started_event_attributes(value)
471
+ @on_enter&.call(value)
472
+ api_failure_v1_failure(value.last_failure) if value.has_last_failure?
473
+ @on_exit&.call(value)
474
+ end
475
+
476
+ def api_history_v1_activity_task_timed_out_event_attributes(value)
477
+ @on_enter&.call(value)
478
+ api_failure_v1_failure(value.failure) if value.has_failure?
479
+ @on_exit&.call(value)
480
+ end
481
+
482
+ def api_history_v1_child_workflow_execution_canceled_event_attributes(value)
483
+ @on_enter&.call(value)
484
+ api_common_v1_payloads(value.details) if value.has_details?
485
+ @on_exit&.call(value)
486
+ end
487
+
488
+ def api_history_v1_child_workflow_execution_completed_event_attributes(value)
489
+ @on_enter&.call(value)
490
+ api_common_v1_payloads(value.result) if value.has_result?
491
+ @on_exit&.call(value)
492
+ end
493
+
494
+ def api_history_v1_child_workflow_execution_failed_event_attributes(value)
495
+ @on_enter&.call(value)
496
+ api_failure_v1_failure(value.failure) if value.has_failure?
497
+ @on_exit&.call(value)
498
+ end
499
+
500
+ def api_history_v1_child_workflow_execution_started_event_attributes(value)
501
+ @on_enter&.call(value)
502
+ api_common_v1_header(value.header) if value.has_header?
503
+ @on_exit&.call(value)
504
+ end
505
+
506
+ def api_history_v1_history(value)
507
+ @on_enter&.call(value)
508
+ value.events.each { |v| api_history_v1_history_event(v) }
509
+ @on_exit&.call(value)
510
+ end
511
+
512
+ def api_history_v1_history_event(value)
513
+ @on_enter&.call(value)
514
+ api_sdk_v1_user_metadata(value.user_metadata) if value.has_user_metadata?
515
+ api_history_v1_workflow_execution_started_event_attributes(value.workflow_execution_started_event_attributes) if value.has_workflow_execution_started_event_attributes?
516
+ api_history_v1_workflow_execution_completed_event_attributes(value.workflow_execution_completed_event_attributes) if value.has_workflow_execution_completed_event_attributes?
517
+ api_history_v1_workflow_execution_failed_event_attributes(value.workflow_execution_failed_event_attributes) if value.has_workflow_execution_failed_event_attributes?
518
+ api_history_v1_workflow_task_failed_event_attributes(value.workflow_task_failed_event_attributes) if value.has_workflow_task_failed_event_attributes?
519
+ api_history_v1_activity_task_scheduled_event_attributes(value.activity_task_scheduled_event_attributes) if value.has_activity_task_scheduled_event_attributes?
520
+ api_history_v1_activity_task_started_event_attributes(value.activity_task_started_event_attributes) if value.has_activity_task_started_event_attributes?
521
+ api_history_v1_activity_task_completed_event_attributes(value.activity_task_completed_event_attributes) if value.has_activity_task_completed_event_attributes?
522
+ api_history_v1_activity_task_failed_event_attributes(value.activity_task_failed_event_attributes) if value.has_activity_task_failed_event_attributes?
523
+ api_history_v1_activity_task_timed_out_event_attributes(value.activity_task_timed_out_event_attributes) if value.has_activity_task_timed_out_event_attributes?
524
+ api_history_v1_activity_task_canceled_event_attributes(value.activity_task_canceled_event_attributes) if value.has_activity_task_canceled_event_attributes?
525
+ api_history_v1_marker_recorded_event_attributes(value.marker_recorded_event_attributes) if value.has_marker_recorded_event_attributes?
526
+ api_history_v1_workflow_execution_signaled_event_attributes(value.workflow_execution_signaled_event_attributes) if value.has_workflow_execution_signaled_event_attributes?
527
+ api_history_v1_workflow_execution_terminated_event_attributes(value.workflow_execution_terminated_event_attributes) if value.has_workflow_execution_terminated_event_attributes?
528
+ api_history_v1_workflow_execution_canceled_event_attributes(value.workflow_execution_canceled_event_attributes) if value.has_workflow_execution_canceled_event_attributes?
529
+ api_history_v1_workflow_execution_continued_as_new_event_attributes(value.workflow_execution_continued_as_new_event_attributes) if value.has_workflow_execution_continued_as_new_event_attributes?
530
+ api_history_v1_start_child_workflow_execution_initiated_event_attributes(value.start_child_workflow_execution_initiated_event_attributes) if value.has_start_child_workflow_execution_initiated_event_attributes?
531
+ api_history_v1_child_workflow_execution_started_event_attributes(value.child_workflow_execution_started_event_attributes) if value.has_child_workflow_execution_started_event_attributes?
532
+ api_history_v1_child_workflow_execution_completed_event_attributes(value.child_workflow_execution_completed_event_attributes) if value.has_child_workflow_execution_completed_event_attributes?
533
+ api_history_v1_child_workflow_execution_failed_event_attributes(value.child_workflow_execution_failed_event_attributes) if value.has_child_workflow_execution_failed_event_attributes?
534
+ api_history_v1_child_workflow_execution_canceled_event_attributes(value.child_workflow_execution_canceled_event_attributes) if value.has_child_workflow_execution_canceled_event_attributes?
535
+ api_history_v1_signal_external_workflow_execution_initiated_event_attributes(value.signal_external_workflow_execution_initiated_event_attributes) if value.has_signal_external_workflow_execution_initiated_event_attributes?
536
+ api_history_v1_upsert_workflow_search_attributes_event_attributes(value.upsert_workflow_search_attributes_event_attributes) if value.has_upsert_workflow_search_attributes_event_attributes?
537
+ api_history_v1_workflow_execution_update_accepted_event_attributes(value.workflow_execution_update_accepted_event_attributes) if value.has_workflow_execution_update_accepted_event_attributes?
538
+ api_history_v1_workflow_execution_update_rejected_event_attributes(value.workflow_execution_update_rejected_event_attributes) if value.has_workflow_execution_update_rejected_event_attributes?
539
+ api_history_v1_workflow_execution_update_completed_event_attributes(value.workflow_execution_update_completed_event_attributes) if value.has_workflow_execution_update_completed_event_attributes?
540
+ api_history_v1_workflow_properties_modified_externally_event_attributes(value.workflow_properties_modified_externally_event_attributes) if value.has_workflow_properties_modified_externally_event_attributes?
541
+ api_history_v1_workflow_properties_modified_event_attributes(value.workflow_properties_modified_event_attributes) if value.has_workflow_properties_modified_event_attributes?
542
+ api_history_v1_workflow_execution_update_admitted_event_attributes(value.workflow_execution_update_admitted_event_attributes) if value.has_workflow_execution_update_admitted_event_attributes?
543
+ api_history_v1_nexus_operation_scheduled_event_attributes(value.nexus_operation_scheduled_event_attributes) if value.has_nexus_operation_scheduled_event_attributes?
544
+ api_history_v1_nexus_operation_completed_event_attributes(value.nexus_operation_completed_event_attributes) if value.has_nexus_operation_completed_event_attributes?
545
+ api_history_v1_nexus_operation_failed_event_attributes(value.nexus_operation_failed_event_attributes) if value.has_nexus_operation_failed_event_attributes?
546
+ api_history_v1_nexus_operation_canceled_event_attributes(value.nexus_operation_canceled_event_attributes) if value.has_nexus_operation_canceled_event_attributes?
547
+ api_history_v1_nexus_operation_timed_out_event_attributes(value.nexus_operation_timed_out_event_attributes) if value.has_nexus_operation_timed_out_event_attributes?
548
+ @on_exit&.call(value)
549
+ end
550
+
551
+ def api_history_v1_marker_recorded_event_attributes(value)
552
+ @on_enter&.call(value)
553
+ value.details.values.each { |v| api_common_v1_payloads(v) }
554
+ api_common_v1_header(value.header) if value.has_header?
555
+ api_failure_v1_failure(value.failure) if value.has_failure?
556
+ @on_exit&.call(value)
557
+ end
558
+
559
+ def api_history_v1_nexus_operation_canceled_event_attributes(value)
560
+ @on_enter&.call(value)
561
+ api_failure_v1_failure(value.failure) if value.has_failure?
562
+ @on_exit&.call(value)
563
+ end
564
+
565
+ def api_history_v1_nexus_operation_completed_event_attributes(value)
566
+ @on_enter&.call(value)
567
+ api_common_v1_payload(value.result) if value.has_result?
568
+ @on_exit&.call(value)
569
+ end
570
+
571
+ def api_history_v1_nexus_operation_failed_event_attributes(value)
572
+ @on_enter&.call(value)
573
+ api_failure_v1_failure(value.failure) if value.has_failure?
574
+ @on_exit&.call(value)
575
+ end
576
+
577
+ def api_history_v1_nexus_operation_scheduled_event_attributes(value)
578
+ @on_enter&.call(value)
579
+ api_common_v1_payload(value.input) if value.has_input?
580
+ @on_exit&.call(value)
581
+ end
582
+
583
+ def api_history_v1_nexus_operation_timed_out_event_attributes(value)
584
+ @on_enter&.call(value)
585
+ api_failure_v1_failure(value.failure) if value.has_failure?
586
+ @on_exit&.call(value)
587
+ end
588
+
589
+ def api_history_v1_signal_external_workflow_execution_initiated_event_attributes(value)
590
+ @on_enter&.call(value)
591
+ api_common_v1_payloads(value.input) if value.has_input?
592
+ api_common_v1_header(value.header) if value.has_header?
593
+ @on_exit&.call(value)
594
+ end
595
+
596
+ def api_history_v1_start_child_workflow_execution_initiated_event_attributes(value)
597
+ @on_enter&.call(value)
598
+ api_common_v1_payloads(value.input) if value.has_input?
599
+ api_common_v1_header(value.header) if value.has_header?
600
+ api_common_v1_memo(value.memo) if value.has_memo?
601
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
602
+ @on_exit&.call(value)
603
+ end
604
+
605
+ def api_history_v1_upsert_workflow_search_attributes_event_attributes(value)
606
+ @on_enter&.call(value)
607
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
608
+ @on_exit&.call(value)
609
+ end
610
+
611
+ def api_history_v1_workflow_execution_canceled_event_attributes(value)
612
+ @on_enter&.call(value)
613
+ api_common_v1_payloads(value.details) if value.has_details?
614
+ @on_exit&.call(value)
615
+ end
616
+
617
+ def api_history_v1_workflow_execution_completed_event_attributes(value)
618
+ @on_enter&.call(value)
619
+ api_common_v1_payloads(value.result) if value.has_result?
620
+ @on_exit&.call(value)
621
+ end
622
+
623
+ def api_history_v1_workflow_execution_continued_as_new_event_attributes(value)
624
+ @on_enter&.call(value)
625
+ api_common_v1_payloads(value.input) if value.has_input?
626
+ api_failure_v1_failure(value.failure) if value.has_failure?
627
+ api_common_v1_payloads(value.last_completion_result) if value.has_last_completion_result?
628
+ api_common_v1_header(value.header) if value.has_header?
629
+ api_common_v1_memo(value.memo) if value.has_memo?
630
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
631
+ @on_exit&.call(value)
632
+ end
633
+
634
+ def api_history_v1_workflow_execution_failed_event_attributes(value)
635
+ @on_enter&.call(value)
636
+ api_failure_v1_failure(value.failure) if value.has_failure?
637
+ @on_exit&.call(value)
638
+ end
639
+
640
+ def api_history_v1_workflow_execution_signaled_event_attributes(value)
641
+ @on_enter&.call(value)
642
+ api_common_v1_payloads(value.input) if value.has_input?
643
+ api_common_v1_header(value.header) if value.has_header?
644
+ @on_exit&.call(value)
645
+ end
646
+
647
+ def api_history_v1_workflow_execution_started_event_attributes(value)
648
+ @on_enter&.call(value)
649
+ api_common_v1_payloads(value.input) if value.has_input?
650
+ api_failure_v1_failure(value.continued_failure) if value.has_continued_failure?
651
+ api_common_v1_payloads(value.last_completion_result) if value.has_last_completion_result?
652
+ api_common_v1_memo(value.memo) if value.has_memo?
653
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
654
+ api_common_v1_header(value.header) if value.has_header?
655
+ @on_exit&.call(value)
656
+ end
657
+
658
+ def api_history_v1_workflow_execution_terminated_event_attributes(value)
659
+ @on_enter&.call(value)
660
+ api_common_v1_payloads(value.details) if value.has_details?
661
+ @on_exit&.call(value)
662
+ end
663
+
664
+ def api_history_v1_workflow_execution_update_accepted_event_attributes(value)
665
+ @on_enter&.call(value)
666
+ api_update_v1_request(value.accepted_request) if value.has_accepted_request?
667
+ @on_exit&.call(value)
668
+ end
669
+
670
+ def api_history_v1_workflow_execution_update_admitted_event_attributes(value)
671
+ @on_enter&.call(value)
672
+ api_update_v1_request(value.request) if value.has_request?
673
+ @on_exit&.call(value)
674
+ end
675
+
676
+ def api_history_v1_workflow_execution_update_completed_event_attributes(value)
677
+ @on_enter&.call(value)
678
+ api_update_v1_outcome(value.outcome) if value.has_outcome?
679
+ @on_exit&.call(value)
680
+ end
681
+
682
+ def api_history_v1_workflow_execution_update_rejected_event_attributes(value)
683
+ @on_enter&.call(value)
684
+ api_update_v1_request(value.rejected_request) if value.has_rejected_request?
685
+ api_failure_v1_failure(value.failure) if value.has_failure?
686
+ @on_exit&.call(value)
687
+ end
688
+
689
+ def api_history_v1_workflow_properties_modified_event_attributes(value)
690
+ @on_enter&.call(value)
691
+ api_common_v1_memo(value.upserted_memo) if value.has_upserted_memo?
692
+ @on_exit&.call(value)
693
+ end
694
+
695
+ def api_history_v1_workflow_properties_modified_externally_event_attributes(value)
696
+ @on_enter&.call(value)
697
+ api_common_v1_memo(value.upserted_memo) if value.has_upserted_memo?
698
+ @on_exit&.call(value)
699
+ end
700
+
701
+ def api_history_v1_workflow_task_failed_event_attributes(value)
702
+ @on_enter&.call(value)
703
+ api_failure_v1_failure(value.failure) if value.has_failure?
704
+ @on_exit&.call(value)
705
+ end
706
+
707
+ def api_nexus_v1_endpoint(value)
708
+ @on_enter&.call(value)
709
+ api_nexus_v1_endpoint_spec(value.spec) if value.has_spec?
710
+ @on_exit&.call(value)
711
+ end
712
+
713
+ def api_nexus_v1_endpoint_spec(value)
714
+ @on_enter&.call(value)
715
+ api_common_v1_payload(value.description) if value.has_description?
716
+ @on_exit&.call(value)
717
+ end
718
+
719
+ def api_nexus_v1_request(value)
720
+ @on_enter&.call(value)
721
+ api_nexus_v1_start_operation_request(value.start_operation) if value.has_start_operation?
722
+ @on_exit&.call(value)
723
+ end
724
+
725
+ def api_nexus_v1_response(value)
726
+ @on_enter&.call(value)
727
+ api_nexus_v1_start_operation_response(value.start_operation) if value.has_start_operation?
728
+ @on_exit&.call(value)
729
+ end
730
+
731
+ def api_nexus_v1_start_operation_request(value)
732
+ @on_enter&.call(value)
733
+ api_common_v1_payload(value.payload) if value.has_payload?
734
+ @on_exit&.call(value)
735
+ end
736
+
737
+ def api_nexus_v1_start_operation_response(value)
738
+ @on_enter&.call(value)
739
+ api_nexus_v1_start_operation_response_sync(value.sync_success) if value.has_sync_success?
740
+ @on_exit&.call(value)
741
+ end
742
+
743
+ def api_nexus_v1_start_operation_response_sync(value)
744
+ @on_enter&.call(value)
745
+ api_common_v1_payload(value.payload) if value.has_payload?
746
+ @on_exit&.call(value)
747
+ end
748
+
749
+ def api_operatorservice_v1_create_nexus_endpoint_request(value)
750
+ @on_enter&.call(value)
751
+ api_nexus_v1_endpoint_spec(value.spec) if value.has_spec?
752
+ @on_exit&.call(value)
753
+ end
754
+
755
+ def api_operatorservice_v1_create_nexus_endpoint_response(value)
756
+ @on_enter&.call(value)
757
+ api_nexus_v1_endpoint(value.endpoint) if value.has_endpoint?
758
+ @on_exit&.call(value)
759
+ end
760
+
761
+ def api_operatorservice_v1_get_nexus_endpoint_response(value)
762
+ @on_enter&.call(value)
763
+ api_nexus_v1_endpoint(value.endpoint) if value.has_endpoint?
764
+ @on_exit&.call(value)
765
+ end
766
+
767
+ def api_operatorservice_v1_list_nexus_endpoints_response(value)
768
+ @on_enter&.call(value)
769
+ value.endpoints.each { |v| api_nexus_v1_endpoint(v) }
770
+ @on_exit&.call(value)
771
+ end
772
+
773
+ def api_operatorservice_v1_update_nexus_endpoint_request(value)
774
+ @on_enter&.call(value)
775
+ api_nexus_v1_endpoint_spec(value.spec) if value.has_spec?
776
+ @on_exit&.call(value)
777
+ end
778
+
779
+ def api_operatorservice_v1_update_nexus_endpoint_response(value)
780
+ @on_enter&.call(value)
781
+ api_nexus_v1_endpoint(value.endpoint) if value.has_endpoint?
782
+ @on_exit&.call(value)
783
+ end
784
+
785
+ def api_protocol_v1_message(value)
786
+ @on_enter&.call(value)
787
+ google_protobuf_any(value.body) if value.has_body?
788
+ @on_exit&.call(value)
789
+ end
790
+
791
+ def api_query_v1_workflow_query(value)
792
+ @on_enter&.call(value)
793
+ api_common_v1_payloads(value.query_args) if value.has_query_args?
794
+ api_common_v1_header(value.header) if value.has_header?
795
+ @on_exit&.call(value)
796
+ end
797
+
798
+ def api_query_v1_workflow_query_result(value)
799
+ @on_enter&.call(value)
800
+ api_common_v1_payloads(value.answer) if value.has_answer?
801
+ @on_exit&.call(value)
802
+ end
803
+
804
+ def api_schedule_v1_schedule(value)
805
+ @on_enter&.call(value)
806
+ api_schedule_v1_schedule_action(value.action) if value.has_action?
807
+ @on_exit&.call(value)
808
+ end
809
+
810
+ def api_schedule_v1_schedule_action(value)
811
+ @on_enter&.call(value)
812
+ api_workflow_v1_new_workflow_execution_info(value.start_workflow) if value.has_start_workflow?
813
+ @on_exit&.call(value)
814
+ end
815
+
816
+ def api_schedule_v1_schedule_list_entry(value)
817
+ @on_enter&.call(value)
818
+ api_common_v1_memo(value.memo) if value.has_memo?
819
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
820
+ @on_exit&.call(value)
821
+ end
822
+
823
+ def api_sdk_v1_user_metadata(value)
824
+ @on_enter&.call(value)
825
+ api_common_v1_payload(value.summary) if value.has_summary?
826
+ api_common_v1_payload(value.details) if value.has_details?
827
+ @on_exit&.call(value)
828
+ end
829
+
830
+ def api_update_v1_input(value)
831
+ @on_enter&.call(value)
832
+ api_common_v1_header(value.header) if value.has_header?
833
+ api_common_v1_payloads(value.args) if value.has_args?
834
+ @on_exit&.call(value)
835
+ end
836
+
837
+ def api_update_v1_outcome(value)
838
+ @on_enter&.call(value)
839
+ api_common_v1_payloads(value.success) if value.has_success?
840
+ api_failure_v1_failure(value.failure) if value.has_failure?
841
+ @on_exit&.call(value)
842
+ end
843
+
844
+ def api_update_v1_request(value)
845
+ @on_enter&.call(value)
846
+ api_update_v1_input(value.input) if value.has_input?
847
+ @on_exit&.call(value)
848
+ end
849
+
850
+ def api_workflow_v1_callback_info(value)
851
+ @on_enter&.call(value)
852
+ api_failure_v1_failure(value.last_attempt_failure) if value.has_last_attempt_failure?
853
+ @on_exit&.call(value)
854
+ end
855
+
856
+ def api_workflow_v1_new_workflow_execution_info(value)
857
+ @on_enter&.call(value)
858
+ api_common_v1_payloads(value.input) if value.has_input?
859
+ api_common_v1_memo(value.memo) if value.has_memo?
860
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
861
+ api_common_v1_header(value.header) if value.has_header?
862
+ api_sdk_v1_user_metadata(value.user_metadata) if value.has_user_metadata?
863
+ @on_exit&.call(value)
864
+ end
865
+
866
+ def api_workflow_v1_nexus_operation_cancellation_info(value)
867
+ @on_enter&.call(value)
868
+ api_failure_v1_failure(value.last_attempt_failure) if value.has_last_attempt_failure?
869
+ @on_exit&.call(value)
870
+ end
871
+
872
+ def api_workflow_v1_pending_activity_info(value)
873
+ @on_enter&.call(value)
874
+ api_common_v1_payloads(value.heartbeat_details) if value.has_heartbeat_details?
875
+ api_failure_v1_failure(value.last_failure) if value.has_last_failure?
876
+ @on_exit&.call(value)
877
+ end
878
+
879
+ def api_workflow_v1_pending_nexus_operation_info(value)
880
+ @on_enter&.call(value)
881
+ api_failure_v1_failure(value.last_attempt_failure) if value.has_last_attempt_failure?
882
+ api_workflow_v1_nexus_operation_cancellation_info(value.cancellation_info) if value.has_cancellation_info?
883
+ @on_exit&.call(value)
884
+ end
885
+
886
+ def api_workflow_v1_workflow_execution_config(value)
887
+ @on_enter&.call(value)
888
+ api_sdk_v1_user_metadata(value.user_metadata) if value.has_user_metadata?
889
+ @on_exit&.call(value)
890
+ end
891
+
892
+ def api_workflow_v1_workflow_execution_info(value)
893
+ @on_enter&.call(value)
894
+ api_common_v1_memo(value.memo) if value.has_memo?
895
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
896
+ @on_exit&.call(value)
897
+ end
898
+
899
+ def api_workflowservice_v1_count_workflow_executions_response(value)
900
+ @on_enter&.call(value)
901
+ value.groups.each { |v| api_workflowservice_v1_count_workflow_executions_response_aggregation_group(v) }
902
+ @on_exit&.call(value)
903
+ end
904
+
905
+ def api_workflowservice_v1_count_workflow_executions_response_aggregation_group(value)
906
+ @on_enter&.call(value)
907
+ api_common_v1_payload_repeated(value.group_values) unless value.group_values.empty?
908
+ @on_exit&.call(value)
909
+ end
910
+
911
+ def api_workflowservice_v1_create_schedule_request(value)
912
+ @on_enter&.call(value)
913
+ api_schedule_v1_schedule(value.schedule) if value.has_schedule?
914
+ api_common_v1_memo(value.memo) if value.has_memo?
915
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
916
+ @on_exit&.call(value)
917
+ end
918
+
919
+ def api_workflowservice_v1_describe_schedule_response(value)
920
+ @on_enter&.call(value)
921
+ api_schedule_v1_schedule(value.schedule) if value.has_schedule?
922
+ api_common_v1_memo(value.memo) if value.has_memo?
923
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
924
+ @on_exit&.call(value)
925
+ end
926
+
927
+ def api_workflowservice_v1_describe_workflow_execution_response(value)
928
+ @on_enter&.call(value)
929
+ api_workflow_v1_workflow_execution_config(value.execution_config) if value.has_execution_config?
930
+ api_workflow_v1_workflow_execution_info(value.workflow_execution_info) if value.has_workflow_execution_info?
931
+ value.pending_activities.each { |v| api_workflow_v1_pending_activity_info(v) }
932
+ value.callbacks.each { |v| api_workflow_v1_callback_info(v) }
933
+ value.pending_nexus_operations.each { |v| api_workflow_v1_pending_nexus_operation_info(v) }
934
+ @on_exit&.call(value)
935
+ end
936
+
937
+ def api_workflowservice_v1_execute_multi_operation_request(value)
938
+ @on_enter&.call(value)
939
+ value.operations.each { |v| api_workflowservice_v1_execute_multi_operation_request_operation(v) }
940
+ @on_exit&.call(value)
941
+ end
942
+
943
+ def api_workflowservice_v1_execute_multi_operation_request_operation(value)
944
+ @on_enter&.call(value)
945
+ api_workflowservice_v1_start_workflow_execution_request(value.start_workflow) if value.has_start_workflow?
946
+ api_workflowservice_v1_update_workflow_execution_request(value.update_workflow) if value.has_update_workflow?
947
+ @on_exit&.call(value)
948
+ end
949
+
950
+ def api_workflowservice_v1_execute_multi_operation_response(value)
951
+ @on_enter&.call(value)
952
+ value.responses.each { |v| api_workflowservice_v1_execute_multi_operation_response_response(v) }
953
+ @on_exit&.call(value)
954
+ end
955
+
956
+ def api_workflowservice_v1_execute_multi_operation_response_response(value)
957
+ @on_enter&.call(value)
958
+ api_workflowservice_v1_start_workflow_execution_response(value.start_workflow) if value.has_start_workflow?
959
+ api_workflowservice_v1_update_workflow_execution_response(value.update_workflow) if value.has_update_workflow?
960
+ @on_exit&.call(value)
961
+ end
962
+
963
+ def api_workflowservice_v1_get_workflow_execution_history_response(value)
964
+ @on_enter&.call(value)
965
+ api_history_v1_history(value.history) if value.has_history?
966
+ @on_exit&.call(value)
967
+ end
968
+
969
+ def api_workflowservice_v1_get_workflow_execution_history_reverse_response(value)
970
+ @on_enter&.call(value)
971
+ api_history_v1_history(value.history) if value.has_history?
972
+ @on_exit&.call(value)
973
+ end
974
+
975
+ def api_workflowservice_v1_list_archived_workflow_executions_response(value)
976
+ @on_enter&.call(value)
977
+ value.executions.each { |v| api_workflow_v1_workflow_execution_info(v) }
978
+ @on_exit&.call(value)
979
+ end
980
+
981
+ def api_workflowservice_v1_list_closed_workflow_executions_response(value)
982
+ @on_enter&.call(value)
983
+ value.executions.each { |v| api_workflow_v1_workflow_execution_info(v) }
984
+ @on_exit&.call(value)
985
+ end
986
+
987
+ def api_workflowservice_v1_list_open_workflow_executions_response(value)
988
+ @on_enter&.call(value)
989
+ value.executions.each { |v| api_workflow_v1_workflow_execution_info(v) }
990
+ @on_exit&.call(value)
991
+ end
992
+
993
+ def api_workflowservice_v1_list_schedules_response(value)
994
+ @on_enter&.call(value)
995
+ value.schedules.each { |v| api_schedule_v1_schedule_list_entry(v) }
996
+ @on_exit&.call(value)
997
+ end
998
+
999
+ def api_workflowservice_v1_list_workflow_executions_response(value)
1000
+ @on_enter&.call(value)
1001
+ value.executions.each { |v| api_workflow_v1_workflow_execution_info(v) }
1002
+ @on_exit&.call(value)
1003
+ end
1004
+
1005
+ def api_workflowservice_v1_poll_activity_task_queue_response(value)
1006
+ @on_enter&.call(value)
1007
+ api_common_v1_header(value.header) if value.has_header?
1008
+ api_common_v1_payloads(value.input) if value.has_input?
1009
+ api_common_v1_payloads(value.heartbeat_details) if value.has_heartbeat_details?
1010
+ @on_exit&.call(value)
1011
+ end
1012
+
1013
+ def api_workflowservice_v1_poll_nexus_task_queue_response(value)
1014
+ @on_enter&.call(value)
1015
+ api_nexus_v1_request(value.request) if value.has_request?
1016
+ @on_exit&.call(value)
1017
+ end
1018
+
1019
+ def api_workflowservice_v1_poll_workflow_execution_update_response(value)
1020
+ @on_enter&.call(value)
1021
+ api_update_v1_outcome(value.outcome) if value.has_outcome?
1022
+ @on_exit&.call(value)
1023
+ end
1024
+
1025
+ def api_workflowservice_v1_poll_workflow_task_queue_response(value)
1026
+ @on_enter&.call(value)
1027
+ api_history_v1_history(value.history) if value.has_history?
1028
+ api_query_v1_workflow_query(value.query) if value.has_query?
1029
+ value.queries.values.each { |v| api_query_v1_workflow_query(v) }
1030
+ value.messages.each { |v| api_protocol_v1_message(v) }
1031
+ @on_exit&.call(value)
1032
+ end
1033
+
1034
+ def api_workflowservice_v1_query_workflow_request(value)
1035
+ @on_enter&.call(value)
1036
+ api_query_v1_workflow_query(value.query) if value.has_query?
1037
+ @on_exit&.call(value)
1038
+ end
1039
+
1040
+ def api_workflowservice_v1_query_workflow_response(value)
1041
+ @on_enter&.call(value)
1042
+ api_common_v1_payloads(value.query_result) if value.has_query_result?
1043
+ @on_exit&.call(value)
1044
+ end
1045
+
1046
+ def api_workflowservice_v1_record_activity_task_heartbeat_by_id_request(value)
1047
+ @on_enter&.call(value)
1048
+ api_common_v1_payloads(value.details) if value.has_details?
1049
+ @on_exit&.call(value)
1050
+ end
1051
+
1052
+ def api_workflowservice_v1_record_activity_task_heartbeat_request(value)
1053
+ @on_enter&.call(value)
1054
+ api_common_v1_payloads(value.details) if value.has_details?
1055
+ @on_exit&.call(value)
1056
+ end
1057
+
1058
+ def api_workflowservice_v1_respond_activity_task_canceled_by_id_request(value)
1059
+ @on_enter&.call(value)
1060
+ api_common_v1_payloads(value.details) if value.has_details?
1061
+ @on_exit&.call(value)
1062
+ end
1063
+
1064
+ def api_workflowservice_v1_respond_activity_task_canceled_request(value)
1065
+ @on_enter&.call(value)
1066
+ api_common_v1_payloads(value.details) if value.has_details?
1067
+ @on_exit&.call(value)
1068
+ end
1069
+
1070
+ def api_workflowservice_v1_respond_activity_task_completed_by_id_request(value)
1071
+ @on_enter&.call(value)
1072
+ api_common_v1_payloads(value.result) if value.has_result?
1073
+ @on_exit&.call(value)
1074
+ end
1075
+
1076
+ def api_workflowservice_v1_respond_activity_task_completed_request(value)
1077
+ @on_enter&.call(value)
1078
+ api_common_v1_payloads(value.result) if value.has_result?
1079
+ @on_exit&.call(value)
1080
+ end
1081
+
1082
+ def api_workflowservice_v1_respond_activity_task_failed_by_id_request(value)
1083
+ @on_enter&.call(value)
1084
+ api_failure_v1_failure(value.failure) if value.has_failure?
1085
+ api_common_v1_payloads(value.last_heartbeat_details) if value.has_last_heartbeat_details?
1086
+ @on_exit&.call(value)
1087
+ end
1088
+
1089
+ def api_workflowservice_v1_respond_activity_task_failed_by_id_response(value)
1090
+ @on_enter&.call(value)
1091
+ value.failures.each { |v| api_failure_v1_failure(v) }
1092
+ @on_exit&.call(value)
1093
+ end
1094
+
1095
+ def api_workflowservice_v1_respond_activity_task_failed_request(value)
1096
+ @on_enter&.call(value)
1097
+ api_failure_v1_failure(value.failure) if value.has_failure?
1098
+ api_common_v1_payloads(value.last_heartbeat_details) if value.has_last_heartbeat_details?
1099
+ @on_exit&.call(value)
1100
+ end
1101
+
1102
+ def api_workflowservice_v1_respond_activity_task_failed_response(value)
1103
+ @on_enter&.call(value)
1104
+ value.failures.each { |v| api_failure_v1_failure(v) }
1105
+ @on_exit&.call(value)
1106
+ end
1107
+
1108
+ def api_workflowservice_v1_respond_nexus_task_completed_request(value)
1109
+ @on_enter&.call(value)
1110
+ api_nexus_v1_response(value.response) if value.has_response?
1111
+ @on_exit&.call(value)
1112
+ end
1113
+
1114
+ def api_workflowservice_v1_respond_query_task_completed_request(value)
1115
+ @on_enter&.call(value)
1116
+ api_common_v1_payloads(value.query_result) if value.has_query_result?
1117
+ @on_exit&.call(value)
1118
+ end
1119
+
1120
+ def api_workflowservice_v1_respond_workflow_task_completed_request(value)
1121
+ @on_enter&.call(value)
1122
+ value.commands.each { |v| api_command_v1_command(v) }
1123
+ value.query_results.values.each { |v| api_query_v1_workflow_query_result(v) }
1124
+ value.messages.each { |v| api_protocol_v1_message(v) }
1125
+ @on_exit&.call(value)
1126
+ end
1127
+
1128
+ def api_workflowservice_v1_respond_workflow_task_completed_response(value)
1129
+ @on_enter&.call(value)
1130
+ api_workflowservice_v1_poll_workflow_task_queue_response(value.workflow_task) if value.has_workflow_task?
1131
+ value.activity_tasks.each { |v| api_workflowservice_v1_poll_activity_task_queue_response(v) }
1132
+ @on_exit&.call(value)
1133
+ end
1134
+
1135
+ def api_workflowservice_v1_respond_workflow_task_failed_request(value)
1136
+ @on_enter&.call(value)
1137
+ api_failure_v1_failure(value.failure) if value.has_failure?
1138
+ value.messages.each { |v| api_protocol_v1_message(v) }
1139
+ @on_exit&.call(value)
1140
+ end
1141
+
1142
+ def api_workflowservice_v1_scan_workflow_executions_response(value)
1143
+ @on_enter&.call(value)
1144
+ value.executions.each { |v| api_workflow_v1_workflow_execution_info(v) }
1145
+ @on_exit&.call(value)
1146
+ end
1147
+
1148
+ def api_workflowservice_v1_signal_with_start_workflow_execution_request(value)
1149
+ @on_enter&.call(value)
1150
+ api_common_v1_payloads(value.input) if value.has_input?
1151
+ api_common_v1_payloads(value.signal_input) if value.has_signal_input?
1152
+ api_common_v1_memo(value.memo) if value.has_memo?
1153
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
1154
+ api_common_v1_header(value.header) if value.has_header?
1155
+ api_sdk_v1_user_metadata(value.user_metadata) if value.has_user_metadata?
1156
+ @on_exit&.call(value)
1157
+ end
1158
+
1159
+ def api_workflowservice_v1_signal_workflow_execution_request(value)
1160
+ @on_enter&.call(value)
1161
+ api_common_v1_payloads(value.input) if value.has_input?
1162
+ api_common_v1_header(value.header) if value.has_header?
1163
+ @on_exit&.call(value)
1164
+ end
1165
+
1166
+ def api_workflowservice_v1_start_batch_operation_request(value)
1167
+ @on_enter&.call(value)
1168
+ api_batch_v1_batch_operation_termination(value.termination_operation) if value.has_termination_operation?
1169
+ api_batch_v1_batch_operation_signal(value.signal_operation) if value.has_signal_operation?
1170
+ @on_exit&.call(value)
1171
+ end
1172
+
1173
+ def api_workflowservice_v1_start_workflow_execution_request(value)
1174
+ @on_enter&.call(value)
1175
+ api_common_v1_payloads(value.input) if value.has_input?
1176
+ api_common_v1_memo(value.memo) if value.has_memo?
1177
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
1178
+ api_common_v1_header(value.header) if value.has_header?
1179
+ api_failure_v1_failure(value.continued_failure) if value.has_continued_failure?
1180
+ api_common_v1_payloads(value.last_completion_result) if value.has_last_completion_result?
1181
+ api_sdk_v1_user_metadata(value.user_metadata) if value.has_user_metadata?
1182
+ @on_exit&.call(value)
1183
+ end
1184
+
1185
+ def api_workflowservice_v1_start_workflow_execution_response(value)
1186
+ @on_enter&.call(value)
1187
+ api_workflowservice_v1_poll_workflow_task_queue_response(value.eager_workflow_task) if value.has_eager_workflow_task?
1188
+ @on_exit&.call(value)
1189
+ end
1190
+
1191
+ def api_workflowservice_v1_terminate_workflow_execution_request(value)
1192
+ @on_enter&.call(value)
1193
+ api_common_v1_payloads(value.details) if value.has_details?
1194
+ @on_exit&.call(value)
1195
+ end
1196
+
1197
+ def api_workflowservice_v1_update_schedule_request(value)
1198
+ @on_enter&.call(value)
1199
+ api_schedule_v1_schedule(value.schedule) if value.has_schedule?
1200
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
1201
+ @on_exit&.call(value)
1202
+ end
1203
+
1204
+ def api_workflowservice_v1_update_workflow_execution_request(value)
1205
+ @on_enter&.call(value)
1206
+ api_update_v1_request(value.request) if value.has_request?
1207
+ @on_exit&.call(value)
1208
+ end
1209
+
1210
+ def api_workflowservice_v1_update_workflow_execution_response(value)
1211
+ @on_enter&.call(value)
1212
+ api_update_v1_outcome(value.outcome) if value.has_outcome?
1213
+ @on_exit&.call(value)
1214
+ end
1215
+
1216
+ def coresdk_activity_result_activity_resolution(value)
1217
+ @on_enter&.call(value)
1218
+ coresdk_activity_result_success(value.completed) if value.has_completed?
1219
+ coresdk_activity_result_failure(value.failed) if value.has_failed?
1220
+ coresdk_activity_result_cancellation(value.cancelled) if value.has_cancelled?
1221
+ @on_exit&.call(value)
1222
+ end
1223
+
1224
+ def coresdk_activity_result_cancellation(value)
1225
+ @on_enter&.call(value)
1226
+ api_failure_v1_failure(value.failure) if value.has_failure?
1227
+ @on_exit&.call(value)
1228
+ end
1229
+
1230
+ def coresdk_activity_result_failure(value)
1231
+ @on_enter&.call(value)
1232
+ api_failure_v1_failure(value.failure) if value.has_failure?
1233
+ @on_exit&.call(value)
1234
+ end
1235
+
1236
+ def coresdk_activity_result_success(value)
1237
+ @on_enter&.call(value)
1238
+ api_common_v1_payload(value.result) if value.has_result?
1239
+ @on_exit&.call(value)
1240
+ end
1241
+
1242
+ def coresdk_child_workflow_cancellation(value)
1243
+ @on_enter&.call(value)
1244
+ api_failure_v1_failure(value.failure) if value.has_failure?
1245
+ @on_exit&.call(value)
1246
+ end
1247
+
1248
+ def coresdk_child_workflow_child_workflow_result(value)
1249
+ @on_enter&.call(value)
1250
+ coresdk_child_workflow_success(value.completed) if value.has_completed?
1251
+ coresdk_child_workflow_failure(value.failed) if value.has_failed?
1252
+ coresdk_child_workflow_cancellation(value.cancelled) if value.has_cancelled?
1253
+ @on_exit&.call(value)
1254
+ end
1255
+
1256
+ def coresdk_child_workflow_failure(value)
1257
+ @on_enter&.call(value)
1258
+ api_failure_v1_failure(value.failure) if value.has_failure?
1259
+ @on_exit&.call(value)
1260
+ end
1261
+
1262
+ def coresdk_child_workflow_success(value)
1263
+ @on_enter&.call(value)
1264
+ api_common_v1_payload(value.result) if value.has_result?
1265
+ @on_exit&.call(value)
1266
+ end
1267
+
1268
+ def coresdk_nexus_nexus_operation_result(value)
1269
+ @on_enter&.call(value)
1270
+ api_common_v1_payload(value.completed) if value.has_completed?
1271
+ api_failure_v1_failure(value.failed) if value.has_failed?
1272
+ api_failure_v1_failure(value.cancelled) if value.has_cancelled?
1273
+ api_failure_v1_failure(value.timed_out) if value.has_timed_out?
1274
+ @on_exit&.call(value)
1275
+ end
1276
+
1277
+ def coresdk_workflow_activation_cancel_workflow(value)
1278
+ @on_enter&.call(value)
1279
+ api_common_v1_payload_repeated(value.details) unless value.details.empty?
1280
+ @on_exit&.call(value)
1281
+ end
1282
+
1283
+ def coresdk_workflow_activation_do_update(value)
1284
+ @on_enter&.call(value)
1285
+ api_common_v1_payload_repeated(value.input) unless value.input.empty?
1286
+ value.headers.values.each { |v| api_common_v1_payload(v) }
1287
+ @on_exit&.call(value)
1288
+ end
1289
+
1290
+ def coresdk_workflow_activation_initialize_workflow(value)
1291
+ @on_enter&.call(value)
1292
+ api_common_v1_payload_repeated(value.arguments) unless value.arguments.empty?
1293
+ value.headers.values.each { |v| api_common_v1_payload(v) }
1294
+ api_failure_v1_failure(value.continued_failure) if value.has_continued_failure?
1295
+ api_common_v1_payloads(value.last_completion_result) if value.has_last_completion_result?
1296
+ api_common_v1_memo(value.memo) if value.has_memo?
1297
+ api_common_v1_search_attributes(value.search_attributes) if value.has_search_attributes?
1298
+ @on_exit&.call(value)
1299
+ end
1300
+
1301
+ def coresdk_workflow_activation_query_workflow(value)
1302
+ @on_enter&.call(value)
1303
+ api_common_v1_payload_repeated(value.arguments) unless value.arguments.empty?
1304
+ value.headers.values.each { |v| api_common_v1_payload(v) }
1305
+ @on_exit&.call(value)
1306
+ end
1307
+
1308
+ def coresdk_workflow_activation_resolve_activity(value)
1309
+ @on_enter&.call(value)
1310
+ coresdk_activity_result_activity_resolution(value.result) if value.has_result?
1311
+ @on_exit&.call(value)
1312
+ end
1313
+
1314
+ def coresdk_workflow_activation_resolve_child_workflow_execution(value)
1315
+ @on_enter&.call(value)
1316
+ coresdk_child_workflow_child_workflow_result(value.result) if value.has_result?
1317
+ @on_exit&.call(value)
1318
+ end
1319
+
1320
+ def coresdk_workflow_activation_resolve_child_workflow_execution_start(value)
1321
+ @on_enter&.call(value)
1322
+ coresdk_workflow_activation_resolve_child_workflow_execution_start_cancelled(value.cancelled) if value.has_cancelled?
1323
+ @on_exit&.call(value)
1324
+ end
1325
+
1326
+ def coresdk_workflow_activation_resolve_child_workflow_execution_start_cancelled(value)
1327
+ @on_enter&.call(value)
1328
+ api_failure_v1_failure(value.failure) if value.has_failure?
1329
+ @on_exit&.call(value)
1330
+ end
1331
+
1332
+ def coresdk_workflow_activation_resolve_nexus_operation(value)
1333
+ @on_enter&.call(value)
1334
+ coresdk_nexus_nexus_operation_result(value.result) if value.has_result?
1335
+ @on_exit&.call(value)
1336
+ end
1337
+
1338
+ def coresdk_workflow_activation_resolve_nexus_operation_start(value)
1339
+ @on_enter&.call(value)
1340
+ api_failure_v1_failure(value.cancelled_before_start) if value.has_cancelled_before_start?
1341
+ @on_exit&.call(value)
1342
+ end
1343
+
1344
+ def coresdk_workflow_activation_resolve_request_cancel_external_workflow(value)
1345
+ @on_enter&.call(value)
1346
+ api_failure_v1_failure(value.failure) if value.has_failure?
1347
+ @on_exit&.call(value)
1348
+ end
1349
+
1350
+ def coresdk_workflow_activation_resolve_signal_external_workflow(value)
1351
+ @on_enter&.call(value)
1352
+ api_failure_v1_failure(value.failure) if value.has_failure?
1353
+ @on_exit&.call(value)
1354
+ end
1355
+
1356
+ def coresdk_workflow_activation_signal_workflow(value)
1357
+ @on_enter&.call(value)
1358
+ api_common_v1_payload_repeated(value.input) unless value.input.empty?
1359
+ value.headers.values.each { |v| api_common_v1_payload(v) }
1360
+ @on_exit&.call(value)
1361
+ end
1362
+
1363
+ def coresdk_workflow_activation_workflow_activation(value)
1364
+ @on_enter&.call(value)
1365
+ value.jobs.each { |v| coresdk_workflow_activation_workflow_activation_job(v) }
1366
+ @on_exit&.call(value)
1367
+ end
1368
+
1369
+ def coresdk_workflow_activation_workflow_activation_job(value)
1370
+ @on_enter&.call(value)
1371
+ coresdk_workflow_activation_initialize_workflow(value.initialize_workflow) if value.has_initialize_workflow?
1372
+ coresdk_workflow_activation_query_workflow(value.query_workflow) if value.has_query_workflow?
1373
+ coresdk_workflow_activation_cancel_workflow(value.cancel_workflow) if value.has_cancel_workflow?
1374
+ coresdk_workflow_activation_signal_workflow(value.signal_workflow) if value.has_signal_workflow?
1375
+ coresdk_workflow_activation_resolve_activity(value.resolve_activity) if value.has_resolve_activity?
1376
+ coresdk_workflow_activation_resolve_child_workflow_execution_start(value.resolve_child_workflow_execution_start) if value.has_resolve_child_workflow_execution_start?
1377
+ coresdk_workflow_activation_resolve_child_workflow_execution(value.resolve_child_workflow_execution) if value.has_resolve_child_workflow_execution?
1378
+ coresdk_workflow_activation_resolve_signal_external_workflow(value.resolve_signal_external_workflow) if value.has_resolve_signal_external_workflow?
1379
+ coresdk_workflow_activation_resolve_request_cancel_external_workflow(value.resolve_request_cancel_external_workflow) if value.has_resolve_request_cancel_external_workflow?
1380
+ coresdk_workflow_activation_do_update(value.do_update) if value.has_do_update?
1381
+ coresdk_workflow_activation_resolve_nexus_operation_start(value.resolve_nexus_operation_start) if value.has_resolve_nexus_operation_start?
1382
+ coresdk_workflow_activation_resolve_nexus_operation(value.resolve_nexus_operation) if value.has_resolve_nexus_operation?
1383
+ @on_exit&.call(value)
1384
+ end
1385
+
1386
+ def coresdk_workflow_commands_complete_workflow_execution(value)
1387
+ @on_enter&.call(value)
1388
+ api_common_v1_payload(value.result) if value.has_result?
1389
+ @on_exit&.call(value)
1390
+ end
1391
+
1392
+ def coresdk_workflow_commands_continue_as_new_workflow_execution(value)
1393
+ @on_enter&.call(value)
1394
+ api_common_v1_payload_repeated(value.arguments) unless value.arguments.empty?
1395
+ value.memo.values.each { |v| api_common_v1_payload(v) }
1396
+ value.headers.values.each { |v| api_common_v1_payload(v) }
1397
+ value.search_attributes.values.each { |v| api_common_v1_payload(v) } unless @skip_search_attributes
1398
+ @on_exit&.call(value)
1399
+ end
1400
+
1401
+ def coresdk_workflow_commands_fail_workflow_execution(value)
1402
+ @on_enter&.call(value)
1403
+ api_failure_v1_failure(value.failure) if value.has_failure?
1404
+ @on_exit&.call(value)
1405
+ end
1406
+
1407
+ def coresdk_workflow_commands_modify_workflow_properties(value)
1408
+ @on_enter&.call(value)
1409
+ api_common_v1_memo(value.upserted_memo) if value.has_upserted_memo?
1410
+ @on_exit&.call(value)
1411
+ end
1412
+
1413
+ def coresdk_workflow_commands_query_result(value)
1414
+ @on_enter&.call(value)
1415
+ coresdk_workflow_commands_query_success(value.succeeded) if value.has_succeeded?
1416
+ api_failure_v1_failure(value.failed) if value.has_failed?
1417
+ @on_exit&.call(value)
1418
+ end
1419
+
1420
+ def coresdk_workflow_commands_query_success(value)
1421
+ @on_enter&.call(value)
1422
+ api_common_v1_payload(value.response) if value.has_response?
1423
+ @on_exit&.call(value)
1424
+ end
1425
+
1426
+ def coresdk_workflow_commands_schedule_activity(value)
1427
+ @on_enter&.call(value)
1428
+ value.headers.values.each { |v| api_common_v1_payload(v) }
1429
+ api_common_v1_payload_repeated(value.arguments) unless value.arguments.empty?
1430
+ @on_exit&.call(value)
1431
+ end
1432
+
1433
+ def coresdk_workflow_commands_schedule_local_activity(value)
1434
+ @on_enter&.call(value)
1435
+ value.headers.values.each { |v| api_common_v1_payload(v) }
1436
+ api_common_v1_payload_repeated(value.arguments) unless value.arguments.empty?
1437
+ @on_exit&.call(value)
1438
+ end
1439
+
1440
+ def coresdk_workflow_commands_schedule_nexus_operation(value)
1441
+ @on_enter&.call(value)
1442
+ api_common_v1_payload(value.input) if value.has_input?
1443
+ @on_exit&.call(value)
1444
+ end
1445
+
1446
+ def coresdk_workflow_commands_signal_external_workflow_execution(value)
1447
+ @on_enter&.call(value)
1448
+ api_common_v1_payload_repeated(value.args) unless value.args.empty?
1449
+ value.headers.values.each { |v| api_common_v1_payload(v) }
1450
+ @on_exit&.call(value)
1451
+ end
1452
+
1453
+ def coresdk_workflow_commands_start_child_workflow_execution(value)
1454
+ @on_enter&.call(value)
1455
+ api_common_v1_payload_repeated(value.input) unless value.input.empty?
1456
+ value.headers.values.each { |v| api_common_v1_payload(v) }
1457
+ value.memo.values.each { |v| api_common_v1_payload(v) }
1458
+ value.search_attributes.values.each { |v| api_common_v1_payload(v) } unless @skip_search_attributes
1459
+ @on_exit&.call(value)
1460
+ end
1461
+
1462
+ def coresdk_workflow_commands_update_response(value)
1463
+ @on_enter&.call(value)
1464
+ api_failure_v1_failure(value.rejected) if value.has_rejected?
1465
+ api_common_v1_payload(value.completed) if value.has_completed?
1466
+ @on_exit&.call(value)
1467
+ end
1468
+
1469
+ def coresdk_workflow_commands_upsert_workflow_search_attributes(value)
1470
+ @on_enter&.call(value)
1471
+ value.search_attributes.values.each { |v| api_common_v1_payload(v) } unless @skip_search_attributes
1472
+ @on_exit&.call(value)
1473
+ end
1474
+
1475
+ def coresdk_workflow_commands_workflow_command(value)
1476
+ @on_enter&.call(value)
1477
+ api_sdk_v1_user_metadata(value.user_metadata) if value.has_user_metadata?
1478
+ coresdk_workflow_commands_schedule_activity(value.schedule_activity) if value.has_schedule_activity?
1479
+ coresdk_workflow_commands_query_result(value.respond_to_query) if value.has_respond_to_query?
1480
+ coresdk_workflow_commands_complete_workflow_execution(value.complete_workflow_execution) if value.has_complete_workflow_execution?
1481
+ coresdk_workflow_commands_fail_workflow_execution(value.fail_workflow_execution) if value.has_fail_workflow_execution?
1482
+ coresdk_workflow_commands_continue_as_new_workflow_execution(value.continue_as_new_workflow_execution) if value.has_continue_as_new_workflow_execution?
1483
+ coresdk_workflow_commands_start_child_workflow_execution(value.start_child_workflow_execution) if value.has_start_child_workflow_execution?
1484
+ coresdk_workflow_commands_signal_external_workflow_execution(value.signal_external_workflow_execution) if value.has_signal_external_workflow_execution?
1485
+ coresdk_workflow_commands_schedule_local_activity(value.schedule_local_activity) if value.has_schedule_local_activity?
1486
+ coresdk_workflow_commands_upsert_workflow_search_attributes(value.upsert_workflow_search_attributes) if value.has_upsert_workflow_search_attributes?
1487
+ coresdk_workflow_commands_modify_workflow_properties(value.modify_workflow_properties) if value.has_modify_workflow_properties?
1488
+ coresdk_workflow_commands_update_response(value.update_response) if value.has_update_response?
1489
+ coresdk_workflow_commands_schedule_nexus_operation(value.schedule_nexus_operation) if value.has_schedule_nexus_operation?
1490
+ @on_exit&.call(value)
1491
+ end
1492
+
1493
+ def coresdk_workflow_completion_failure(value)
1494
+ @on_enter&.call(value)
1495
+ api_failure_v1_failure(value.failure) if value.has_failure?
1496
+ @on_exit&.call(value)
1497
+ end
1498
+
1499
+ def coresdk_workflow_completion_success(value)
1500
+ @on_enter&.call(value)
1501
+ value.commands.each { |v| coresdk_workflow_commands_workflow_command(v) }
1502
+ @on_exit&.call(value)
1503
+ end
1504
+
1505
+ def coresdk_workflow_completion_workflow_activation_completion(value)
1506
+ @on_enter&.call(value)
1507
+ coresdk_workflow_completion_success(value.successful) if value.has_successful?
1508
+ coresdk_workflow_completion_failure(value.failed) if value.has_failed?
1509
+ @on_exit&.call(value)
1510
+ end
1511
+ end
1512
+ end
1513
+ end