google-cloud-workflows-v1 0.4.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f66bc20bb512ca5e4c6b711a54fae7a6377f44a3daa2eeeedff169a98a4d8bff
4
- data.tar.gz: 50f3cf3348839df864ddfc67110eedfbdb942833585462ff7ba27550606b3e34
3
+ metadata.gz: 4beae3c07d97099e762247eeb327574f7fbc2340f5190d07910a5e02026bba2f
4
+ data.tar.gz: ea493f3dcccf95570b69f538348595f776fb894af0bd0a3c0fc3e756ba99a2d9
5
5
  SHA512:
6
- metadata.gz: 8e3dcea39e883f3cbb97ce907c223f7431623f07b6f4e3cd14f2dcb67c7d8c3f4a2136a0587a38935c7b932bf5d623a0d5bd5acb151d211245cd421bce9658e7
7
- data.tar.gz: cad3cce620b54cd81fe10666273cfba0932ace9c24bfa5ff7a31dc9953240e39158f955729972a6be87cd97d78d213b8d0557603e96dbdfd6804e3f8d1fad07e
6
+ metadata.gz: 5bc30cda26bcf9b6d819cd04f6e7cced0a21f1cc2f80e423684bae8428d7d438ecac67c3c3e8559d7d35fecd4a53cfc5ede542bc7a87be8555a1bb9f8b39903e
7
+ data.tar.gz: cf8987b43c9a1f2feffb2d23214911daff36af886ca6daef723f5975e5e94ebc54060a2ef59c1ddece751afd6f70d8731c498dcb9cce2915fa9a234e52824d06
@@ -0,0 +1,102 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/config"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Workflows
24
+ ##
25
+ # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
26
+ #
27
+ # require "google/cloud/workflows/v1/rest"
28
+ # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new
29
+ #
30
+ module V1
31
+ ##
32
+ # @private
33
+ # Initialize the mixin bindings configuration
34
+ #
35
+ def self.configure
36
+ @configure ||= begin
37
+ namespace = ["Google", "Cloud", "Workflows"]
38
+ parent_config = while namespace.any?
39
+ parent_name = namespace.join "::"
40
+ parent_const = const_get parent_name
41
+ break parent_const.configure if parent_const.respond_to? :configure
42
+ namespace.pop
43
+ end
44
+
45
+ default_config = Configuration.new parent_config
46
+ default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
47
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
48
+ uri_method: :get,
49
+ uri_template: "/v1/{name}",
50
+ matches: [
51
+ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
52
+ ],
53
+ body: nil
54
+ )
55
+ ]
56
+ default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
57
+
58
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
59
+ uri_method: :get,
60
+ uri_template: "/v1/{name}/locations",
61
+ matches: [
62
+ ["name", %r{^projects/[^/]+/?$}, false]
63
+ ],
64
+ body: nil
65
+ )
66
+ ]
67
+ default_config
68
+ end
69
+ yield @configure if block_given?
70
+ @configure
71
+ end
72
+
73
+ ##
74
+ # @private
75
+ # Configuration class for the google.cloud.workflows.v1 package.
76
+ #
77
+ # This class contains common configuration for all services
78
+ # of the google.cloud.workflows.v1 package.
79
+ #
80
+ # This configuration is for internal use of the client library classes,
81
+ # and it is not intended that the end-users will read or change it.
82
+ #
83
+ class Configuration
84
+ extend ::Gapic::Config
85
+
86
+ # @private
87
+ # Overrides for http bindings for the RPC of the mixins for this package.
88
+ # Services in this package should use these when creating clients for the mixin services.
89
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
90
+ config_attr :bindings_override, {}, ::Hash, nil
91
+
92
+ # @private
93
+ def initialize parent_config = nil
94
+ @parent_config = parent_config unless parent_config.nil?
95
+
96
+ yield self if block_given?
97
+ end
98
+ end
99
+ end
100
+ end
101
+ end
102
+ end
@@ -17,6 +17,7 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/workflows/v1/workflows/rest"
20
+ require "google/cloud/workflows/v1/bindings_override"
20
21
  require "google/cloud/workflows/v1/version"
21
22
 
22
23
  module Google
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Workflows
23
23
  module V1
24
- VERSION = "0.4.1"
24
+ VERSION = "0.6.0"
25
25
  end
26
26
  end
27
27
  end
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/workflows/v1/workflows_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -141,12 +142,19 @@ module Google
141
142
  config.endpoint = @config.endpoint
142
143
  end
143
144
 
145
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
146
+ config.credentials = credentials
147
+ config.quota_project = @quota_project_id
148
+ config.endpoint = @config.endpoint
149
+ end
150
+
144
151
  @workflows_stub = ::Gapic::ServiceStub.new(
145
152
  ::Google::Cloud::Workflows::V1::Workflows::Stub,
146
153
  credentials: credentials,
147
154
  endpoint: @config.endpoint,
148
155
  channel_args: @config.channel_args,
149
- interceptors: @config.interceptors
156
+ interceptors: @config.interceptors,
157
+ channel_pool_config: @config.channel_pool
150
158
  )
151
159
  end
152
160
 
@@ -157,10 +165,17 @@ module Google
157
165
  #
158
166
  attr_reader :operations_client
159
167
 
168
+ ##
169
+ # Get the associated client for mix-in of the Locations.
170
+ #
171
+ # @return [Google::Cloud::Location::Locations::Client]
172
+ #
173
+ attr_reader :location_client
174
+
160
175
  # Service calls
161
176
 
162
177
  ##
163
- # Lists Workflows in a given project and location.
178
+ # Lists workflows in a given project and location.
164
179
  # The default order is not specified.
165
180
  #
166
181
  # @overload list_workflows(request, options = nil)
@@ -182,10 +197,10 @@ module Google
182
197
  # Required. Project and location from which the workflows should be listed.
183
198
  # Format: projects/\\{project}/locations/\\{location}
184
199
  # @param page_size [::Integer]
185
- # Maximum number of workflows to return per call. The service may return
186
- # fewer than this value. If the value is not specified, a default value of
187
- # 500 will be used. The maximum permitted value is 1000 and values greater
188
- # than 1000 will be coerced down to 1000.
200
+ # Maximum number of workflows to return per call. The service might return
201
+ # fewer than this value even if not at the end of the collection. If a value
202
+ # is not specified, a default value of 500 is used. The maximum permitted
203
+ # value is 1000 and values greater than 1000 are coerced down to 1000.
189
204
  # @param page_token [::String]
190
205
  # A page token, received from a previous `ListWorkflows` call.
191
206
  # Provide this to retrieve the subsequent page.
@@ -195,10 +210,10 @@ module Google
195
210
  # @param filter [::String]
196
211
  # Filter to restrict results to specific workflows.
197
212
  # @param order_by [::String]
198
- # Comma-separated list of fields that that specify the order of the results.
213
+ # Comma-separated list of fields that specify the order of the results.
199
214
  # Default sorting order for a field is ascending. To specify descending order
200
- # for a field, append a " desc" suffix.
201
- # If not specified, the results will be returned in an unspecified order.
215
+ # for a field, append a "desc" suffix.
216
+ # If not specified, the results are returned in an unspecified order.
202
217
  #
203
218
  # @yield [response, operation] Access the result along with the RPC operation
204
219
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>]
@@ -270,7 +285,7 @@ module Google
270
285
  end
271
286
 
272
287
  ##
273
- # Gets details of a single Workflow.
288
+ # Gets details of a single workflow.
274
289
  #
275
290
  # @overload get_workflow(request, options = nil)
276
291
  # Pass arguments to `get_workflow` via a request object, either of type
@@ -282,14 +297,20 @@ module Google
282
297
  # @param options [::Gapic::CallOptions, ::Hash]
283
298
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
284
299
  #
285
- # @overload get_workflow(name: nil)
300
+ # @overload get_workflow(name: nil, revision_id: nil)
286
301
  # Pass arguments to `get_workflow` via keyword arguments. Note that at
287
302
  # least one keyword argument is required. To specify no parameters, or to keep all
288
303
  # the default parameter values, pass an empty Hash as a request object (see above).
289
304
  #
290
305
  # @param name [::String]
291
- # Required. Name of the workflow which information should be retrieved.
306
+ # Required. Name of the workflow for which information should be retrieved.
292
307
  # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow}
308
+ # @param revision_id [::String]
309
+ # Optional. The revision of the workflow to retrieve. If the revision_id is
310
+ # empty, the latest revision is retrieved.
311
+ # The format is "000001-a4d", where the first six characters define
312
+ # the zero-padded decimal revision number. They are followed by a hyphen and
313
+ # three hexadecimal characters.
293
314
  #
294
315
  # @yield [response, operation] Access the result along with the RPC operation
295
316
  # @yieldparam response [::Google::Cloud::Workflows::V1::Workflow]
@@ -358,7 +379,7 @@ module Google
358
379
  ##
359
380
  # Creates a new workflow. If a workflow with the specified name already
360
381
  # exists in the specified project and location, the long running operation
361
- # will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
382
+ # returns a [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
362
383
  #
363
384
  # @overload create_workflow(request, options = nil)
364
385
  # Pass arguments to `create_workflow` via a request object, either of type
@@ -561,8 +582,8 @@ module Google
561
582
  ##
562
583
  # Updates an existing workflow.
563
584
  # Running this method has no impact on already running executions of the
564
- # workflow. A new revision of the workflow may be created as a result of a
565
- # successful update operation. In that case, such revision will be used
585
+ # workflow. A new revision of the workflow might be created as a result of a
586
+ # successful update operation. In that case, the new revision is used
566
587
  # in new workflow executions.
567
588
  #
568
589
  # @overload update_workflow(request, options = nil)
@@ -777,6 +798,14 @@ module Google
777
798
  end
778
799
  end
779
800
 
801
+ ##
802
+ # Configuration for the channel pool
803
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
804
+ #
805
+ def channel_pool
806
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
807
+ end
808
+
780
809
  ##
781
810
  # Configuration RPC class for the Workflows API.
782
811
  #
@@ -93,7 +93,8 @@ module Google
93
93
  credentials: credentials,
94
94
  endpoint: @config.endpoint,
95
95
  channel_args: @config.channel_args,
96
- interceptors: @config.interceptors
96
+ interceptors: @config.interceptors,
97
+ channel_pool_config: @config.channel_pool
97
98
  )
98
99
 
99
100
  # Used by an LRO wrapper for some methods of this service
@@ -701,6 +702,14 @@ module Google
701
702
  end
702
703
  end
703
704
 
705
+ ##
706
+ # Configuration for the channel pool
707
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
708
+ #
709
+ def channel_pool
710
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
711
+ end
712
+
704
713
  ##
705
714
  # Configuration RPC class for the Operations API.
706
715
  #
@@ -24,6 +24,27 @@ module Google
24
24
  module Workflows
25
25
  # Path helper methods for the Workflows API.
26
26
  module Paths
27
+ ##
28
+ # Create a fully-qualified CryptoKey resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param key_ring [String]
37
+ # @param crypto_key [String]
38
+ #
39
+ # @return [::String]
40
+ def crypto_key_path project:, location:, key_ring:, crypto_key:
41
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
42
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
43
+ raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
44
+
45
+ "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
46
+ end
47
+
27
48
  ##
28
49
  # Create a fully-qualified Location resource string.
29
50
  #
@@ -19,6 +19,7 @@
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/workflows/v1/workflows_pb"
21
21
  require "google/cloud/workflows/v1/workflows/rest/service_stub"
22
+ require "google/cloud/location/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -138,6 +139,13 @@ module Google
138
139
  config.endpoint = @config.endpoint
139
140
  end
140
141
 
142
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
143
+ config.credentials = credentials
144
+ config.quota_project = @quota_project_id
145
+ config.endpoint = @config.endpoint
146
+ config.bindings_override = @config.bindings_override
147
+ end
148
+
141
149
  @workflows_stub = ::Google::Cloud::Workflows::V1::Workflows::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
142
150
  end
143
151
 
@@ -148,10 +156,17 @@ module Google
148
156
  #
149
157
  attr_reader :operations_client
150
158
 
159
+ ##
160
+ # Get the associated client for mix-in of the Locations.
161
+ #
162
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
163
+ #
164
+ attr_reader :location_client
165
+
151
166
  # Service calls
152
167
 
153
168
  ##
154
- # Lists Workflows in a given project and location.
169
+ # Lists workflows in a given project and location.
155
170
  # The default order is not specified.
156
171
  #
157
172
  # @overload list_workflows(request, options = nil)
@@ -173,10 +188,10 @@ module Google
173
188
  # Required. Project and location from which the workflows should be listed.
174
189
  # Format: projects/\\{project}/locations/\\{location}
175
190
  # @param page_size [::Integer]
176
- # Maximum number of workflows to return per call. The service may return
177
- # fewer than this value. If the value is not specified, a default value of
178
- # 500 will be used. The maximum permitted value is 1000 and values greater
179
- # than 1000 will be coerced down to 1000.
191
+ # Maximum number of workflows to return per call. The service might return
192
+ # fewer than this value even if not at the end of the collection. If a value
193
+ # is not specified, a default value of 500 is used. The maximum permitted
194
+ # value is 1000 and values greater than 1000 are coerced down to 1000.
180
195
  # @param page_token [::String]
181
196
  # A page token, received from a previous `ListWorkflows` call.
182
197
  # Provide this to retrieve the subsequent page.
@@ -186,10 +201,10 @@ module Google
186
201
  # @param filter [::String]
187
202
  # Filter to restrict results to specific workflows.
188
203
  # @param order_by [::String]
189
- # Comma-separated list of fields that that specify the order of the results.
204
+ # Comma-separated list of fields that specify the order of the results.
190
205
  # Default sorting order for a field is ascending. To specify descending order
191
- # for a field, append a " desc" suffix.
192
- # If not specified, the results will be returned in an unspecified order.
206
+ # for a field, append a "desc" suffix.
207
+ # If not specified, the results are returned in an unspecified order.
193
208
  # @yield [result, operation] Access the result along with the TransportOperation object
194
209
  # @yieldparam result [::Google::Cloud::Workflows::V1::ListWorkflowsResponse]
195
210
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -197,6 +212,26 @@ module Google
197
212
  # @return [::Google::Cloud::Workflows::V1::ListWorkflowsResponse]
198
213
  #
199
214
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
215
+ #
216
+ # @example Basic example
217
+ # require "google/cloud/workflows/v1"
218
+ #
219
+ # # Create a client object. The client can be reused for multiple calls.
220
+ # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new
221
+ #
222
+ # # Create a request. To set request fields, pass in keyword arguments.
223
+ # request = Google::Cloud::Workflows::V1::ListWorkflowsRequest.new
224
+ #
225
+ # # Call the list_workflows method.
226
+ # result = client.list_workflows request
227
+ #
228
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
229
+ # # over elements, and API calls will be issued to fetch pages as needed.
230
+ # result.each do |item|
231
+ # # Each element is of type ::Google::Cloud::Workflows::V1::Workflow.
232
+ # p item
233
+ # end
234
+ #
200
235
  def list_workflows request, options = nil
201
236
  raise ::ArgumentError, "request must be provided" if request.nil?
202
237
 
@@ -233,7 +268,7 @@ module Google
233
268
  end
234
269
 
235
270
  ##
236
- # Gets details of a single Workflow.
271
+ # Gets details of a single workflow.
237
272
  #
238
273
  # @overload get_workflow(request, options = nil)
239
274
  # Pass arguments to `get_workflow` via a request object, either of type
@@ -245,14 +280,20 @@ module Google
245
280
  # @param options [::Gapic::CallOptions, ::Hash]
246
281
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
247
282
  #
248
- # @overload get_workflow(name: nil)
283
+ # @overload get_workflow(name: nil, revision_id: nil)
249
284
  # Pass arguments to `get_workflow` via keyword arguments. Note that at
250
285
  # least one keyword argument is required. To specify no parameters, or to keep all
251
286
  # the default parameter values, pass an empty Hash as a request object (see above).
252
287
  #
253
288
  # @param name [::String]
254
- # Required. Name of the workflow which information should be retrieved.
289
+ # Required. Name of the workflow for which information should be retrieved.
255
290
  # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow}
291
+ # @param revision_id [::String]
292
+ # Optional. The revision of the workflow to retrieve. If the revision_id is
293
+ # empty, the latest revision is retrieved.
294
+ # The format is "000001-a4d", where the first six characters define
295
+ # the zero-padded decimal revision number. They are followed by a hyphen and
296
+ # three hexadecimal characters.
256
297
  # @yield [result, operation] Access the result along with the TransportOperation object
257
298
  # @yieldparam result [::Google::Cloud::Workflows::V1::Workflow]
258
299
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -260,6 +301,22 @@ module Google
260
301
  # @return [::Google::Cloud::Workflows::V1::Workflow]
261
302
  #
262
303
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
304
+ #
305
+ # @example Basic example
306
+ # require "google/cloud/workflows/v1"
307
+ #
308
+ # # Create a client object. The client can be reused for multiple calls.
309
+ # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new
310
+ #
311
+ # # Create a request. To set request fields, pass in keyword arguments.
312
+ # request = Google::Cloud::Workflows::V1::GetWorkflowRequest.new
313
+ #
314
+ # # Call the get_workflow method.
315
+ # result = client.get_workflow request
316
+ #
317
+ # # The returned object is of type Google::Cloud::Workflows::V1::Workflow.
318
+ # p result
319
+ #
263
320
  def get_workflow request, options = nil
264
321
  raise ::ArgumentError, "request must be provided" if request.nil?
265
322
 
@@ -298,7 +355,7 @@ module Google
298
355
  ##
299
356
  # Creates a new workflow. If a workflow with the specified name already
300
357
  # exists in the specified project and location, the long running operation
301
- # will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
358
+ # returns a [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
302
359
  #
303
360
  # @overload create_workflow(request, options = nil)
304
361
  # Pass arguments to `create_workflow` via a request object, either of type
@@ -336,6 +393,29 @@ module Google
336
393
  # @return [::Gapic::Operation]
337
394
  #
338
395
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
396
+ #
397
+ # @example Basic example
398
+ # require "google/cloud/workflows/v1"
399
+ #
400
+ # # Create a client object. The client can be reused for multiple calls.
401
+ # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new
402
+ #
403
+ # # Create a request. To set request fields, pass in keyword arguments.
404
+ # request = Google::Cloud::Workflows::V1::CreateWorkflowRequest.new
405
+ #
406
+ # # Call the create_workflow method.
407
+ # result = client.create_workflow request
408
+ #
409
+ # # The returned object is of type Gapic::Operation. You can use it to
410
+ # # check the status of an operation, cancel it, or wait for results.
411
+ # # Here is how to wait for a response.
412
+ # result.wait_until_done! timeout: 60
413
+ # if result.response?
414
+ # p result.response
415
+ # else
416
+ # puts "No response received."
417
+ # end
418
+ #
339
419
  def create_workflow request, options = nil
340
420
  raise ::ArgumentError, "request must be provided" if request.nil?
341
421
 
@@ -402,6 +482,29 @@ module Google
402
482
  # @return [::Gapic::Operation]
403
483
  #
404
484
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
485
+ #
486
+ # @example Basic example
487
+ # require "google/cloud/workflows/v1"
488
+ #
489
+ # # Create a client object. The client can be reused for multiple calls.
490
+ # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new
491
+ #
492
+ # # Create a request. To set request fields, pass in keyword arguments.
493
+ # request = Google::Cloud::Workflows::V1::DeleteWorkflowRequest.new
494
+ #
495
+ # # Call the delete_workflow method.
496
+ # result = client.delete_workflow request
497
+ #
498
+ # # The returned object is of type Gapic::Operation. You can use it to
499
+ # # check the status of an operation, cancel it, or wait for results.
500
+ # # Here is how to wait for a response.
501
+ # result.wait_until_done! timeout: 60
502
+ # if result.response?
503
+ # p result.response
504
+ # else
505
+ # puts "No response received."
506
+ # end
507
+ #
405
508
  def delete_workflow request, options = nil
406
509
  raise ::ArgumentError, "request must be provided" if request.nil?
407
510
 
@@ -441,8 +544,8 @@ module Google
441
544
  ##
442
545
  # Updates an existing workflow.
443
546
  # Running this method has no impact on already running executions of the
444
- # workflow. A new revision of the workflow may be created as a result of a
445
- # successful update operation. In that case, such revision will be used
547
+ # workflow. A new revision of the workflow might be created as a result of a
548
+ # successful update operation. In that case, the new revision is used
446
549
  # in new workflow executions.
447
550
  #
448
551
  # @overload update_workflow(request, options = nil)
@@ -472,6 +575,29 @@ module Google
472
575
  # @return [::Gapic::Operation]
473
576
  #
474
577
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
578
+ #
579
+ # @example Basic example
580
+ # require "google/cloud/workflows/v1"
581
+ #
582
+ # # Create a client object. The client can be reused for multiple calls.
583
+ # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new
584
+ #
585
+ # # Create a request. To set request fields, pass in keyword arguments.
586
+ # request = Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new
587
+ #
588
+ # # Call the update_workflow method.
589
+ # result = client.update_workflow request
590
+ #
591
+ # # The returned object is of type Gapic::Operation. You can use it to
592
+ # # check the status of an operation, cancel it, or wait for results.
593
+ # # Here is how to wait for a response.
594
+ # result.wait_until_done! timeout: 60
595
+ # if result.response?
596
+ # p result.response
597
+ # else
598
+ # puts "No response received."
599
+ # end
600
+ #
475
601
  def update_workflow request, options = nil
476
602
  raise ::ArgumentError, "request must be provided" if request.nil?
477
603
 
@@ -596,6 +722,13 @@ module Google
596
722
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
597
723
  config_attr :quota_project, nil, ::String, nil
598
724
 
725
+ # @private
726
+ # Overrides for http bindings for the RPCs of this service
727
+ # are only used when this service is used as mixin, and only
728
+ # by the host service.
729
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
730
+ config_attr :bindings_override, {}, ::Hash, nil
731
+
599
732
  # @private
600
733
  def initialize parent_config = nil
601
734
  @parent_config = parent_config unless parent_config.nil?
@@ -136,6 +136,26 @@ module Google
136
136
  # @return [::Gapic::Operation]
137
137
  #
138
138
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
139
+ #
140
+ # @example Basic example
141
+ # require "google/longrunning"
142
+ #
143
+ # # Create a client object. The client can be reused for multiple calls.
144
+ # client = Google::Longrunning::Operations::Rest::Client.new
145
+ #
146
+ # # Create a request. To set request fields, pass in keyword arguments.
147
+ # request = Google::Longrunning::ListOperationsRequest.new
148
+ #
149
+ # # Call the list_operations method.
150
+ # result = client.list_operations request
151
+ #
152
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
153
+ # # over elements, and API calls will be issued to fetch pages as needed.
154
+ # result.each do |item|
155
+ # # Each element is of type ::Google::Longrunning::Operation.
156
+ # p item
157
+ # end
158
+ #
139
159
  def list_operations request, options = nil
140
160
  raise ::ArgumentError, "request must be provided" if request.nil?
141
161
 
@@ -201,6 +221,29 @@ module Google
201
221
  # @return [::Gapic::Operation]
202
222
  #
203
223
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
224
+ #
225
+ # @example Basic example
226
+ # require "google/longrunning"
227
+ #
228
+ # # Create a client object. The client can be reused for multiple calls.
229
+ # client = Google::Longrunning::Operations::Rest::Client.new
230
+ #
231
+ # # Create a request. To set request fields, pass in keyword arguments.
232
+ # request = Google::Longrunning::GetOperationRequest.new
233
+ #
234
+ # # Call the get_operation method.
235
+ # result = client.get_operation request
236
+ #
237
+ # # The returned object is of type Gapic::Operation. You can use it to
238
+ # # check the status of an operation, cancel it, or wait for results.
239
+ # # Here is how to wait for a response.
240
+ # result.wait_until_done! timeout: 60
241
+ # if result.response?
242
+ # p result.response
243
+ # else
244
+ # puts "No response received."
245
+ # end
246
+ #
204
247
  def get_operation request, options = nil
205
248
  raise ::ArgumentError, "request must be provided" if request.nil?
206
249
 
@@ -267,6 +310,22 @@ module Google
267
310
  # @return [::Google::Protobuf::Empty]
268
311
  #
269
312
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/longrunning"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Longrunning::Operations::Rest::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Longrunning::DeleteOperationRequest.new
322
+ #
323
+ # # Call the delete_operation method.
324
+ # result = client.delete_operation request
325
+ #
326
+ # # The returned object is of type Google::Protobuf::Empty.
327
+ # p result
328
+ #
270
329
  def delete_operation request, options = nil
271
330
  raise ::ArgumentError, "request must be provided" if request.nil?
272
331
 
@@ -338,6 +397,22 @@ module Google
338
397
  # @return [::Google::Protobuf::Empty]
339
398
  #
340
399
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ #
401
+ # @example Basic example
402
+ # require "google/longrunning"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Longrunning::Operations::Rest::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Longrunning::CancelOperationRequest.new
409
+ #
410
+ # # Call the cancel_operation method.
411
+ # result = client.cancel_operation request
412
+ #
413
+ # # The returned object is of type Google::Protobuf::Empty.
414
+ # p result
415
+ #
341
416
  def cancel_operation request, options = nil
342
417
  raise ::ArgumentError, "request must be provided" if request.nil?
343
418
 
@@ -21,6 +21,7 @@ require "gapic/config"
21
21
  require "gapic/config/method"
22
22
 
23
23
  require "google/cloud/workflows/v1/version"
24
+ require "google/cloud/workflows/v1/bindings_override"
24
25
 
25
26
  require "google/cloud/workflows/v1/workflows/credentials"
26
27
  require "google/cloud/workflows/v1/workflows/paths"
@@ -9,11 +9,12 @@ require 'google/api/client_pb'
9
9
  require 'google/api/field_behavior_pb'
10
10
  require 'google/api/resource_pb'
11
11
  require 'google/longrunning/operations_pb'
12
+ require 'google/protobuf/empty_pb'
12
13
  require 'google/protobuf/field_mask_pb'
13
14
  require 'google/protobuf/timestamp_pb'
14
15
 
15
16
 
16
- descriptor_data = "\n)google/cloud/workflows/v1/workflows.proto\x12\x19google.cloud.workflows.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf6\x04\n\x08Workflow\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12=\n\x05state\x18\x03 \x01(\x0e\x32).google.cloud.workflows.v1.Workflow.StateB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x08 \x03(\x0b\x32/.google.cloud.workflows.v1.Workflow.LabelsEntry\x12\x17\n\x0fservice_account\x18\t \x01(\t\x12\x19\n\x0fsource_contents\x18\n \x01(\tH\x00\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"*\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01:d\xea\x41\x61\n!workflows.googleapis.com/Workflow\x12<projects/{project}/locations/{location}/workflows/{workflow}B\r\n\x0bsource_code\"\x9a\x01\n\x14ListWorkflowsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"}\n\x15ListWorkflowsResponse\x12\x36\n\tworkflows\x18\x01 \x03(\x0b\x32#.google.cloud.workflows.v1.Workflow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x12GetWorkflowRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\"\xa8\x01\n\x15\x43reateWorkflowRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\x08workflow\x18\x02 \x01(\x0b\x32#.google.cloud.workflows.v1.WorkflowB\x03\xe0\x41\x02\x12\x18\n\x0bworkflow_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"P\n\x15\x44\x65leteWorkflowRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\"\x84\x01\n\x15UpdateWorkflowRequest\x12:\n\x08workflow\x18\x01 \x01(\x0b\x32#.google.cloud.workflows.v1.WorkflowB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa5\x01\n\x11OperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06target\x18\x03 \x01(\t\x12\x0c\n\x04verb\x18\x04 \x01(\t\x12\x13\n\x0b\x61pi_version\x18\x05 \x01(\t2\xc7\x08\n\tWorkflows\x12\xb2\x01\n\rListWorkflows\x12/.google.cloud.workflows.v1.ListWorkflowsRequest\x1a\x30.google.cloud.workflows.v1.ListWorkflowsResponse\">\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/workflows\xda\x41\x06parent\x12\x9f\x01\n\x0bGetWorkflow\x12-.google.cloud.workflows.v1.GetWorkflowRequest\x1a#.google.cloud.workflows.v1.Workflow\"<\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/workflows/*}\xda\x41\x04name\x12\xe0\x01\n\x0e\x43reateWorkflow\x12\x30.google.cloud.workflows.v1.CreateWorkflowRequest\x1a\x1d.google.longrunning.Operation\"}\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/workflows:\x08workflow\xda\x41\x1bparent,workflow,workflow_id\xca\x41\x1d\n\x08Workflow\x12\x11OperationMetadata\x12\xcc\x01\n\x0e\x44\x65leteWorkflow\x12\x30.google.cloud.workflows.v1.DeleteWorkflowRequest\x1a\x1d.google.longrunning.Operation\"i\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/workflows/*}\xda\x41\x04name\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x12\xe2\x01\n\x0eUpdateWorkflow\x12\x30.google.cloud.workflows.v1.UpdateWorkflowRequest\x1a\x1d.google.longrunning.Operation\"\x7f\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{workflow.name=projects/*/locations/*/workflows/*}:\x08workflow\xda\x41\x14workflow,update_mask\xca\x41\x1d\n\x08Workflow\x12\x11OperationMetadata\x1aL\xca\x41\x18workflows.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBn\n\x1d\x63om.google.cloud.workflows.v1B\x0eWorkflowsProtoP\x01Z;cloud.google.com/go/workflows/apiv1/workflowspb;workflowspbb\x06proto3"
17
+ descriptor_data = "\n)google/cloud/workflows/v1/workflows.proto\x12\x19google.cloud.workflows.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe0\t\n\x08Workflow\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12=\n\x05state\x18\x03 \x01(\x0e\x32).google.cloud.workflows.v1.Workflow.StateB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x08 \x03(\x0b\x32/.google.cloud.workflows.v1.Workflow.LabelsEntry\x12\x17\n\x0fservice_account\x18\t \x01(\t\x12\x19\n\x0fsource_contents\x18\n \x01(\tH\x00\x12\x42\n\x0f\x63rypto_key_name\x18\x0b \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12H\n\x0bstate_error\x18\x0c \x01(\x0b\x32..google.cloud.workflows.v1.Workflow.StateErrorB\x03\xe0\x41\x03\x12M\n\x0e\x63\x61ll_log_level\x18\r \x01(\x0e\x32\x30.google.cloud.workflows.v1.Workflow.CallLogLevelB\x03\xe0\x41\x01\x12P\n\ruser_env_vars\x18\x0e \x03(\x0b\x32\x34.google.cloud.workflows.v1.Workflow.UserEnvVarsEntryB\x03\xe0\x41\x01\x1a\x8d\x01\n\nStateError\x12\x0f\n\x07\x64\x65tails\x18\x01 \x01(\t\x12\x41\n\x04type\x18\x02 \x01(\x0e\x32\x33.google.cloud.workflows.v1.Workflow.StateError.Type\"+\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tKMS_ERROR\x10\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10UserEnvVarsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\";\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0f\n\x0bUNAVAILABLE\x10\x02\"d\n\x0c\x43\x61llLogLevel\x12\x1e\n\x1a\x43\x41LL_LOG_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rLOG_ALL_CALLS\x10\x01\x12\x13\n\x0fLOG_ERRORS_ONLY\x10\x02\x12\x0c\n\x08LOG_NONE\x10\x03:d\xea\x41\x61\n!workflows.googleapis.com/Workflow\x12<projects/{project}/locations/{location}/workflows/{workflow}B\r\n\x0bsource_code\"\x9a\x01\n\x14ListWorkflowsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"}\n\x15ListWorkflowsResponse\x12\x36\n\tworkflows\x18\x01 \x03(\x0b\x32#.google.cloud.workflows.v1.Workflow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"g\n\x12GetWorkflowRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa8\x01\n\x15\x43reateWorkflowRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\x08workflow\x18\x02 \x01(\x0b\x32#.google.cloud.workflows.v1.WorkflowB\x03\xe0\x41\x02\x12\x18\n\x0bworkflow_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"P\n\x15\x44\x65leteWorkflowRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\"\x84\x01\n\x15UpdateWorkflowRequest\x12:\n\x08workflow\x18\x01 \x01(\x0b\x32#.google.cloud.workflows.v1.WorkflowB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa5\x01\n\x11OperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06target\x18\x03 \x01(\t\x12\x0c\n\x04verb\x18\x04 \x01(\t\x12\x13\n\x0b\x61pi_version\x18\x05 \x01(\t2\xc7\x08\n\tWorkflows\x12\xb2\x01\n\rListWorkflows\x12/.google.cloud.workflows.v1.ListWorkflowsRequest\x1a\x30.google.cloud.workflows.v1.ListWorkflowsResponse\">\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/workflows\xda\x41\x06parent\x12\x9f\x01\n\x0bGetWorkflow\x12-.google.cloud.workflows.v1.GetWorkflowRequest\x1a#.google.cloud.workflows.v1.Workflow\"<\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/workflows/*}\xda\x41\x04name\x12\xe0\x01\n\x0e\x43reateWorkflow\x12\x30.google.cloud.workflows.v1.CreateWorkflowRequest\x1a\x1d.google.longrunning.Operation\"}\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/workflows:\x08workflow\xda\x41\x1bparent,workflow,workflow_id\xca\x41\x1d\n\x08Workflow\x12\x11OperationMetadata\x12\xcc\x01\n\x0e\x44\x65leteWorkflow\x12\x30.google.cloud.workflows.v1.DeleteWorkflowRequest\x1a\x1d.google.longrunning.Operation\"i\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/workflows/*}\xda\x41\x04name\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x12\xe2\x01\n\x0eUpdateWorkflow\x12\x30.google.cloud.workflows.v1.UpdateWorkflowRequest\x1a\x1d.google.longrunning.Operation\"\x7f\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{workflow.name=projects/*/locations/*/workflows/*}:\x08workflow\xda\x41\x14workflow,update_mask\xca\x41\x1d\n\x08Workflow\x12\x11OperationMetadata\x1aL\xca\x41\x18workflows.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe7\x01\n\x1d\x63om.google.cloud.workflows.v1B\x0eWorkflowsProtoP\x01Z;cloud.google.com/go/workflows/apiv1/workflowspb;workflowspb\xea\x41v\n!cloudkms.googleapis.com/CryptoKey\x12Qprojects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}b\x06proto3"
17
18
 
18
19
  pool = Google::Protobuf::DescriptorPool.generated_pool
19
20
 
@@ -46,7 +47,10 @@ module Google
46
47
  module Workflows
47
48
  module V1
48
49
  Workflow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow").msgclass
50
+ Workflow::StateError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow.StateError").msgclass
51
+ Workflow::StateError::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow.StateError.Type").enummodule
49
52
  Workflow::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow.State").enummodule
53
+ Workflow::CallLogLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow.CallLogLevel").enummodule
50
54
  ListWorkflowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.ListWorkflowsRequest").msgclass
51
55
  ListWorkflowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.ListWorkflowsResponse").msgclass
52
56
  GetWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.GetWorkflowRequest").msgclass
@@ -35,14 +35,14 @@ module Google
35
35
  self.unmarshal_class_method = :decode
36
36
  self.service_name = 'google.cloud.workflows.v1.Workflows'
37
37
 
38
- # Lists Workflows in a given project and location.
38
+ # Lists workflows in a given project and location.
39
39
  # The default order is not specified.
40
40
  rpc :ListWorkflows, ::Google::Cloud::Workflows::V1::ListWorkflowsRequest, ::Google::Cloud::Workflows::V1::ListWorkflowsResponse
41
- # Gets details of a single Workflow.
41
+ # Gets details of a single workflow.
42
42
  rpc :GetWorkflow, ::Google::Cloud::Workflows::V1::GetWorkflowRequest, ::Google::Cloud::Workflows::V1::Workflow
43
43
  # Creates a new workflow. If a workflow with the specified name already
44
44
  # exists in the specified project and location, the long running operation
45
- # will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
45
+ # returns a [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
46
46
  rpc :CreateWorkflow, ::Google::Cloud::Workflows::V1::CreateWorkflowRequest, ::Google::Longrunning::Operation
47
47
  # Deletes a workflow with the specified name.
48
48
  # This method also cancels and deletes all running executions of the
@@ -50,8 +50,8 @@ module Google
50
50
  rpc :DeleteWorkflow, ::Google::Cloud::Workflows::V1::DeleteWorkflowRequest, ::Google::Longrunning::Operation
51
51
  # Updates an existing workflow.
52
52
  # Running this method has no impact on already running executions of the
53
- # workflow. A new revision of the workflow may be created as a result of a
54
- # successful update operation. In that case, such revision will be used
53
+ # workflow. A new revision of the workflow might be created as a result of a
54
+ # successful update operation. In that case, the new revision is used
55
55
  # in new workflow executions.
56
56
  rpc :UpdateWorkflow, ::Google::Cloud::Workflows::V1::UpdateWorkflowRequest, ::Google::Longrunning::Operation
57
57
  end
@@ -66,6 +66,20 @@ module Google
66
66
  # a non-empty value will be returned. The user will not be aware of what
67
67
  # non-empty value to expect.
68
68
  NON_EMPTY_DEFAULT = 7
69
+
70
+ # Denotes that the field in a resource (a message annotated with
71
+ # google.api.resource) is used in the resource name to uniquely identify the
72
+ # resource. For AIP-compliant APIs, this should only be applied to the
73
+ # `name` field on the resource.
74
+ #
75
+ # This behavior should not be applied to references to other resources within
76
+ # the message.
77
+ #
78
+ # The identifier field of resources often have different field behavior
79
+ # depending on the request it is embedded in (e.g. for Create methods name
80
+ # is optional and unused, while for Update methods it is required). Instead
81
+ # of method-specific annotations, only `IDENTIFIER` is required.
82
+ IDENTIFIER = 8
69
83
  end
70
84
  end
71
85
  end
@@ -40,27 +40,28 @@ module Google
40
40
  # following properties of a workflow:
41
41
  #
42
42
  # - {::Google::Cloud::Workflows::V1::Workflow#service_account Service account}
43
- # - {::Google::Cloud::Workflows::V1::Workflow#source_contents Workflow code to be executed}
43
+ # - [Workflow code to be
44
+ # executed][google.cloud.workflows.v1.Workflow.source_contents]
44
45
  #
45
- # The format is "000001-a4d", where the first 6 characters define
46
+ # The format is "000001-a4d", where the first six characters define
46
47
  # the zero-padded revision ordinal number. They are followed by a hyphen and
47
- # 3 hexadecimal random characters.
48
+ # three hexadecimal random characters.
48
49
  # @!attribute [r] create_time
49
50
  # @return [::Google::Protobuf::Timestamp]
50
- # Output only. The timestamp of when the workflow was created.
51
+ # Output only. The timestamp for when the workflow was created.
51
52
  # @!attribute [r] update_time
52
53
  # @return [::Google::Protobuf::Timestamp]
53
- # Output only. The last update timestamp of the workflow.
54
+ # Output only. The timestamp for when the workflow was last updated.
54
55
  # @!attribute [r] revision_create_time
55
56
  # @return [::Google::Protobuf::Timestamp]
56
- # Output only. The timestamp that the latest revision of the workflow
57
- # was created.
57
+ # Output only. The timestamp for the latest revision of the workflow's
58
+ # creation.
58
59
  # @!attribute [rw] labels
59
60
  # @return [::Google::Protobuf::Map{::String => ::String}]
60
61
  # Labels associated with this workflow.
61
62
  # Labels can contain at most 64 entries. Keys and values can be no longer
62
63
  # than 63 characters and can only contain lowercase letters, numeric
63
- # characters, underscores and dashes. Label keys must start with a letter.
64
+ # characters, underscores, and dashes. Label keys must start with a letter.
64
65
  # International characters are allowed.
65
66
  # @!attribute [rw] service_account
66
67
  # @return [::String]
@@ -79,10 +80,61 @@ module Google
79
80
  # @!attribute [rw] source_contents
80
81
  # @return [::String]
81
82
  # Workflow code to be executed. The size limit is 128KB.
83
+ # @!attribute [rw] crypto_key_name
84
+ # @return [::String]
85
+ # Optional. The resource name of a KMS crypto key used to encrypt or decrypt
86
+ # the data associated with the workflow.
87
+ #
88
+ # Format:
89
+ # projects/\\{project}/locations/\\{location}/keyRings/\\{keyRing}/cryptoKeys/\\{cryptoKey}
90
+ #
91
+ # Using `-` as a wildcard for the `{project}` or not providing one at all
92
+ # will infer the project from the account.
93
+ #
94
+ # If not provided, data associated with the workflow will not be
95
+ # CMEK-encrypted.
96
+ # @!attribute [r] state_error
97
+ # @return [::Google::Cloud::Workflows::V1::Workflow::StateError]
98
+ # Output only. Error regarding the state of the workflow. For example, this
99
+ # field will have error details if the execution data is unavailable due to
100
+ # revoked KMS key permissions.
101
+ # @!attribute [rw] call_log_level
102
+ # @return [::Google::Cloud::Workflows::V1::Workflow::CallLogLevel]
103
+ # Optional. Describes the level of platform logging to apply to calls and
104
+ # call responses during executions of this workflow. If both the workflow and
105
+ # the execution specify a logging level, the execution level takes
106
+ # precedence.
107
+ # @!attribute [rw] user_env_vars
108
+ # @return [::Google::Protobuf::Map{::String => ::String}]
109
+ # Optional. User-defined environment variables associated with this workflow
110
+ # revision. This map has a maximum length of 20. Each string can take up to
111
+ # 40KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or
112
+ # “WORKFLOWS".
82
113
  class Workflow
83
114
  include ::Google::Protobuf::MessageExts
84
115
  extend ::Google::Protobuf::MessageExts::ClassMethods
85
116
 
117
+ # Describes an error related to the current state of the workflow.
118
+ # @!attribute [rw] details
119
+ # @return [::String]
120
+ # Provides specifics about the error.
121
+ # @!attribute [rw] type
122
+ # @return [::Google::Cloud::Workflows::V1::Workflow::StateError::Type]
123
+ # The type of this state error.
124
+ class StateError
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+
128
+ # Describes the possibled types of a state error.
129
+ module Type
130
+ # No type specified.
131
+ TYPE_UNSPECIFIED = 0
132
+
133
+ # Caused by an issue with KMS.
134
+ KMS_ERROR = 1
135
+ end
136
+ end
137
+
86
138
  # @!attribute [rw] key
87
139
  # @return [::String]
88
140
  # @!attribute [rw] value
@@ -92,14 +144,42 @@ module Google
92
144
  extend ::Google::Protobuf::MessageExts::ClassMethods
93
145
  end
94
146
 
95
- # Describes the current state of workflow deployment. More states may be
96
- # added in the future.
147
+ # @!attribute [rw] key
148
+ # @return [::String]
149
+ # @!attribute [rw] value
150
+ # @return [::String]
151
+ class UserEnvVarsEntry
152
+ include ::Google::Protobuf::MessageExts
153
+ extend ::Google::Protobuf::MessageExts::ClassMethods
154
+ end
155
+
156
+ # Describes the current state of workflow deployment.
97
157
  module State
98
158
  # Invalid state.
99
159
  STATE_UNSPECIFIED = 0
100
160
 
101
161
  # The workflow has been deployed successfully and is serving.
102
162
  ACTIVE = 1
163
+
164
+ # Workflow data is unavailable. See the `state_error` field.
165
+ UNAVAILABLE = 2
166
+ end
167
+
168
+ # Describes the level of platform logging to apply to calls and call
169
+ # responses during workflow executions.
170
+ module CallLogLevel
171
+ # No call logging level specified.
172
+ CALL_LOG_LEVEL_UNSPECIFIED = 0
173
+
174
+ # Log all call steps within workflows, all call returns, and all exceptions
175
+ # raised.
176
+ LOG_ALL_CALLS = 1
177
+
178
+ # Log only exceptions that are raised from call steps within workflows.
179
+ LOG_ERRORS_ONLY = 2
180
+
181
+ # Explicitly log nothing.
182
+ LOG_NONE = 3
103
183
  end
104
184
  end
105
185
 
@@ -112,10 +192,10 @@ module Google
112
192
  # Format: projects/\\{project}/locations/\\{location}
113
193
  # @!attribute [rw] page_size
114
194
  # @return [::Integer]
115
- # Maximum number of workflows to return per call. The service may return
116
- # fewer than this value. If the value is not specified, a default value of
117
- # 500 will be used. The maximum permitted value is 1000 and values greater
118
- # than 1000 will be coerced down to 1000.
195
+ # Maximum number of workflows to return per call. The service might return
196
+ # fewer than this value even if not at the end of the collection. If a value
197
+ # is not specified, a default value of 500 is used. The maximum permitted
198
+ # value is 1000 and values greater than 1000 are coerced down to 1000.
119
199
  # @!attribute [rw] page_token
120
200
  # @return [::String]
121
201
  # A page token, received from a previous `ListWorkflows` call.
@@ -128,10 +208,10 @@ module Google
128
208
  # Filter to restrict results to specific workflows.
129
209
  # @!attribute [rw] order_by
130
210
  # @return [::String]
131
- # Comma-separated list of fields that that specify the order of the results.
211
+ # Comma-separated list of fields that specify the order of the results.
132
212
  # Default sorting order for a field is ascending. To specify descending order
133
- # for a field, append a " desc" suffix.
134
- # If not specified, the results will be returned in an unspecified order.
213
+ # for a field, append a "desc" suffix.
214
+ # If not specified, the results are returned in an unspecified order.
135
215
  class ListWorkflowsRequest
136
216
  include ::Google::Protobuf::MessageExts
137
217
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -142,7 +222,7 @@ module Google
142
222
  # method.
143
223
  # @!attribute [rw] workflows
144
224
  # @return [::Array<::Google::Cloud::Workflows::V1::Workflow>]
145
- # The workflows which match the request.
225
+ # The workflows that match the request.
146
226
  # @!attribute [rw] next_page_token
147
227
  # @return [::String]
148
228
  # A token, which can be sent as `page_token` to retrieve the next page.
@@ -159,8 +239,15 @@ module Google
159
239
  # {::Google::Cloud::Workflows::V1::Workflows::Client#get_workflow GetWorkflow} method.
160
240
  # @!attribute [rw] name
161
241
  # @return [::String]
162
- # Required. Name of the workflow which information should be retrieved.
242
+ # Required. Name of the workflow for which information should be retrieved.
163
243
  # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow}
244
+ # @!attribute [rw] revision_id
245
+ # @return [::String]
246
+ # Optional. The revision of the workflow to retrieve. If the revision_id is
247
+ # empty, the latest revision is retrieved.
248
+ # The format is "000001-a4d", where the first six characters define
249
+ # the zero-padded decimal revision number. They are followed by a hyphen and
250
+ # three hexadecimal characters.
164
251
  class GetWorkflowRequest
165
252
  include ::Google::Protobuf::MessageExts
166
253
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-workflows-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-06 00:00:00.000000000 Z
11
+ date: 2023-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.19.1
19
+ version: 0.20.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.19.1
29
+ version: 0.20.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -44,6 +44,26 @@ dependencies:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '1.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: google-cloud-location
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0.4'
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: 2.a
57
+ type: :runtime
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '0.4'
64
+ - - "<"
65
+ - !ruby/object:Gem::Version
66
+ version: 2.a
47
67
  - !ruby/object:Gem::Dependency
48
68
  name: google-style
49
69
  requirement: !ruby/object:Gem::Requirement
@@ -174,6 +194,7 @@ files:
174
194
  - README.md
175
195
  - lib/google-cloud-workflows-v1.rb
176
196
  - lib/google/cloud/workflows/v1.rb
197
+ - lib/google/cloud/workflows/v1/bindings_override.rb
177
198
  - lib/google/cloud/workflows/v1/rest.rb
178
199
  - lib/google/cloud/workflows/v1/version.rb
179
200
  - lib/google/cloud/workflows/v1/workflows.rb
@@ -219,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
240
  - !ruby/object:Gem::Version
220
241
  version: '0'
221
242
  requirements: []
222
- rubygems_version: 3.4.2
243
+ rubygems_version: 3.4.19
223
244
  signing_key:
224
245
  specification_version: 4
225
246
  summary: Manage workflow definitions. To execute workflows and manage executions,