google-cloud-run-v2 0.5.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8a4a4211fa3c66d3988fbf411e9e975b5058fc596619427724baf4b11e3ec15
4
- data.tar.gz: aee71deba3ae25c34bf93921d990c7bf904b2c9d95316a799823de2f9c20fa45
3
+ metadata.gz: dad9ebca7de61efcf37ebddd0ad35e1c845a9203af957e0c4a8bf478f5f11f7a
4
+ data.tar.gz: 0dfabe3ddcce1d289a81ec7ab6afe0862f3653547fbc7f8235da0ce7dd349c35
5
5
  SHA512:
6
- metadata.gz: 524c972c4f15312049511e1326d9c3d522b91178b449ce10f59ea3add53770d7272116c51370cf42cf76ccc81bda20aa76ea0ebb26f25871aec2d1fb3672c4aa
7
- data.tar.gz: a3b5b7ee2ed34e1d6f27b79e0ef7d906f696ca92afe3c2d082a77ca65fd5626dd9c7dfc7275401dda71e453f1f68687119045f37c47896ad0744f49f2d9f1a91
6
+ metadata.gz: 7ff5076a3dc534a09454dab52616222bc40ce36cf629a0046581e3c2b1aaad9be5da50da3260316f1e57b3305145702632c87a18b10b3a009545d6ffec10e0cb
7
+ data.tar.gz: 2d2e7554e6b12a99276bdf127ffbf2b82d805fc50e1f71dd6885ef7644741e8f9dc349f45124fdc694deae60781def5cc74c327f74ee3f791b8a991225fc07b9
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Cloud Run V2 API
2
2
 
3
- API Client library for the Cloud Run V2 API
3
+ Deploy and manage user provided container images that scale automatically based on incoming requests. The Cloud Run Admin API v1 follows the Knative Serving API specification, while v2 is aligned with Google Cloud AIP-based API standards, as described in https://google.aip.dev/.
4
4
 
5
5
  Cloud Run deploys and manages user provided container images that scale automatically based on incoming requests.
6
6
 
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -62,6 +62,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
62
62
  value :ACTIVE_REVISION_LIMIT_REACHED, 9
63
63
  value :NO_DEPLOYMENT, 10
64
64
  value :HEALTH_CHECK_SKIPPED, 11
65
+ value :MIN_INSTANCES_WARMING, 12
65
66
  end
66
67
  add_enum "google.cloud.run.v2.Condition.ExecutionReason" do
67
68
  value :EXECUTION_REASON_UNDEFINED, 0
@@ -56,6 +56,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
56
56
  optional :running_count, :int32, 19
57
57
  optional :succeeded_count, :int32, 20
58
58
  optional :failed_count, :int32, 21
59
+ optional :cancelled_count, :int32, 24
60
+ optional :retried_count, :int32, 25
61
+ optional :log_uri, :string, 26
59
62
  optional :etag, :string, 99
60
63
  end
61
64
  end
@@ -310,13 +310,11 @@ module Google
310
310
  # # Call the list_executions method.
311
311
  # result = client.list_executions request
312
312
  #
313
- # # The returned object is of type Gapic::PagedEnumerable. You can
314
- # # iterate over all elements by calling #each, and the enumerable
315
- # # will lazily make API calls to fetch subsequent pages. Other
316
- # # methods are also available for managing paging directly.
317
- # result.each do |response|
313
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
314
+ # # over elements, and API calls will be issued to fetch pages as needed.
315
+ # result.each do |item|
318
316
  # # Each element is of type ::Google::Cloud::Run::V2::Execution.
319
- # p response
317
+ # p item
320
318
  # end
321
319
  #
322
320
  def list_executions request, options = nil
@@ -411,14 +409,14 @@ module Google
411
409
  # # Call the delete_execution method.
412
410
  # result = client.delete_execution request
413
411
  #
414
- # # The returned object is of type Gapic::Operation. You can use this
415
- # # object to check the status of an operation, cancel it, or wait
416
- # # for results. Here is how to block until completion:
412
+ # # The returned object is of type Gapic::Operation. You can use it to
413
+ # # check the status of an operation, cancel it, or wait for results.
414
+ # # Here is how to wait for a response.
417
415
  # result.wait_until_done! timeout: 60
418
416
  # if result.response?
419
417
  # p result.response
420
418
  # else
421
- # puts "Error!"
419
+ # puts "No response received."
422
420
  # end
423
421
  #
424
422
  def delete_execution 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