google-cloud-run-v2 0.5.0 → 0.7.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.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/google/cloud/run/v2/condition_pb.rb +1 -0
  4. data/lib/google/cloud/run/v2/execution_pb.rb +3 -0
  5. data/lib/google/cloud/run/v2/executions/client.rb +8 -10
  6. data/lib/google/cloud/run/v2/executions/operations.rb +20 -14
  7. data/lib/google/cloud/run/v2/executions/rest/client.rb +533 -0
  8. data/lib/google/cloud/run/v2/executions/rest/operations.rb +935 -0
  9. data/lib/google/cloud/run/v2/executions/rest/service_stub.rb +225 -0
  10. data/lib/google/cloud/run/v2/executions/rest.rb +53 -0
  11. data/lib/google/cloud/run/v2/executions.rb +7 -1
  12. data/lib/google/cloud/run/v2/job_pb.rb +1 -0
  13. data/lib/google/cloud/run/v2/jobs/client.rb +20 -22
  14. data/lib/google/cloud/run/v2/jobs/operations.rb +20 -14
  15. data/lib/google/cloud/run/v2/jobs/rest/client.rb +998 -0
  16. data/lib/google/cloud/run/v2/jobs/rest/operations.rb +935 -0
  17. data/lib/google/cloud/run/v2/jobs/rest/service_stub.rb +584 -0
  18. data/lib/google/cloud/run/v2/jobs/rest.rb +53 -0
  19. data/lib/google/cloud/run/v2/jobs.rb +7 -1
  20. data/lib/google/cloud/run/v2/rest.rb +41 -0
  21. data/lib/google/cloud/run/v2/revision_pb.rb +2 -0
  22. data/lib/google/cloud/run/v2/revisions/client.rb +8 -10
  23. data/lib/google/cloud/run/v2/revisions/operations.rb +20 -14
  24. data/lib/google/cloud/run/v2/revisions/rest/client.rb +531 -0
  25. data/lib/google/cloud/run/v2/revisions/rest/operations.rb +935 -0
  26. data/lib/google/cloud/run/v2/revisions/rest/service_stub.rb +225 -0
  27. data/lib/google/cloud/run/v2/revisions/rest.rb +53 -0
  28. data/lib/google/cloud/run/v2/revisions.rb +7 -1
  29. data/lib/google/cloud/run/v2/services/client.rb +19 -21
  30. data/lib/google/cloud/run/v2/services/operations.rb +20 -14
  31. data/lib/google/cloud/run/v2/services/rest/client.rb +940 -0
  32. data/lib/google/cloud/run/v2/services/rest/operations.rb +935 -0
  33. data/lib/google/cloud/run/v2/services/rest/service_stub.rb +524 -0
  34. data/lib/google/cloud/run/v2/services/rest.rb +53 -0
  35. data/lib/google/cloud/run/v2/services.rb +7 -1
  36. data/lib/google/cloud/run/v2/task_pb.rb +1 -0
  37. data/lib/google/cloud/run/v2/tasks/client.rb +4 -6
  38. data/lib/google/cloud/run/v2/tasks/rest/client.rb +440 -0
  39. data/lib/google/cloud/run/v2/tasks/rest/service_stub.rb +166 -0
  40. data/lib/google/cloud/run/v2/tasks/rest.rb +52 -0
  41. data/lib/google/cloud/run/v2/tasks.rb +7 -1
  42. data/lib/google/cloud/run/v2/vendor_settings_pb.rb +6 -0
  43. data/lib/google/cloud/run/v2/version.rb +1 -1
  44. data/lib/google/cloud/run/v2.rb +7 -2
  45. data/proto_docs/google/api/client.rb +318 -0
  46. data/proto_docs/google/api/launch_stage.rb +3 -3
  47. data/proto_docs/google/cloud/run/v2/condition.rb +4 -0
  48. data/proto_docs/google/cloud/run/v2/execution.rb +30 -20
  49. data/proto_docs/google/cloud/run/v2/execution_template.rb +12 -1
  50. data/proto_docs/google/cloud/run/v2/job.rb +29 -21
  51. data/proto_docs/google/cloud/run/v2/k8s.min.rb +13 -8
  52. data/proto_docs/google/cloud/run/v2/revision.rb +19 -13
  53. data/proto_docs/google/cloud/run/v2/revision_template.rb +10 -0
  54. data/proto_docs/google/cloud/run/v2/service.rb +44 -34
  55. data/proto_docs/google/cloud/run/v2/task.rb +21 -18
  56. data/proto_docs/google/cloud/run/v2/vendor_settings.rb +12 -0
  57. data/proto_docs/google/rpc/status.rb +4 -2
  58. metadata +34 -10
@@ -0,0 +1,41 @@
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 "google/cloud/run/v2/executions/rest"
20
+ require "google/cloud/run/v2/jobs/rest"
21
+ require "google/cloud/run/v2/revisions/rest"
22
+ require "google/cloud/run/v2/services/rest"
23
+ require "google/cloud/run/v2/tasks/rest"
24
+ require "google/cloud/run/v2/version"
25
+
26
+ module Google
27
+ module Cloud
28
+ module Run
29
+ ##
30
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
31
+ #
32
+ # @example
33
+ #
34
+ # require "google/cloud/run/v2/rest"
35
+ # client = ::Google::Cloud::Run::V2::Executions::Rest::Client.new
36
+ #
37
+ module V2
38
+ end
39
+ end
40
+ end
41
+ end
@@ -57,6 +57,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
57
57
  repeated :volumes, :message, 18, "google.cloud.run.v2.Volume"
58
58
  optional :execution_environment, :enum, 20, "google.cloud.run.v2.ExecutionEnvironment"
59
59
  optional :encryption_key, :string, 21
60
+ optional :encryption_key_revocation_action, :enum, 23, "google.cloud.run.v2.EncryptionKeyRevocationAction"
61
+ optional :encryption_key_shutdown_duration, :message, 24, "google.protobuf.Duration"
60
62
  optional :reconciling, :bool, 30
61
63
  repeated :conditions, :message, 31, "google.cloud.run.v2.Condition"
62
64
  optional :observed_generation, :int64, 32
@@ -312,13 +312,11 @@ module Google
312
312
  # # Call the list_revisions method.
313
313
  # result = client.list_revisions request
314
314
  #
315
- # # The returned object is of type Gapic::PagedEnumerable. You can
316
- # # iterate over all elements by calling #each, and the enumerable
317
- # # will lazily make API calls to fetch subsequent pages. Other
318
- # # methods are also available for managing paging directly.
319
- # result.each do |response|
315
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
316
+ # # over elements, and API calls will be issued to fetch pages as needed.
317
+ # result.each do |item|
320
318
  # # Each element is of type ::Google::Cloud::Run::V2::Revision.
321
- # p response
319
+ # p item
322
320
  # end
323
321
  #
324
322
  def list_revisions request, options = nil
@@ -415,14 +413,14 @@ module Google
415
413
  # # Call the delete_revision method.
416
414
  # result = client.delete_revision request
417
415
  #
418
- # # The returned object is of type Gapic::Operation. You can use this
419
- # # object to check the status of an operation, cancel it, or wait
420
- # # for results. Here is how to block until completion:
416
+ # # The returned object is of type Gapic::Operation. You can use it to
417
+ # # check the status of an operation, cancel it, or wait for results.
418
+ # # Here is how to wait for a response.
421
419
  # result.wait_until_done! timeout: 60
422
420
  # if result.response?
423
421
  # p result.response
424
422
  # else
425
- # puts "Error!"
423
+ # puts "No response received."
426
424
  # end
427
425
  #
428
426
  def delete_revision request, options = nil
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil
@@ -567,6 +565,14 @@ module Google
567
565
  gapic_version: ::Google::Cloud::Run::V2::VERSION
568
566
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
569
567
 
568
+ header_params = {}
569
+ if request.name
570
+ header_params["name"] = request.name
571
+ end
572
+
573
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
574
+ metadata[:"x-goog-request-params"] ||= request_params_header
575
+
570
576
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
571
577
  metadata: metadata,
572
578
  retry_policy: @config.rpcs.wait_operation.retry_policy