google-cloud-deploy-v1 1.3.0 → 1.5.0

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: 730c636a669460a04185c30752069f856a78311096b52d03b3f0e09318a6695a
4
- data.tar.gz: 7f031cf3068665d2a8b63793c68cabd8a2d27129b0996446afb89fc09b40e705
3
+ metadata.gz: 35cc54d4627a363b4b56cd1dbf724daaa16f4c51722de702d2c5656c22796796
4
+ data.tar.gz: 86ae468d789fc2a8f6e69bed8eb145294d36592606f46106828c5693292584a0
5
5
  SHA512:
6
- metadata.gz: ba8fa005718bf230db0b18960bfb50cfd8413db9a867e377b7b0e57596a2cb38ddf6cf1e0c750f1cf57115410e65be3d3bd5782a92150de342705d0ef94db8db
7
- data.tar.gz: 6493d5a9ed55a8aa26f5818009395a5e8b7190d3f1f7b62dfc493d15e51c07c9755a2858e312af8afd1449abfc471bff9b82d0f8575d13b7fa1cf04c34dea703
6
+ metadata.gz: 636af57c3c6ef0bf61afedaa79b7f4d6c05815e65713524995f2255d2f5d492d95c0ba91c904a9813350071e26053f491940e4d77d0df07a2a46d040d1fa907c
7
+ data.tar.gz: bdeb2974f79e8414cf63cb9d404bf06b483b160f70a2fb792507d16b60588963d9fb72fd00a1ea1e7537213b9eb0b9bfd8be8b9475bf853a858b272eb2c9eb56
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/deploy/)
44
44
  for general usage information.
45
45
 
46
- ## Enabling Logging
47
-
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/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
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
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ You can customize logging by modifying the `logger` configuration when
72
+ constructing a client object. For example:
55
73
 
56
74
  ```ruby
75
+ require "google/cloud/deploy/v1"
57
76
  require "logger"
58
77
 
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
61
- def logger
62
- LOGGER
63
- end
64
- end
65
-
66
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
67
- module GRPC
68
- extend MyLogger
78
+ client = ::Google::Cloud::Deploy::V1::CloudDeploy::Client.new do |config|
79
+ config.logger = Logger.new "my-app.log"
69
80
  end
70
81
  ```
71
82
 
72
-
73
83
  ## Google Cloud Samples
74
84
 
75
85
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
@@ -312,14 +312,26 @@ module Google
312
312
  universe_domain: @config.universe_domain,
313
313
  channel_args: @config.channel_args,
314
314
  interceptors: @config.interceptors,
315
- channel_pool_config: @config.channel_pool
315
+ channel_pool_config: @config.channel_pool,
316
+ logger: @config.logger
316
317
  )
317
318
 
319
+ @cloud_deploy_stub.stub_logger&.info do |entry|
320
+ entry.set_system_name
321
+ entry.set_service
322
+ entry.message = "Created client for #{entry.service}"
323
+ entry.set_credentials_fields credentials
324
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
325
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
326
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
327
+ end
328
+
318
329
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
319
330
  config.credentials = credentials
320
331
  config.quota_project = @quota_project_id
321
332
  config.endpoint = @cloud_deploy_stub.endpoint
322
333
  config.universe_domain = @cloud_deploy_stub.universe_domain
334
+ config.logger = @cloud_deploy_stub.logger if config.respond_to? :logger=
323
335
  end
324
336
 
325
337
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
@@ -327,6 +339,7 @@ module Google
327
339
  config.quota_project = @quota_project_id
328
340
  config.endpoint = @cloud_deploy_stub.endpoint
329
341
  config.universe_domain = @cloud_deploy_stub.universe_domain
342
+ config.logger = @cloud_deploy_stub.logger if config.respond_to? :logger=
330
343
  end
331
344
  end
332
345
 
@@ -351,6 +364,15 @@ module Google
351
364
  #
352
365
  attr_reader :iam_policy_client
353
366
 
367
+ ##
368
+ # The logger used for request/response debug logging.
369
+ #
370
+ # @return [Logger]
371
+ #
372
+ def logger
373
+ @cloud_deploy_stub.logger
374
+ end
375
+
354
376
  # Service calls
355
377
 
356
378
  ##
@@ -455,7 +477,7 @@ module Google
455
477
  @cloud_deploy_stub.call_rpc :list_delivery_pipelines, request, options: options do |response, operation|
456
478
  response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_delivery_pipelines, request, response, operation, options
457
479
  yield response, operation if block_given?
458
- return response
480
+ throw :response, response
459
481
  end
460
482
  rescue ::GRPC::BadStatus => e
461
483
  raise ::Google::Cloud::Error.from_error(e)
@@ -542,7 +564,6 @@ module Google
542
564
 
543
565
  @cloud_deploy_stub.call_rpc :get_delivery_pipeline, request, options: options do |response, operation|
544
566
  yield response, operation if block_given?
545
- return response
546
567
  end
547
568
  rescue ::GRPC::BadStatus => e
548
569
  raise ::Google::Cloud::Error.from_error(e)
@@ -658,7 +679,7 @@ module Google
658
679
  @cloud_deploy_stub.call_rpc :create_delivery_pipeline, request, options: options do |response, operation|
659
680
  response = ::Gapic::Operation.new response, @operations_client, options: options
660
681
  yield response, operation if block_given?
661
- return response
682
+ throw :response, response
662
683
  end
663
684
  rescue ::GRPC::BadStatus => e
664
685
  raise ::Google::Cloud::Error.from_error(e)
@@ -778,7 +799,7 @@ module Google
778
799
  @cloud_deploy_stub.call_rpc :update_delivery_pipeline, request, options: options do |response, operation|
779
800
  response = ::Gapic::Operation.new response, @operations_client, options: options
780
801
  yield response, operation if block_given?
781
- return response
802
+ throw :response, response
782
803
  end
783
804
  rescue ::GRPC::BadStatus => e
784
805
  raise ::Google::Cloud::Error.from_error(e)
@@ -901,7 +922,7 @@ module Google
901
922
  @cloud_deploy_stub.call_rpc :delete_delivery_pipeline, request, options: options do |response, operation|
902
923
  response = ::Gapic::Operation.new response, @operations_client, options: options
903
924
  yield response, operation if block_given?
904
- return response
925
+ throw :response, response
905
926
  end
906
927
  rescue ::GRPC::BadStatus => e
907
928
  raise ::Google::Cloud::Error.from_error(e)
@@ -1010,7 +1031,7 @@ module Google
1010
1031
  @cloud_deploy_stub.call_rpc :list_targets, request, options: options do |response, operation|
1011
1032
  response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_targets, request, response, operation, options
1012
1033
  yield response, operation if block_given?
1013
- return response
1034
+ throw :response, response
1014
1035
  end
1015
1036
  rescue ::GRPC::BadStatus => e
1016
1037
  raise ::Google::Cloud::Error.from_error(e)
@@ -1117,7 +1138,6 @@ module Google
1117
1138
 
1118
1139
  @cloud_deploy_stub.call_rpc :rollback_target, request, options: options do |response, operation|
1119
1140
  yield response, operation if block_given?
1120
- return response
1121
1141
  end
1122
1142
  rescue ::GRPC::BadStatus => e
1123
1143
  raise ::Google::Cloud::Error.from_error(e)
@@ -1204,7 +1224,6 @@ module Google
1204
1224
 
1205
1225
  @cloud_deploy_stub.call_rpc :get_target, request, options: options do |response, operation|
1206
1226
  yield response, operation if block_given?
1207
- return response
1208
1227
  end
1209
1228
  rescue ::GRPC::BadStatus => e
1210
1229
  raise ::Google::Cloud::Error.from_error(e)
@@ -1321,7 +1340,7 @@ module Google
1321
1340
  @cloud_deploy_stub.call_rpc :create_target, request, options: options do |response, operation|
1322
1341
  response = ::Gapic::Operation.new response, @operations_client, options: options
1323
1342
  yield response, operation if block_given?
1324
- return response
1343
+ throw :response, response
1325
1344
  end
1326
1345
  rescue ::GRPC::BadStatus => e
1327
1346
  raise ::Google::Cloud::Error.from_error(e)
@@ -1441,7 +1460,7 @@ module Google
1441
1460
  @cloud_deploy_stub.call_rpc :update_target, request, options: options do |response, operation|
1442
1461
  response = ::Gapic::Operation.new response, @operations_client, options: options
1443
1462
  yield response, operation if block_given?
1444
- return response
1463
+ throw :response, response
1445
1464
  end
1446
1465
  rescue ::GRPC::BadStatus => e
1447
1466
  raise ::Google::Cloud::Error.from_error(e)
@@ -1560,7 +1579,7 @@ module Google
1560
1579
  @cloud_deploy_stub.call_rpc :delete_target, request, options: options do |response, operation|
1561
1580
  response = ::Gapic::Operation.new response, @operations_client, options: options
1562
1581
  yield response, operation if block_given?
1563
- return response
1582
+ throw :response, response
1564
1583
  end
1565
1584
  rescue ::GRPC::BadStatus => e
1566
1585
  raise ::Google::Cloud::Error.from_error(e)
@@ -1669,7 +1688,7 @@ module Google
1669
1688
  @cloud_deploy_stub.call_rpc :list_custom_target_types, request, options: options do |response, operation|
1670
1689
  response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_custom_target_types, request, response, operation, options
1671
1690
  yield response, operation if block_given?
1672
- return response
1691
+ throw :response, response
1673
1692
  end
1674
1693
  rescue ::GRPC::BadStatus => e
1675
1694
  raise ::Google::Cloud::Error.from_error(e)
@@ -1756,7 +1775,6 @@ module Google
1756
1775
 
1757
1776
  @cloud_deploy_stub.call_rpc :get_custom_target_type, request, options: options do |response, operation|
1758
1777
  yield response, operation if block_given?
1759
- return response
1760
1778
  end
1761
1779
  rescue ::GRPC::BadStatus => e
1762
1780
  raise ::Google::Cloud::Error.from_error(e)
@@ -1872,7 +1890,7 @@ module Google
1872
1890
  @cloud_deploy_stub.call_rpc :create_custom_target_type, request, options: options do |response, operation|
1873
1891
  response = ::Gapic::Operation.new response, @operations_client, options: options
1874
1892
  yield response, operation if block_given?
1875
- return response
1893
+ throw :response, response
1876
1894
  end
1877
1895
  rescue ::GRPC::BadStatus => e
1878
1896
  raise ::Google::Cloud::Error.from_error(e)
@@ -1992,7 +2010,7 @@ module Google
1992
2010
  @cloud_deploy_stub.call_rpc :update_custom_target_type, request, options: options do |response, operation|
1993
2011
  response = ::Gapic::Operation.new response, @operations_client, options: options
1994
2012
  yield response, operation if block_given?
1995
- return response
2013
+ throw :response, response
1996
2014
  end
1997
2015
  rescue ::GRPC::BadStatus => e
1998
2016
  raise ::Google::Cloud::Error.from_error(e)
@@ -2111,7 +2129,7 @@ module Google
2111
2129
  @cloud_deploy_stub.call_rpc :delete_custom_target_type, request, options: options do |response, operation|
2112
2130
  response = ::Gapic::Operation.new response, @operations_client, options: options
2113
2131
  yield response, operation if block_given?
2114
- return response
2132
+ throw :response, response
2115
2133
  end
2116
2134
  rescue ::GRPC::BadStatus => e
2117
2135
  raise ::Google::Cloud::Error.from_error(e)
@@ -2220,7 +2238,7 @@ module Google
2220
2238
  @cloud_deploy_stub.call_rpc :list_releases, request, options: options do |response, operation|
2221
2239
  response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_releases, request, response, operation, options
2222
2240
  yield response, operation if block_given?
2223
- return response
2241
+ throw :response, response
2224
2242
  end
2225
2243
  rescue ::GRPC::BadStatus => e
2226
2244
  raise ::Google::Cloud::Error.from_error(e)
@@ -2307,7 +2325,6 @@ module Google
2307
2325
 
2308
2326
  @cloud_deploy_stub.call_rpc :get_release, request, options: options do |response, operation|
2309
2327
  yield response, operation if block_given?
2310
- return response
2311
2328
  end
2312
2329
  rescue ::GRPC::BadStatus => e
2313
2330
  raise ::Google::Cloud::Error.from_error(e)
@@ -2427,7 +2444,7 @@ module Google
2427
2444
  @cloud_deploy_stub.call_rpc :create_release, request, options: options do |response, operation|
2428
2445
  response = ::Gapic::Operation.new response, @operations_client, options: options
2429
2446
  yield response, operation if block_given?
2430
- return response
2447
+ throw :response, response
2431
2448
  end
2432
2449
  rescue ::GRPC::BadStatus => e
2433
2450
  raise ::Google::Cloud::Error.from_error(e)
@@ -2514,7 +2531,6 @@ module Google
2514
2531
 
2515
2532
  @cloud_deploy_stub.call_rpc :abandon_release, request, options: options do |response, operation|
2516
2533
  yield response, operation if block_given?
2517
- return response
2518
2534
  end
2519
2535
  rescue ::GRPC::BadStatus => e
2520
2536
  raise ::Google::Cloud::Error.from_error(e)
@@ -2630,7 +2646,7 @@ module Google
2630
2646
  @cloud_deploy_stub.call_rpc :create_deploy_policy, request, options: options do |response, operation|
2631
2647
  response = ::Gapic::Operation.new response, @operations_client, options: options
2632
2648
  yield response, operation if block_given?
2633
- return response
2649
+ throw :response, response
2634
2650
  end
2635
2651
  rescue ::GRPC::BadStatus => e
2636
2652
  raise ::Google::Cloud::Error.from_error(e)
@@ -2750,7 +2766,7 @@ module Google
2750
2766
  @cloud_deploy_stub.call_rpc :update_deploy_policy, request, options: options do |response, operation|
2751
2767
  response = ::Gapic::Operation.new response, @operations_client, options: options
2752
2768
  yield response, operation if block_given?
2753
- return response
2769
+ throw :response, response
2754
2770
  end
2755
2771
  rescue ::GRPC::BadStatus => e
2756
2772
  raise ::Google::Cloud::Error.from_error(e)
@@ -2869,7 +2885,7 @@ module Google
2869
2885
  @cloud_deploy_stub.call_rpc :delete_deploy_policy, request, options: options do |response, operation|
2870
2886
  response = ::Gapic::Operation.new response, @operations_client, options: options
2871
2887
  yield response, operation if block_given?
2872
- return response
2888
+ throw :response, response
2873
2889
  end
2874
2890
  rescue ::GRPC::BadStatus => e
2875
2891
  raise ::Google::Cloud::Error.from_error(e)
@@ -2977,7 +2993,7 @@ module Google
2977
2993
  @cloud_deploy_stub.call_rpc :list_deploy_policies, request, options: options do |response, operation|
2978
2994
  response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_deploy_policies, request, response, operation, options
2979
2995
  yield response, operation if block_given?
2980
- return response
2996
+ throw :response, response
2981
2997
  end
2982
2998
  rescue ::GRPC::BadStatus => e
2983
2999
  raise ::Google::Cloud::Error.from_error(e)
@@ -3064,7 +3080,6 @@ module Google
3064
3080
 
3065
3081
  @cloud_deploy_stub.call_rpc :get_deploy_policy, request, options: options do |response, operation|
3066
3082
  yield response, operation if block_given?
3067
- return response
3068
3083
  end
3069
3084
  rescue ::GRPC::BadStatus => e
3070
3085
  raise ::Google::Cloud::Error.from_error(e)
@@ -3156,7 +3171,6 @@ module Google
3156
3171
 
3157
3172
  @cloud_deploy_stub.call_rpc :approve_rollout, request, options: options do |response, operation|
3158
3173
  yield response, operation if block_given?
3159
- return response
3160
3174
  end
3161
3175
  rescue ::GRPC::BadStatus => e
3162
3176
  raise ::Google::Cloud::Error.from_error(e)
@@ -3248,7 +3262,6 @@ module Google
3248
3262
 
3249
3263
  @cloud_deploy_stub.call_rpc :advance_rollout, request, options: options do |response, operation|
3250
3264
  yield response, operation if block_given?
3251
- return response
3252
3265
  end
3253
3266
  rescue ::GRPC::BadStatus => e
3254
3267
  raise ::Google::Cloud::Error.from_error(e)
@@ -3338,7 +3351,6 @@ module Google
3338
3351
 
3339
3352
  @cloud_deploy_stub.call_rpc :cancel_rollout, request, options: options do |response, operation|
3340
3353
  yield response, operation if block_given?
3341
- return response
3342
3354
  end
3343
3355
  rescue ::GRPC::BadStatus => e
3344
3356
  raise ::Google::Cloud::Error.from_error(e)
@@ -3446,7 +3458,7 @@ module Google
3446
3458
  @cloud_deploy_stub.call_rpc :list_rollouts, request, options: options do |response, operation|
3447
3459
  response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_rollouts, request, response, operation, options
3448
3460
  yield response, operation if block_given?
3449
- return response
3461
+ throw :response, response
3450
3462
  end
3451
3463
  rescue ::GRPC::BadStatus => e
3452
3464
  raise ::Google::Cloud::Error.from_error(e)
@@ -3533,7 +3545,6 @@ module Google
3533
3545
 
3534
3546
  @cloud_deploy_stub.call_rpc :get_rollout, request, options: options do |response, operation|
3535
3547
  yield response, operation if block_given?
3536
- return response
3537
3548
  end
3538
3549
  rescue ::GRPC::BadStatus => e
3539
3550
  raise ::Google::Cloud::Error.from_error(e)
@@ -3656,7 +3667,7 @@ module Google
3656
3667
  @cloud_deploy_stub.call_rpc :create_rollout, request, options: options do |response, operation|
3657
3668
  response = ::Gapic::Operation.new response, @operations_client, options: options
3658
3669
  yield response, operation if block_given?
3659
- return response
3670
+ throw :response, response
3660
3671
  end
3661
3672
  rescue ::GRPC::BadStatus => e
3662
3673
  raise ::Google::Cloud::Error.from_error(e)
@@ -3750,7 +3761,6 @@ module Google
3750
3761
 
3751
3762
  @cloud_deploy_stub.call_rpc :ignore_job, request, options: options do |response, operation|
3752
3763
  yield response, operation if block_given?
3753
- return response
3754
3764
  end
3755
3765
  rescue ::GRPC::BadStatus => e
3756
3766
  raise ::Google::Cloud::Error.from_error(e)
@@ -3844,7 +3854,6 @@ module Google
3844
3854
 
3845
3855
  @cloud_deploy_stub.call_rpc :retry_job, request, options: options do |response, operation|
3846
3856
  yield response, operation if block_given?
3847
- return response
3848
3857
  end
3849
3858
  rescue ::GRPC::BadStatus => e
3850
3859
  raise ::Google::Cloud::Error.from_error(e)
@@ -3952,7 +3961,7 @@ module Google
3952
3961
  @cloud_deploy_stub.call_rpc :list_job_runs, request, options: options do |response, operation|
3953
3962
  response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_job_runs, request, response, operation, options
3954
3963
  yield response, operation if block_given?
3955
- return response
3964
+ throw :response, response
3956
3965
  end
3957
3966
  rescue ::GRPC::BadStatus => e
3958
3967
  raise ::Google::Cloud::Error.from_error(e)
@@ -4039,7 +4048,6 @@ module Google
4039
4048
 
4040
4049
  @cloud_deploy_stub.call_rpc :get_job_run, request, options: options do |response, operation|
4041
4050
  yield response, operation if block_given?
4042
- return response
4043
4051
  end
4044
4052
  rescue ::GRPC::BadStatus => e
4045
4053
  raise ::Google::Cloud::Error.from_error(e)
@@ -4129,7 +4137,6 @@ module Google
4129
4137
 
4130
4138
  @cloud_deploy_stub.call_rpc :terminate_job_run, request, options: options do |response, operation|
4131
4139
  yield response, operation if block_given?
4132
- return response
4133
4140
  end
4134
4141
  rescue ::GRPC::BadStatus => e
4135
4142
  raise ::Google::Cloud::Error.from_error(e)
@@ -4215,7 +4222,6 @@ module Google
4215
4222
 
4216
4223
  @cloud_deploy_stub.call_rpc :get_config, request, options: options do |response, operation|
4217
4224
  yield response, operation if block_given?
4218
- return response
4219
4225
  end
4220
4226
  rescue ::GRPC::BadStatus => e
4221
4227
  raise ::Google::Cloud::Error.from_error(e)
@@ -4332,7 +4338,7 @@ module Google
4332
4338
  @cloud_deploy_stub.call_rpc :create_automation, request, options: options do |response, operation|
4333
4339
  response = ::Gapic::Operation.new response, @operations_client, options: options
4334
4340
  yield response, operation if block_given?
4335
- return response
4341
+ throw :response, response
4336
4342
  end
4337
4343
  rescue ::GRPC::BadStatus => e
4338
4344
  raise ::Google::Cloud::Error.from_error(e)
@@ -4452,7 +4458,7 @@ module Google
4452
4458
  @cloud_deploy_stub.call_rpc :update_automation, request, options: options do |response, operation|
4453
4459
  response = ::Gapic::Operation.new response, @operations_client, options: options
4454
4460
  yield response, operation if block_given?
4455
- return response
4461
+ throw :response, response
4456
4462
  end
4457
4463
  rescue ::GRPC::BadStatus => e
4458
4464
  raise ::Google::Cloud::Error.from_error(e)
@@ -4572,7 +4578,7 @@ module Google
4572
4578
  @cloud_deploy_stub.call_rpc :delete_automation, request, options: options do |response, operation|
4573
4579
  response = ::Gapic::Operation.new response, @operations_client, options: options
4574
4580
  yield response, operation if block_given?
4575
- return response
4581
+ throw :response, response
4576
4582
  end
4577
4583
  rescue ::GRPC::BadStatus => e
4578
4584
  raise ::Google::Cloud::Error.from_error(e)
@@ -4659,7 +4665,6 @@ module Google
4659
4665
 
4660
4666
  @cloud_deploy_stub.call_rpc :get_automation, request, options: options do |response, operation|
4661
4667
  yield response, operation if block_given?
4662
- return response
4663
4668
  end
4664
4669
  rescue ::GRPC::BadStatus => e
4665
4670
  raise ::Google::Cloud::Error.from_error(e)
@@ -4768,7 +4773,7 @@ module Google
4768
4773
  @cloud_deploy_stub.call_rpc :list_automations, request, options: options do |response, operation|
4769
4774
  response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_automations, request, response, operation, options
4770
4775
  yield response, operation if block_given?
4771
- return response
4776
+ throw :response, response
4772
4777
  end
4773
4778
  rescue ::GRPC::BadStatus => e
4774
4779
  raise ::Google::Cloud::Error.from_error(e)
@@ -4855,7 +4860,6 @@ module Google
4855
4860
 
4856
4861
  @cloud_deploy_stub.call_rpc :get_automation_run, request, options: options do |response, operation|
4857
4862
  yield response, operation if block_given?
4858
- return response
4859
4863
  end
4860
4864
  rescue ::GRPC::BadStatus => e
4861
4865
  raise ::Google::Cloud::Error.from_error(e)
@@ -4964,7 +4968,7 @@ module Google
4964
4968
  @cloud_deploy_stub.call_rpc :list_automation_runs, request, options: options do |response, operation|
4965
4969
  response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_automation_runs, request, response, operation, options
4966
4970
  yield response, operation if block_given?
4967
- return response
4971
+ throw :response, response
4968
4972
  end
4969
4973
  rescue ::GRPC::BadStatus => e
4970
4974
  raise ::Google::Cloud::Error.from_error(e)
@@ -5054,7 +5058,6 @@ module Google
5054
5058
 
5055
5059
  @cloud_deploy_stub.call_rpc :cancel_automation_run, request, options: options do |response, operation|
5056
5060
  yield response, operation if block_given?
5057
- return response
5058
5061
  end
5059
5062
  rescue ::GRPC::BadStatus => e
5060
5063
  raise ::Google::Cloud::Error.from_error(e)
@@ -5143,6 +5146,11 @@ module Google
5143
5146
  # default endpoint URL. The default value of nil uses the environment
5144
5147
  # universe (usually the default "googleapis.com" universe).
5145
5148
  # @return [::String,nil]
5149
+ # @!attribute [rw] logger
5150
+ # A custom logger to use for request/response debug logging, or the value
5151
+ # `:default` (the default) to construct a default logger, or `nil` to
5152
+ # explicitly disable logging.
5153
+ # @return [::Logger,:default,nil]
5146
5154
  #
5147
5155
  class Configuration
5148
5156
  extend ::Gapic::Config
@@ -5167,6 +5175,7 @@ module Google
5167
5175
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
5168
5176
  config_attr :quota_project, nil, ::String, nil
5169
5177
  config_attr :universe_domain, nil, ::String, nil
5178
+ config_attr :logger, :default, ::Logger, nil, :default
5170
5179
 
5171
5180
  # @private
5172
5181
  def initialize parent_config = nil
@@ -124,14 +124,6 @@ module Google
124
124
  # Lists operations that match the specified filter in the request. If the
125
125
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
126
126
  #
127
- # NOTE: the `name` binding allows API services to override the binding
128
- # to use different resource name schemes, such as `users/*/operations`. To
129
- # override the binding, API services can add a binding such as
130
- # `"/v1/{name=users/*}/operations"` to their service configuration.
131
- # For backwards compatibility, the default name includes the operations
132
- # collection id, however overriding users must ensure the name binding
133
- # is the parent resource, without the operations collection id.
134
- #
135
127
  # @overload list_operations(request, options = nil)
136
128
  # Pass arguments to `list_operations` via a request object, either of type
137
129
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -221,7 +213,7 @@ module Google
221
213
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
222
214
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
223
215
  yield response, operation if block_given?
224
- return response
216
+ throw :response, response
225
217
  end
226
218
  rescue ::GRPC::BadStatus => e
227
219
  raise ::Google::Cloud::Error.from_error(e)
@@ -317,7 +309,7 @@ module Google
317
309
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
318
310
  response = ::Gapic::Operation.new response, @operations_client, options: options
319
311
  yield response, operation if block_given?
320
- return response
312
+ throw :response, response
321
313
  end
322
314
  rescue ::GRPC::BadStatus => e
323
315
  raise ::Google::Cloud::Error.from_error(e)
@@ -406,7 +398,6 @@ module Google
406
398
 
407
399
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
408
400
  yield response, operation if block_given?
409
- return response
410
401
  end
411
402
  rescue ::GRPC::BadStatus => e
412
403
  raise ::Google::Cloud::Error.from_error(e)
@@ -421,8 +412,9 @@ module Google
421
412
  # other methods to check whether the cancellation succeeded or whether the
422
413
  # operation completed despite cancellation. On successful cancellation,
423
414
  # the operation is not deleted; instead, it becomes an operation with
424
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
425
- # corresponding to `Code.CANCELLED`.
415
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
416
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
417
+ # `Code.CANCELLED`.
426
418
  #
427
419
  # @overload cancel_operation(request, options = nil)
428
420
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -501,7 +493,6 @@ module Google
501
493
 
502
494
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
503
495
  yield response, operation if block_given?
504
- return response
505
496
  end
506
497
  rescue ::GRPC::BadStatus => e
507
498
  raise ::Google::Cloud::Error.from_error(e)
@@ -599,7 +590,7 @@ module Google
599
590
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
600
591
  response = ::Gapic::Operation.new response, @operations_client, options: options
601
592
  yield response, operation if block_given?
602
- return response
593
+ throw :response, response
603
594
  end
604
595
  rescue ::GRPC::BadStatus => e
605
596
  raise ::Google::Cloud::Error.from_error(e)
@@ -688,6 +679,11 @@ module Google
688
679
  # default endpoint URL. The default value of nil uses the environment
689
680
  # universe (usually the default "googleapis.com" universe).
690
681
  # @return [::String,nil]
682
+ # @!attribute [rw] logger
683
+ # A custom logger to use for request/response debug logging, or the value
684
+ # `:default` (the default) to construct a default logger, or `nil` to
685
+ # explicitly disable logging.
686
+ # @return [::Logger,:default,nil]
691
687
  #
692
688
  class Configuration
693
689
  extend ::Gapic::Config
@@ -712,6 +708,7 @@ module Google
712
708
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
713
709
  config_attr :quota_project, nil, ::String, nil
714
710
  config_attr :universe_domain, nil, ::String, nil
711
+ config_attr :logger, :default, ::Logger, nil, :default
715
712
 
716
713
  # @private
717
714
  def initialize parent_config = nil