google-cloud-workflows-executions-v1 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8815cfaeddaaf865ac84d9daa950b39b54fde853edb193c36090642f0fcaf87d
4
- data.tar.gz: 0540c3015e2e4dbf9743d9e70c311f91dbbfbc42fc0296f48c489638448df461
3
+ metadata.gz: bd65ecdc84d8c9383fb461bcf1066423add7d42accded33773243ec7e256aef0
4
+ data.tar.gz: b206cf641102b02c626fd54ac6a5d42f00449c7e44fde42662a2ab303f394e56
5
5
  SHA512:
6
- metadata.gz: a3c5c8fadcf536601b858fd3b819fd05071039ad6ef35ab6ba78dfb4f5808f7f4cfe515ecbfb2ebd4c35671c35187651c5b6da4d207b96f81e80c79ceb9d155d
7
- data.tar.gz: 2fb80027ae63f05539ebcdea71e5db3bfc30367afa89ee504316d828f65683009201fd99702f13eb8772fb14a6de901339fb7da2bdf6bf06fc7823830f04fc63
6
+ metadata.gz: df028c85bfc18217ebdd9241377f352e731aa5723048a39c6f42342a8d4bae6ef1e525dbbf461a7095969691ee7e36650890a2eec52ba7fcd076d6d874a4a58c
7
+ data.tar.gz: 215d9b80086305e8f4b1001f2508dc886f2ff68e8ac0732d194afc4f39a4c436996f44e6c79bc5875e721d6350210ed3daa9565eacb97f7fa926de4f3d13e5cc
@@ -194,6 +194,27 @@ module Google
194
194
  #
195
195
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
196
196
  #
197
+ # @example Basic example
198
+ # require "google/cloud/workflows/executions/v1"
199
+ #
200
+ # # Create a client object. The client can be reused for multiple calls.
201
+ # client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new
202
+ #
203
+ # # Create a request. To set request fields, pass in keyword arguments.
204
+ # request = Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new
205
+ #
206
+ # # Call the list_executions method.
207
+ # result = client.list_executions request
208
+ #
209
+ # # The returned object is of type Gapic::PagedEnumerable. You can
210
+ # # iterate over all elements by calling #each, and the enumerable
211
+ # # will lazily make API calls to fetch subsequent pages. Other
212
+ # # methods are also available for managing paging directly.
213
+ # result.each do |response|
214
+ # # Each element is of type ::Google::Cloud::Workflows::Executions::V1::Execution.
215
+ # p response
216
+ # end
217
+ #
197
218
  def list_executions request, options = nil
198
219
  raise ::ArgumentError, "request must be provided" if request.nil?
199
220
 
@@ -211,9 +232,11 @@ module Google
211
232
  gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION
212
233
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
213
234
 
214
- header_params = {
215
- "parent" => request.parent
216
- }
235
+ header_params = {}
236
+ if request.parent
237
+ header_params["parent"] = request.parent
238
+ end
239
+
217
240
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
218
241
  metadata[:"x-goog-request-params"] ||= request_params_header
219
242
 
@@ -267,6 +290,21 @@ module Google
267
290
  #
268
291
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
269
292
  #
293
+ # @example Basic example
294
+ # require "google/cloud/workflows/executions/v1"
295
+ #
296
+ # # Create a client object. The client can be reused for multiple calls.
297
+ # client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new
298
+ #
299
+ # # Create a request. To set request fields, pass in keyword arguments.
300
+ # request = Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new
301
+ #
302
+ # # Call the create_execution method.
303
+ # result = client.create_execution request
304
+ #
305
+ # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution.
306
+ # p result
307
+ #
270
308
  def create_execution request, options = nil
271
309
  raise ::ArgumentError, "request must be provided" if request.nil?
272
310
 
@@ -284,9 +322,11 @@ module Google
284
322
  gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION
285
323
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
286
324
 
287
- header_params = {
288
- "parent" => request.parent
289
- }
325
+ header_params = {}
326
+ if request.parent
327
+ header_params["parent"] = request.parent
328
+ end
329
+
290
330
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
291
331
  metadata[:"x-goog-request-params"] ||= request_params_header
292
332
 
@@ -340,6 +380,21 @@ module Google
340
380
  #
341
381
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
342
382
  #
383
+ # @example Basic example
384
+ # require "google/cloud/workflows/executions/v1"
385
+ #
386
+ # # Create a client object. The client can be reused for multiple calls.
387
+ # client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new
388
+ #
389
+ # # Create a request. To set request fields, pass in keyword arguments.
390
+ # request = Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.new
391
+ #
392
+ # # Call the get_execution method.
393
+ # result = client.get_execution request
394
+ #
395
+ # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution.
396
+ # p result
397
+ #
343
398
  def get_execution request, options = nil
344
399
  raise ::ArgumentError, "request must be provided" if request.nil?
345
400
 
@@ -357,9 +412,11 @@ module Google
357
412
  gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION
358
413
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
359
414
 
360
- header_params = {
361
- "name" => request.name
362
- }
415
+ header_params = {}
416
+ if request.name
417
+ header_params["name"] = request.name
418
+ end
419
+
363
420
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
364
421
  metadata[:"x-goog-request-params"] ||= request_params_header
365
422
 
@@ -410,6 +467,21 @@ module Google
410
467
  #
411
468
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
412
469
  #
470
+ # @example Basic example
471
+ # require "google/cloud/workflows/executions/v1"
472
+ #
473
+ # # Create a client object. The client can be reused for multiple calls.
474
+ # client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new
475
+ #
476
+ # # Create a request. To set request fields, pass in keyword arguments.
477
+ # request = Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new
478
+ #
479
+ # # Call the cancel_execution method.
480
+ # result = client.cancel_execution request
481
+ #
482
+ # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution.
483
+ # p result
484
+ #
413
485
  def cancel_execution request, options = nil
414
486
  raise ::ArgumentError, "request must be provided" if request.nil?
415
487
 
@@ -427,9 +499,11 @@ module Google
427
499
  gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION
428
500
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
429
501
 
430
- header_params = {
431
- "name" => request.name
432
- }
502
+ header_params = {}
503
+ if request.name
504
+ header_params["name"] = request.name
505
+ end
506
+
433
507
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
434
508
  metadata[:"x-goog-request-params"] ||= request_params_header
435
509
 
@@ -1,13 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/workflows/executions/v1/executions.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
9
7
  require 'google/api/resource_pb'
10
8
  require 'google/protobuf/timestamp_pb'
9
+ require 'google/protobuf'
10
+
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_file("google/cloud/workflows/executions/v1/executions.proto", :syntax => :proto3) do
13
13
  add_message "google.cloud.workflows.executions.v1.Execution" do
@@ -19,10 +19,25 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
19
19
  optional :result, :string, 6
20
20
  optional :error, :message, 7, "google.cloud.workflows.executions.v1.Execution.Error"
21
21
  optional :workflow_revision_id, :string, 8
22
+ optional :call_log_level, :enum, 9, "google.cloud.workflows.executions.v1.Execution.CallLogLevel"
23
+ end
24
+ add_message "google.cloud.workflows.executions.v1.Execution.StackTraceElement" do
25
+ optional :step, :string, 1
26
+ optional :routine, :string, 2
27
+ optional :position, :message, 3, "google.cloud.workflows.executions.v1.Execution.StackTraceElement.Position"
28
+ end
29
+ add_message "google.cloud.workflows.executions.v1.Execution.StackTraceElement.Position" do
30
+ optional :line, :int64, 1
31
+ optional :column, :int64, 2
32
+ optional :length, :int64, 3
33
+ end
34
+ add_message "google.cloud.workflows.executions.v1.Execution.StackTrace" do
35
+ repeated :elements, :message, 1, "google.cloud.workflows.executions.v1.Execution.StackTraceElement"
22
36
  end
23
37
  add_message "google.cloud.workflows.executions.v1.Execution.Error" do
24
38
  optional :payload, :string, 1
25
39
  optional :context, :string, 2
40
+ optional :stack_trace, :message, 3, "google.cloud.workflows.executions.v1.Execution.StackTrace"
26
41
  end
27
42
  add_enum "google.cloud.workflows.executions.v1.Execution.State" do
28
43
  value :STATE_UNSPECIFIED, 0
@@ -31,6 +46,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
31
46
  value :FAILED, 3
32
47
  value :CANCELLED, 4
33
48
  end
49
+ add_enum "google.cloud.workflows.executions.v1.Execution.CallLogLevel" do
50
+ value :CALL_LOG_LEVEL_UNSPECIFIED, 0
51
+ value :LOG_ALL_CALLS, 1
52
+ value :LOG_ERRORS_ONLY, 2
53
+ end
34
54
  add_message "google.cloud.workflows.executions.v1.ListExecutionsRequest" do
35
55
  optional :parent, :string, 1
36
56
  optional :page_size, :int32, 2
@@ -66,8 +86,12 @@ module Google
66
86
  module Executions
67
87
  module V1
68
88
  Execution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.executions.v1.Execution").msgclass
89
+ Execution::StackTraceElement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.executions.v1.Execution.StackTraceElement").msgclass
90
+ Execution::StackTraceElement::Position = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.executions.v1.Execution.StackTraceElement.Position").msgclass
91
+ Execution::StackTrace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.executions.v1.Execution.StackTrace").msgclass
69
92
  Execution::Error = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.executions.v1.Execution.Error").msgclass
70
93
  Execution::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.executions.v1.Execution.State").enummodule
94
+ Execution::CallLogLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.executions.v1.Execution.CallLogLevel").enummodule
71
95
  ListExecutionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.executions.v1.ListExecutionsRequest").msgclass
72
96
  ListExecutionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.executions.v1.ListExecutionsResponse").msgclass
73
97
  CreateExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.executions.v1.CreateExecutionRequest").msgclass
@@ -22,7 +22,7 @@ module Google
22
22
  module Workflows
23
23
  module Executions
24
24
  module V1
25
- VERSION = "0.1.0"
25
+ VERSION = "0.1.1"
26
26
  end
27
27
  end
28
28
  end
@@ -42,6 +42,10 @@ module Google
42
42
  # @return [::String]
43
43
  # Input parameters of the execution represented as a JSON string.
44
44
  # The size limit is 32KB.
45
+ #
46
+ # *Note*: If you are using the REST API directly to run your workflow, you
47
+ # must escape any JSON string value of `argument`. Example:
48
+ # `'{"argument":"{\"firstName\":\"FIRST\",\"lastName\":\"LAST\"}"}'`
45
49
  # @!attribute [r] result
46
50
  # @return [::String]
47
51
  # Output only. Output of the execution represented as a JSON string. The
@@ -54,23 +58,71 @@ module Google
54
58
  # @!attribute [r] workflow_revision_id
55
59
  # @return [::String]
56
60
  # Output only. Revision of the workflow this execution is using.
61
+ # @!attribute [rw] call_log_level
62
+ # @return [::Google::Cloud::Workflows::Executions::V1::Execution::CallLogLevel]
63
+ # The call logging level associated to this execution.
57
64
  class Execution
58
65
  include ::Google::Protobuf::MessageExts
59
66
  extend ::Google::Protobuf::MessageExts::ClassMethods
60
67
 
68
+ # A single stack element (frame) where an error occurred.
69
+ # @!attribute [rw] step
70
+ # @return [::String]
71
+ # The step the error occurred at.
72
+ # @!attribute [rw] routine
73
+ # @return [::String]
74
+ # The routine where the error occurred.
75
+ # @!attribute [rw] position
76
+ # @return [::Google::Cloud::Workflows::Executions::V1::Execution::StackTraceElement::Position]
77
+ # The source position information of the stack trace element.
78
+ class StackTraceElement
79
+ include ::Google::Protobuf::MessageExts
80
+ extend ::Google::Protobuf::MessageExts::ClassMethods
81
+
82
+ # Position contains source position information about the stack trace
83
+ # element such as line number, column number and length of the code block
84
+ # in bytes.
85
+ # @!attribute [rw] line
86
+ # @return [::Integer]
87
+ # The source code line number the current instruction was generated from.
88
+ # @!attribute [rw] column
89
+ # @return [::Integer]
90
+ # The source code column position (of the line) the current instruction
91
+ # was generated from.
92
+ # @!attribute [rw] length
93
+ # @return [::Integer]
94
+ # The number of bytes of source code making up this stack trace element.
95
+ class Position
96
+ include ::Google::Protobuf::MessageExts
97
+ extend ::Google::Protobuf::MessageExts::ClassMethods
98
+ end
99
+ end
100
+
101
+ # A collection of stack elements (frames) where an error occurred.
102
+ # @!attribute [rw] elements
103
+ # @return [::Array<::Google::Cloud::Workflows::Executions::V1::Execution::StackTraceElement>]
104
+ # An array of stack elements.
105
+ class StackTrace
106
+ include ::Google::Protobuf::MessageExts
107
+ extend ::Google::Protobuf::MessageExts::ClassMethods
108
+ end
109
+
61
110
  # Error describes why the execution was abnormally terminated.
62
111
  # @!attribute [rw] payload
63
112
  # @return [::String]
64
- # Error payload returned by the execution, represented as a JSON string.
113
+ # Error message and data returned represented as a JSON string.
65
114
  # @!attribute [rw] context
66
115
  # @return [::String]
67
- # Human readable error context, helpful for debugging purposes.
116
+ # Human-readable stack trace string.
117
+ # @!attribute [rw] stack_trace
118
+ # @return [::Google::Cloud::Workflows::Executions::V1::Execution::StackTrace]
119
+ # Stack trace with detailed information of where error was generated.
68
120
  class Error
69
121
  include ::Google::Protobuf::MessageExts
70
122
  extend ::Google::Protobuf::MessageExts::ClassMethods
71
123
  end
72
124
 
73
- # Describes the current state of the execution. More states may be added
125
+ # Describes the current state of the execution. More states might be added
74
126
  # in the future.
75
127
  module State
76
128
  # Invalid state.
@@ -88,6 +140,20 @@ module Google
88
140
  # The execution was stopped intentionally.
89
141
  CANCELLED = 4
90
142
  end
143
+
144
+ # Describes the level of platform logging to apply to calls and call
145
+ # responses during workflow executions.
146
+ module CallLogLevel
147
+ # No call logging specified.
148
+ CALL_LOG_LEVEL_UNSPECIFIED = 0
149
+
150
+ # Log all call steps within workflows, all call returns, and all exceptions
151
+ # raised.
152
+ LOG_ALL_CALLS = 1
153
+
154
+ # Log only exceptions that are raised from call steps within workflows.
155
+ LOG_ERRORS_ONLY = 2
156
+ end
91
157
  end
92
158
 
93
159
  # Request for the
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-workflows-executions-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-27 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common