google-cloud-assured_workloads-v1beta1 0.18.0 → 0.19.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: ceca96567539dfcb1c4377e4dbe9a6162235eb23ec68b8b9e9656607eb81e123
4
- data.tar.gz: bbcf6bba87a4547745e4daf1ec423308a9b18ef5d9d20156d8ddcf7a617a0f48
3
+ metadata.gz: 1c6557da7ebb6c73971fc61b051889829df1555ed40b218373cdf9d4cd3a3fe3
4
+ data.tar.gz: 157743a4361d55d7697d895a034fc9b08a52487080b4384dfcfc3749268945a5
5
5
  SHA512:
6
- metadata.gz: 2b25100267de409dd51e76298997b7609fd40e186a1cb84df5d3d89b32a7bae61631be662f6976567b897cfd396abd6ca529f9439aab6b700d74cdfa960cc1f1
7
- data.tar.gz: 8222ba396382f8a6be29e57d6f17453a867e0ce229b8db3d0af3eda3fbd883fff4ab71a5eb6ee827a8d4ce657acbb64e98c65c56a091c7bbf8ecc88e5db14ae6
6
+ metadata.gz: a8782cdab5a45f83e483be5ed86e72915795e5abefaa553d2222f3ff5244071a69b00135da8113a194fef02f4335b220c69b5dc180dc16964b96ee2558f59227
7
+ data.tar.gz: 004ccf77acff868cc94d6eea1c6448b9d746b153b0902ca603c04c308174b4bdce73c6ed39495e52169a25138ddeeea13ded5a8b1688a2afe5ce4727b4d1ac9f
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/assured-workloads/)
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/assured_workloads/v1beta1"
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::AssuredWorkloads::V1beta1::AssuredWorkloadsService::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).
@@ -30,6 +30,9 @@ module Google
30
30
  # Service to manage AssuredWorkloads.
31
31
  #
32
32
  class Client
33
+ # @private
34
+ API_VERSION = ""
35
+
33
36
  # @private
34
37
  DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$"
35
38
 
@@ -185,8 +188,19 @@ module Google
185
188
  universe_domain: @config.universe_domain,
186
189
  channel_args: @config.channel_args,
187
190
  interceptors: @config.interceptors,
188
- channel_pool_config: @config.channel_pool
191
+ channel_pool_config: @config.channel_pool,
192
+ logger: @config.logger
189
193
  )
194
+
195
+ @assured_workloads_service_stub.stub_logger&.info do |entry|
196
+ entry.set_system_name
197
+ entry.set_service
198
+ entry.message = "Created client for #{entry.service}"
199
+ entry.set_credentials_fields credentials
200
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
201
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
202
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
203
+ end
190
204
  end
191
205
 
192
206
  ##
@@ -196,6 +210,15 @@ module Google
196
210
  #
197
211
  attr_reader :operations_client
198
212
 
213
+ ##
214
+ # The logger used for request/response debug logging.
215
+ #
216
+ # @return [Logger]
217
+ #
218
+ def logger
219
+ @assured_workloads_service_stub.logger
220
+ end
221
+
199
222
  # Service calls
200
223
 
201
224
  ##
@@ -268,10 +291,11 @@ module Google
268
291
  # Customize the options with defaults
269
292
  metadata = @config.rpcs.create_workload.metadata.to_h
270
293
 
271
- # Set x-goog-api-client and x-goog-user-project headers
294
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
272
295
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
273
296
  lib_name: @config.lib_name, lib_version: @config.lib_version,
274
297
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
298
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
275
299
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
276
300
 
277
301
  header_params = {}
@@ -293,7 +317,7 @@ module Google
293
317
  @assured_workloads_service_stub.call_rpc :create_workload, request, options: options do |response, operation|
294
318
  response = ::Gapic::Operation.new response, @operations_client, options: options
295
319
  yield response, operation if block_given?
296
- return response
320
+ throw :response, response
297
321
  end
298
322
  rescue ::GRPC::BadStatus => e
299
323
  raise ::Google::Cloud::Error.from_error(e)
@@ -362,10 +386,11 @@ module Google
362
386
  # Customize the options with defaults
363
387
  metadata = @config.rpcs.update_workload.metadata.to_h
364
388
 
365
- # Set x-goog-api-client and x-goog-user-project headers
389
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
366
390
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
367
391
  lib_name: @config.lib_name, lib_version: @config.lib_version,
368
392
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
393
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
369
394
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
370
395
 
371
396
  options.apply_defaults timeout: @config.rpcs.update_workload.timeout,
@@ -378,7 +403,6 @@ module Google
378
403
 
379
404
  @assured_workloads_service_stub.call_rpc :update_workload, request, options: options do |response, operation|
380
405
  yield response, operation if block_given?
381
- return response
382
406
  end
383
407
  rescue ::GRPC::BadStatus => e
384
408
  raise ::Google::Cloud::Error.from_error(e)
@@ -450,10 +474,11 @@ module Google
450
474
  # Customize the options with defaults
451
475
  metadata = @config.rpcs.restrict_allowed_resources.metadata.to_h
452
476
 
453
- # Set x-goog-api-client and x-goog-user-project headers
477
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
454
478
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
455
479
  lib_name: @config.lib_name, lib_version: @config.lib_version,
456
480
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
481
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
457
482
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
458
483
 
459
484
  header_params = {}
@@ -474,7 +499,6 @@ module Google
474
499
 
475
500
  @assured_workloads_service_stub.call_rpc :restrict_allowed_resources, request, options: options do |response, operation|
476
501
  yield response, operation if block_given?
477
- return response
478
502
  end
479
503
  rescue ::GRPC::BadStatus => e
480
504
  raise ::Google::Cloud::Error.from_error(e)
@@ -545,10 +569,11 @@ module Google
545
569
  # Customize the options with defaults
546
570
  metadata = @config.rpcs.delete_workload.metadata.to_h
547
571
 
548
- # Set x-goog-api-client and x-goog-user-project headers
572
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
549
573
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
550
574
  lib_name: @config.lib_name, lib_version: @config.lib_version,
551
575
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
576
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
552
577
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
553
578
 
554
579
  header_params = {}
@@ -569,7 +594,6 @@ module Google
569
594
 
570
595
  @assured_workloads_service_stub.call_rpc :delete_workload, request, options: options do |response, operation|
571
596
  yield response, operation if block_given?
572
- return response
573
597
  end
574
598
  rescue ::GRPC::BadStatus => e
575
599
  raise ::Google::Cloud::Error.from_error(e)
@@ -634,10 +658,11 @@ module Google
634
658
  # Customize the options with defaults
635
659
  metadata = @config.rpcs.get_workload.metadata.to_h
636
660
 
637
- # Set x-goog-api-client and x-goog-user-project headers
661
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
638
662
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
639
663
  lib_name: @config.lib_name, lib_version: @config.lib_version,
640
664
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
665
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
641
666
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
642
667
 
643
668
  options.apply_defaults timeout: @config.rpcs.get_workload.timeout,
@@ -650,7 +675,6 @@ module Google
650
675
 
651
676
  @assured_workloads_service_stub.call_rpc :get_workload, request, options: options do |response, operation|
652
677
  yield response, operation if block_given?
653
- return response
654
678
  end
655
679
  rescue ::GRPC::BadStatus => e
656
680
  raise ::Google::Cloud::Error.from_error(e)
@@ -730,10 +754,11 @@ module Google
730
754
  # Customize the options with defaults
731
755
  metadata = @config.rpcs.analyze_workload_move.metadata.to_h
732
756
 
733
- # Set x-goog-api-client and x-goog-user-project headers
757
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
734
758
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
735
759
  lib_name: @config.lib_name, lib_version: @config.lib_version,
736
760
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
761
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
737
762
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
738
763
 
739
764
  options.apply_defaults timeout: @config.rpcs.analyze_workload_move.timeout,
@@ -746,7 +771,6 @@ module Google
746
771
 
747
772
  @assured_workloads_service_stub.call_rpc :analyze_workload_move, request, options: options do |response, operation|
748
773
  yield response, operation if block_given?
749
- return response
750
774
  end
751
775
  rescue ::GRPC::BadStatus => e
752
776
  raise ::Google::Cloud::Error.from_error(e)
@@ -821,10 +845,11 @@ module Google
821
845
  # Customize the options with defaults
822
846
  metadata = @config.rpcs.list_workloads.metadata.to_h
823
847
 
824
- # Set x-goog-api-client and x-goog-user-project headers
848
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
825
849
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
826
850
  lib_name: @config.lib_name, lib_version: @config.lib_version,
827
851
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
852
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
828
853
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
829
854
 
830
855
  options.apply_defaults timeout: @config.rpcs.list_workloads.timeout,
@@ -838,7 +863,7 @@ module Google
838
863
  @assured_workloads_service_stub.call_rpc :list_workloads, request, options: options do |response, operation|
839
864
  response = ::Gapic::PagedEnumerable.new @assured_workloads_service_stub, :list_workloads, request, response, operation, options
840
865
  yield response, operation if block_given?
841
- return response
866
+ throw :response, response
842
867
  end
843
868
  rescue ::GRPC::BadStatus => e
844
869
  raise ::Google::Cloud::Error.from_error(e)
@@ -927,6 +952,11 @@ module Google
927
952
  # default endpoint URL. The default value of nil uses the environment
928
953
  # universe (usually the default "googleapis.com" universe).
929
954
  # @return [::String,nil]
955
+ # @!attribute [rw] logger
956
+ # A custom logger to use for request/response debug logging, or the value
957
+ # `:default` (the default) to construct a default logger, or `nil` to
958
+ # explicitly disable logging.
959
+ # @return [::Logger,:default,nil]
930
960
  #
931
961
  class Configuration
932
962
  extend ::Gapic::Config
@@ -951,6 +981,7 @@ module Google
951
981
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
952
982
  config_attr :quota_project, nil, ::String, nil
953
983
  config_attr :universe_domain, nil, ::String, nil
984
+ config_attr :logger, :default, ::Logger, nil, :default
954
985
 
955
986
  # @private
956
987
  def initialize parent_config = nil
@@ -26,6 +26,9 @@ module Google
26
26
  module AssuredWorkloadsService
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ API_VERSION = ""
31
+
29
32
  # @private
30
33
  DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$"
31
34
 
@@ -121,14 +124,6 @@ module Google
121
124
  # Lists operations that match the specified filter in the request. If the
122
125
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
123
126
  #
124
- # NOTE: the `name` binding allows API services to override the binding
125
- # to use different resource name schemes, such as `users/*/operations`. To
126
- # override the binding, API services can add a binding such as
127
- # `"/v1/{name=users/*}/operations"` to their service configuration.
128
- # For backwards compatibility, the default name includes the operations
129
- # collection id, however overriding users must ensure the name binding
130
- # is the parent resource, without the operations collection id.
131
- #
132
127
  # @overload list_operations(request, options = nil)
133
128
  # Pass arguments to `list_operations` via a request object, either of type
134
129
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -191,10 +186,11 @@ module Google
191
186
  # Customize the options with defaults
192
187
  metadata = @config.rpcs.list_operations.metadata.to_h
193
188
 
194
- # Set x-goog-api-client and x-goog-user-project headers
189
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
195
190
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
196
191
  lib_name: @config.lib_name, lib_version: @config.lib_version,
197
192
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
193
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
198
194
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
199
195
 
200
196
  header_params = {}
@@ -217,7 +213,7 @@ module Google
217
213
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
218
214
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
219
215
  yield response, operation if block_given?
220
- return response
216
+ throw :response, response
221
217
  end
222
218
  rescue ::GRPC::BadStatus => e
223
219
  raise ::Google::Cloud::Error.from_error(e)
@@ -287,10 +283,11 @@ module Google
287
283
  # Customize the options with defaults
288
284
  metadata = @config.rpcs.get_operation.metadata.to_h
289
285
 
290
- # Set x-goog-api-client and x-goog-user-project headers
286
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
291
287
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
292
288
  lib_name: @config.lib_name, lib_version: @config.lib_version,
293
289
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
290
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
294
291
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
295
292
 
296
293
  header_params = {}
@@ -312,7 +309,7 @@ module Google
312
309
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
313
310
  response = ::Gapic::Operation.new response, @operations_client, options: options
314
311
  yield response, operation if block_given?
315
- return response
312
+ throw :response, response
316
313
  end
317
314
  rescue ::GRPC::BadStatus => e
318
315
  raise ::Google::Cloud::Error.from_error(e)
@@ -376,10 +373,11 @@ module Google
376
373
  # Customize the options with defaults
377
374
  metadata = @config.rpcs.delete_operation.metadata.to_h
378
375
 
379
- # Set x-goog-api-client and x-goog-user-project headers
376
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
380
377
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
381
378
  lib_name: @config.lib_name, lib_version: @config.lib_version,
382
379
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
380
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
383
381
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
384
382
 
385
383
  header_params = {}
@@ -400,7 +398,6 @@ module Google
400
398
 
401
399
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
402
400
  yield response, operation if block_given?
403
- return response
404
401
  end
405
402
  rescue ::GRPC::BadStatus => e
406
403
  raise ::Google::Cloud::Error.from_error(e)
@@ -415,8 +412,9 @@ module Google
415
412
  # other methods to check whether the cancellation succeeded or whether the
416
413
  # operation completed despite cancellation. On successful cancellation,
417
414
  # the operation is not deleted; instead, it becomes an operation with
418
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
419
- # 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`.
420
418
  #
421
419
  # @overload cancel_operation(request, options = nil)
422
420
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -470,10 +468,11 @@ module Google
470
468
  # Customize the options with defaults
471
469
  metadata = @config.rpcs.cancel_operation.metadata.to_h
472
470
 
473
- # Set x-goog-api-client and x-goog-user-project headers
471
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
474
472
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
475
473
  lib_name: @config.lib_name, lib_version: @config.lib_version,
476
474
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
475
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
477
476
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
478
477
 
479
478
  header_params = {}
@@ -494,7 +493,6 @@ module Google
494
493
 
495
494
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
496
495
  yield response, operation if block_given?
497
- return response
498
496
  end
499
497
  rescue ::GRPC::BadStatus => e
500
498
  raise ::Google::Cloud::Error.from_error(e)
@@ -574,10 +572,11 @@ module Google
574
572
  # Customize the options with defaults
575
573
  metadata = @config.rpcs.wait_operation.metadata.to_h
576
574
 
577
- # Set x-goog-api-client and x-goog-user-project headers
575
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
578
576
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
579
577
  lib_name: @config.lib_name, lib_version: @config.lib_version,
580
578
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
579
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
581
580
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
582
581
 
583
582
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
@@ -591,7 +590,7 @@ module Google
591
590
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
592
591
  response = ::Gapic::Operation.new response, @operations_client, options: options
593
592
  yield response, operation if block_given?
594
- return response
593
+ throw :response, response
595
594
  end
596
595
  rescue ::GRPC::BadStatus => e
597
596
  raise ::Google::Cloud::Error.from_error(e)
@@ -680,6 +679,11 @@ module Google
680
679
  # default endpoint URL. The default value of nil uses the environment
681
680
  # universe (usually the default "googleapis.com" universe).
682
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]
683
687
  #
684
688
  class Configuration
685
689
  extend ::Gapic::Config
@@ -704,6 +708,7 @@ module Google
704
708
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
705
709
  config_attr :quota_project, nil, ::String, nil
706
710
  config_attr :universe_domain, nil, ::String, nil
711
+ config_attr :logger, :default, ::Logger, nil, :default
707
712
 
708
713
  # @private
709
714
  def initialize parent_config = nil
@@ -32,6 +32,9 @@ module Google
32
32
  # Service to manage AssuredWorkloads.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
35
38
  # @private
36
39
  DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$"
37
40
 
@@ -161,8 +164,19 @@ module Google
161
164
  endpoint: @config.endpoint,
162
165
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
166
  universe_domain: @config.universe_domain,
164
- credentials: credentials
167
+ credentials: credentials,
168
+ logger: @config.logger
165
169
  )
170
+
171
+ @assured_workloads_service_stub.logger(stub: true)&.info do |entry|
172
+ entry.set_system_name
173
+ entry.set_service
174
+ entry.message = "Created client for #{entry.service}"
175
+ entry.set_credentials_fields credentials
176
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
177
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
178
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
179
+ end
166
180
  end
167
181
 
168
182
  ##
@@ -172,6 +186,15 @@ module Google
172
186
  #
173
187
  attr_reader :operations_client
174
188
 
189
+ ##
190
+ # The logger used for request/response debug logging.
191
+ #
192
+ # @return [Logger]
193
+ #
194
+ def logger
195
+ @assured_workloads_service_stub.logger
196
+ end
197
+
175
198
  # Service calls
176
199
 
177
200
  ##
@@ -243,12 +266,13 @@ module Google
243
266
  # Customize the options with defaults
244
267
  call_metadata = @config.rpcs.create_workload.metadata.to_h
245
268
 
246
- # Set x-goog-api-client and x-goog-user-project headers
269
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
247
270
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
248
271
  lib_name: @config.lib_name, lib_version: @config.lib_version,
249
272
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION,
250
273
  transports_version_send: [:rest]
251
274
 
275
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
252
276
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
253
277
 
254
278
  options.apply_defaults timeout: @config.rpcs.create_workload.timeout,
@@ -262,7 +286,7 @@ module Google
262
286
  @assured_workloads_service_stub.create_workload request, options do |result, operation|
263
287
  result = ::Gapic::Operation.new result, @operations_client, options: options
264
288
  yield result, operation if block_given?
265
- return result
289
+ throw :response, result
266
290
  end
267
291
  rescue ::Gapic::Rest::Error => e
268
292
  raise ::Google::Cloud::Error.from_error(e)
@@ -333,12 +357,13 @@ module Google
333
357
  # Customize the options with defaults
334
358
  call_metadata = @config.rpcs.restrict_allowed_resources.metadata.to_h
335
359
 
336
- # Set x-goog-api-client and x-goog-user-project headers
360
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
337
361
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
338
362
  lib_name: @config.lib_name, lib_version: @config.lib_version,
339
363
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION,
340
364
  transports_version_send: [:rest]
341
365
 
366
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
342
367
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
343
368
 
344
369
  options.apply_defaults timeout: @config.rpcs.restrict_allowed_resources.timeout,
@@ -351,7 +376,6 @@ module Google
351
376
 
352
377
  @assured_workloads_service_stub.restrict_allowed_resources request, options do |result, operation|
353
378
  yield result, operation if block_given?
354
- return result
355
379
  end
356
380
  rescue ::Gapic::Rest::Error => e
357
381
  raise ::Google::Cloud::Error.from_error(e)
@@ -421,12 +445,13 @@ module Google
421
445
  # Customize the options with defaults
422
446
  call_metadata = @config.rpcs.delete_workload.metadata.to_h
423
447
 
424
- # Set x-goog-api-client and x-goog-user-project headers
448
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
425
449
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
426
450
  lib_name: @config.lib_name, lib_version: @config.lib_version,
427
451
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION,
428
452
  transports_version_send: [:rest]
429
453
 
454
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
430
455
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
431
456
 
432
457
  options.apply_defaults timeout: @config.rpcs.delete_workload.timeout,
@@ -439,7 +464,6 @@ module Google
439
464
 
440
465
  @assured_workloads_service_stub.delete_workload request, options do |result, operation|
441
466
  yield result, operation if block_given?
442
- return result
443
467
  end
444
468
  rescue ::Gapic::Rest::Error => e
445
469
  raise ::Google::Cloud::Error.from_error(e)
@@ -519,6 +543,11 @@ module Google
519
543
  # default endpoint URL. The default value of nil uses the environment
520
544
  # universe (usually the default "googleapis.com" universe).
521
545
  # @return [::String,nil]
546
+ # @!attribute [rw] logger
547
+ # A custom logger to use for request/response debug logging, or the value
548
+ # `:default` (the default) to construct a default logger, or `nil` to
549
+ # explicitly disable logging.
550
+ # @return [::Logger,:default,nil]
522
551
  #
523
552
  class Configuration
524
553
  extend ::Gapic::Config
@@ -540,6 +569,7 @@ module Google
540
569
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
541
570
  config_attr :quota_project, nil, ::String, nil
542
571
  config_attr :universe_domain, nil, ::String, nil
572
+ config_attr :logger, :default, ::Logger, nil, :default
543
573
 
544
574
  # @private
545
575
  def initialize parent_config = nil
@@ -26,6 +26,9 @@ module Google
26
26
  module Rest
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ API_VERSION = ""
31
+
29
32
  # @private
30
33
  DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$"
31
34
 
@@ -112,14 +115,6 @@ module Google
112
115
  # Lists operations that match the specified filter in the request. If the
113
116
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
114
117
  #
115
- # NOTE: the `name` binding allows API services to override the binding
116
- # to use different resource name schemes, such as `users/*/operations`. To
117
- # override the binding, API services can add a binding such as
118
- # `"/v1/{name=users/*}/operations"` to their service configuration.
119
- # For backwards compatibility, the default name includes the operations
120
- # collection id, however overriding users must ensure the name binding
121
- # is the parent resource, without the operations collection id.
122
- #
123
118
  # @overload list_operations(request, options = nil)
124
119
  # Pass arguments to `list_operations` via a request object, either of type
125
120
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -181,12 +176,13 @@ module Google
181
176
  # Customize the options with defaults
182
177
  call_metadata = @config.rpcs.list_operations.metadata.to_h
183
178
 
184
- # Set x-goog-api-client and x-goog-user-project headers
179
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
185
180
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
186
181
  lib_name: @config.lib_name, lib_version: @config.lib_version,
187
182
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION,
188
183
  transports_version_send: [:rest]
189
184
 
185
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
190
186
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
191
187
 
192
188
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
@@ -200,7 +196,7 @@ module Google
200
196
  @operations_stub.list_operations request, options do |result, operation|
201
197
  result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
202
198
  yield result, operation if block_given?
203
- return result
199
+ throw :response, result
204
200
  end
205
201
  rescue ::Gapic::Rest::Error => e
206
202
  raise ::Google::Cloud::Error.from_error(e)
@@ -269,12 +265,13 @@ module Google
269
265
  # Customize the options with defaults
270
266
  call_metadata = @config.rpcs.get_operation.metadata.to_h
271
267
 
272
- # Set x-goog-api-client and x-goog-user-project headers
268
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
273
269
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
274
270
  lib_name: @config.lib_name, lib_version: @config.lib_version,
275
271
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION,
276
272
  transports_version_send: [:rest]
277
273
 
274
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
278
275
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
279
276
 
280
277
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
@@ -288,7 +285,7 @@ module Google
288
285
  @operations_stub.get_operation request, options do |result, operation|
289
286
  result = ::Gapic::Operation.new result, @operations_client, options: options
290
287
  yield result, operation if block_given?
291
- return result
288
+ throw :response, result
292
289
  end
293
290
  rescue ::Gapic::Rest::Error => e
294
291
  raise ::Google::Cloud::Error.from_error(e)
@@ -351,12 +348,13 @@ module Google
351
348
  # Customize the options with defaults
352
349
  call_metadata = @config.rpcs.delete_operation.metadata.to_h
353
350
 
354
- # Set x-goog-api-client and x-goog-user-project headers
351
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
355
352
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
356
353
  lib_name: @config.lib_name, lib_version: @config.lib_version,
357
354
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION,
358
355
  transports_version_send: [:rest]
359
356
 
357
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
360
358
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
361
359
 
362
360
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
@@ -369,7 +367,6 @@ module Google
369
367
 
370
368
  @operations_stub.delete_operation request, options do |result, operation|
371
369
  yield result, operation if block_given?
372
- return result
373
370
  end
374
371
  rescue ::Gapic::Rest::Error => e
375
372
  raise ::Google::Cloud::Error.from_error(e)
@@ -384,8 +381,9 @@ module Google
384
381
  # other methods to check whether the cancellation succeeded or whether the
385
382
  # operation completed despite cancellation. On successful cancellation,
386
383
  # the operation is not deleted; instead, it becomes an operation with
387
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
388
- # corresponding to `Code.CANCELLED`.
384
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
385
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
386
+ # `Code.CANCELLED`.
389
387
  #
390
388
  # @overload cancel_operation(request, options = nil)
391
389
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -438,12 +436,13 @@ module Google
438
436
  # Customize the options with defaults
439
437
  call_metadata = @config.rpcs.cancel_operation.metadata.to_h
440
438
 
441
- # Set x-goog-api-client and x-goog-user-project headers
439
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
442
440
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
443
441
  lib_name: @config.lib_name, lib_version: @config.lib_version,
444
442
  gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION,
445
443
  transports_version_send: [:rest]
446
444
 
445
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
447
446
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
448
447
 
449
448
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
@@ -456,7 +455,6 @@ module Google
456
455
 
457
456
  @operations_stub.cancel_operation request, options do |result, operation|
458
457
  yield result, operation if block_given?
459
- return result
460
458
  end
461
459
  rescue ::Gapic::Rest::Error => e
462
460
  raise ::Google::Cloud::Error.from_error(e)
@@ -536,6 +534,11 @@ module Google
536
534
  # default endpoint URL. The default value of nil uses the environment
537
535
  # universe (usually the default "googleapis.com" universe).
538
536
  # @return [::String,nil]
537
+ # @!attribute [rw] logger
538
+ # A custom logger to use for request/response debug logging, or the value
539
+ # `:default` (the default) to construct a default logger, or `nil` to
540
+ # explicitly disable logging.
541
+ # @return [::Logger,:default,nil]
539
542
  #
540
543
  class Configuration
541
544
  extend ::Gapic::Config
@@ -557,6 +560,7 @@ module Google
557
560
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
558
561
  config_attr :quota_project, nil, ::String, nil
559
562
  config_attr :universe_domain, nil, ::String, nil
563
+ config_attr :logger, :default, ::Logger, nil, :default
560
564
 
561
565
  # @private
562
566
  def initialize parent_config = nil
@@ -676,16 +680,18 @@ module Google
676
680
 
677
681
  response = @client_stub.make_http_request(
678
682
  verb,
679
- uri: uri,
680
- body: body || "",
681
- params: query_string_params,
683
+ uri: uri,
684
+ body: body || "",
685
+ params: query_string_params,
686
+ method_name: "list_operations",
682
687
  options: options
683
688
  )
684
689
  operation = ::Gapic::Rest::TransportOperation.new response
685
690
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
686
-
687
- yield result, operation if block_given?
688
- result
691
+ catch :response do
692
+ yield result, operation if block_given?
693
+ result
694
+ end
689
695
  end
690
696
 
691
697
  ##
@@ -714,16 +720,18 @@ module Google
714
720
 
715
721
  response = @client_stub.make_http_request(
716
722
  verb,
717
- uri: uri,
718
- body: body || "",
719
- params: query_string_params,
723
+ uri: uri,
724
+ body: body || "",
725
+ params: query_string_params,
726
+ method_name: "get_operation",
720
727
  options: options
721
728
  )
722
729
  operation = ::Gapic::Rest::TransportOperation.new response
723
730
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
724
-
725
- yield result, operation if block_given?
726
- result
731
+ catch :response do
732
+ yield result, operation if block_given?
733
+ result
734
+ end
727
735
  end
728
736
 
729
737
  ##
@@ -752,16 +760,18 @@ module Google
752
760
 
753
761
  response = @client_stub.make_http_request(
754
762
  verb,
755
- uri: uri,
756
- body: body || "",
757
- params: query_string_params,
763
+ uri: uri,
764
+ body: body || "",
765
+ params: query_string_params,
766
+ method_name: "delete_operation",
758
767
  options: options
759
768
  )
760
769
  operation = ::Gapic::Rest::TransportOperation.new response
761
770
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
762
-
763
- yield result, operation if block_given?
764
- result
771
+ catch :response do
772
+ yield result, operation if block_given?
773
+ result
774
+ end
765
775
  end
766
776
 
767
777
  ##
@@ -790,16 +800,18 @@ module Google
790
800
 
791
801
  response = @client_stub.make_http_request(
792
802
  verb,
793
- uri: uri,
794
- body: body || "",
795
- params: query_string_params,
803
+ uri: uri,
804
+ body: body || "",
805
+ params: query_string_params,
806
+ method_name: "cancel_operation",
796
807
  options: options
797
808
  )
798
809
  operation = ::Gapic::Rest::TransportOperation.new response
799
810
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
800
-
801
- yield result, operation if block_given?
802
- result
811
+ catch :response do
812
+ yield result, operation if block_given?
813
+ result
814
+ end
803
815
  end
804
816
 
805
817
  ##
@@ -30,7 +30,8 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
34
35
  # These require statements are intentionally placed here to initialize
35
36
  # the REST modules only when it's required.
36
37
  require "gapic/rest"
@@ -40,7 +41,9 @@ module Google
40
41
  universe_domain: universe_domain,
41
42
  credentials: credentials,
42
43
  numeric_enums: true,
43
- raise_faraday_errors: false
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
44
47
  end
45
48
 
46
49
  ##
@@ -61,6 +64,15 @@ module Google
61
64
  @client_stub.endpoint
62
65
  end
63
66
 
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
64
76
  ##
65
77
  # Baseline implementation for the create_workload REST call
66
78
  #
@@ -87,16 +99,18 @@ module Google
87
99
 
88
100
  response = @client_stub.make_http_request(
89
101
  verb,
90
- uri: uri,
91
- body: body || "",
92
- params: query_string_params,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "create_workload",
93
106
  options: options
94
107
  )
95
108
  operation = ::Gapic::Rest::TransportOperation.new response
96
109
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
97
-
98
- yield result, operation if block_given?
99
- result
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
100
114
  end
101
115
 
102
116
  ##
@@ -125,16 +139,18 @@ module Google
125
139
 
126
140
  response = @client_stub.make_http_request(
127
141
  verb,
128
- uri: uri,
129
- body: body || "",
130
- params: query_string_params,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "restrict_allowed_resources",
131
146
  options: options
132
147
  )
133
148
  operation = ::Gapic::Rest::TransportOperation.new response
134
149
  result = ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse.decode_json response.body, ignore_unknown_fields: true
135
-
136
- yield result, operation if block_given?
137
- result
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
138
154
  end
139
155
 
140
156
  ##
@@ -163,16 +179,18 @@ module Google
163
179
 
164
180
  response = @client_stub.make_http_request(
165
181
  verb,
166
- uri: uri,
167
- body: body || "",
168
- params: query_string_params,
182
+ uri: uri,
183
+ body: body || "",
184
+ params: query_string_params,
185
+ method_name: "delete_workload",
169
186
  options: options
170
187
  )
171
188
  operation = ::Gapic::Rest::TransportOperation.new response
172
189
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
173
-
174
- yield result, operation if block_given?
175
- result
190
+ catch :response do
191
+ yield result, operation if block_given?
192
+ result
193
+ end
176
194
  end
177
195
 
178
196
  ##
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module AssuredWorkloads
23
23
  module V1beta1
24
- VERSION = "0.18.0"
24
+ VERSION = "0.19.0"
25
25
  end
26
26
  end
27
27
  end
@@ -28,6 +28,9 @@ module Google
28
28
  # @!attribute [rw] destinations
29
29
  # @return [::Array<::Google::Api::ClientLibraryDestination>]
30
30
  # The destination where API teams want this client library to be published.
31
+ # @!attribute [rw] selective_gapic_generation
32
+ # @return [::Google::Api::SelectiveGapicGeneration]
33
+ # Configuration for which RPCs should be generated in the GAPIC client.
31
34
  class CommonLanguageSettings
32
35
  include ::Google::Protobuf::MessageExts
33
36
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -118,6 +121,10 @@ module Google
118
121
  # @return [::String]
119
122
  # Optional link to proto reference documentation. Example:
120
123
  # https://cloud.google.com/pubsub/lite/docs/reference/rpc
124
+ # @!attribute [rw] rest_reference_documentation_uri
125
+ # @return [::String]
126
+ # Optional link to REST reference documentation. Example:
127
+ # https://cloud.google.com/pubsub/lite/docs/reference/rest
121
128
  class Publishing
122
129
  include ::Google::Protobuf::MessageExts
123
130
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -192,9 +199,32 @@ module Google
192
199
  # @!attribute [rw] common
193
200
  # @return [::Google::Api::CommonLanguageSettings]
194
201
  # Some settings.
202
+ # @!attribute [rw] experimental_features
203
+ # @return [::Google::Api::PythonSettings::ExperimentalFeatures]
204
+ # Experimental features to be included during client library generation.
195
205
  class PythonSettings
196
206
  include ::Google::Protobuf::MessageExts
197
207
  extend ::Google::Protobuf::MessageExts::ClassMethods
208
+
209
+ # Experimental features to be included during client library generation.
210
+ # These fields will be deprecated once the feature graduates and is enabled
211
+ # by default.
212
+ # @!attribute [rw] rest_async_io_enabled
213
+ # @return [::Boolean]
214
+ # Enables generation of asynchronous REST clients if `rest` transport is
215
+ # enabled. By default, asynchronous REST clients will not be generated.
216
+ # This feature will be enabled by default 1 month after launching the
217
+ # feature in preview packages.
218
+ # @!attribute [rw] protobuf_pythonic_types_enabled
219
+ # @return [::Boolean]
220
+ # Enables generation of protobuf code using new types that are more
221
+ # Pythonic which are included in `protobuf>=5.29.x`. This feature will be
222
+ # enabled by default 1 month after launching the feature in preview
223
+ # packages.
224
+ class ExperimentalFeatures
225
+ include ::Google::Protobuf::MessageExts
226
+ extend ::Google::Protobuf::MessageExts::ClassMethods
227
+ end
198
228
  end
199
229
 
200
230
  # Settings for Node client libraries.
@@ -276,9 +306,28 @@ module Google
276
306
  # @!attribute [rw] common
277
307
  # @return [::Google::Api::CommonLanguageSettings]
278
308
  # Some settings.
309
+ # @!attribute [rw] renamed_services
310
+ # @return [::Google::Protobuf::Map{::String => ::String}]
311
+ # Map of service names to renamed services. Keys are the package relative
312
+ # service names and values are the name to be used for the service client
313
+ # and call options.
314
+ #
315
+ # publishing:
316
+ # go_settings:
317
+ # renamed_services:
318
+ # Publisher: TopicAdmin
279
319
  class GoSettings
280
320
  include ::Google::Protobuf::MessageExts
281
321
  extend ::Google::Protobuf::MessageExts::ClassMethods
322
+
323
+ # @!attribute [rw] key
324
+ # @return [::String]
325
+ # @!attribute [rw] value
326
+ # @return [::String]
327
+ class RenamedServicesEntry
328
+ include ::Google::Protobuf::MessageExts
329
+ extend ::Google::Protobuf::MessageExts::ClassMethods
330
+ end
282
331
  end
283
332
 
284
333
  # Describes the generator configuration for a method.
@@ -286,6 +335,13 @@ module Google
286
335
  # @return [::String]
287
336
  # The fully qualified name of the method, for which the options below apply.
288
337
  # This is used to find the method to apply the options.
338
+ #
339
+ # Example:
340
+ #
341
+ # publishing:
342
+ # method_settings:
343
+ # - selector: google.storage.control.v2.StorageControl.CreateFolder
344
+ # # method settings for CreateFolder...
289
345
  # @!attribute [rw] long_running
290
346
  # @return [::Google::Api::MethodSettings::LongRunning]
291
347
  # Describes settings to use for long-running operations when generating
@@ -294,17 +350,14 @@ module Google
294
350
  #
295
351
  # Example of a YAML configuration::
296
352
  #
297
- # publishing:
298
- # method_settings:
353
+ # publishing:
354
+ # method_settings:
299
355
  # - selector: google.cloud.speech.v2.Speech.BatchRecognize
300
356
  # long_running:
301
- # initial_poll_delay:
302
- # seconds: 60 # 1 minute
357
+ # initial_poll_delay: 60s # 1 minute
303
358
  # poll_delay_multiplier: 1.5
304
- # max_poll_delay:
305
- # seconds: 360 # 6 minutes
306
- # total_poll_timeout:
307
- # seconds: 54000 # 90 minutes
359
+ # max_poll_delay: 360s # 6 minutes
360
+ # total_poll_timeout: 54000s # 90 minutes
308
361
  # @!attribute [rw] auto_populated_fields
309
362
  # @return [::Array<::String>]
310
363
  # List of top-level fields of the request message, that should be
@@ -313,8 +366,8 @@ module Google
313
366
  #
314
367
  # Example of a YAML configuration:
315
368
  #
316
- # publishing:
317
- # method_settings:
369
+ # publishing:
370
+ # method_settings:
318
371
  # - selector: google.example.v1.ExampleService.CreateExample
319
372
  # auto_populated_fields:
320
373
  # - request_id
@@ -350,6 +403,17 @@ module Google
350
403
  end
351
404
  end
352
405
 
406
+ # This message is used to configure the generation of a subset of the RPCs in
407
+ # a service for client libraries.
408
+ # @!attribute [rw] methods
409
+ # @return [::Array<::String>]
410
+ # An allowlist of the fully qualified names of RPCs that should be included
411
+ # on public client surfaces.
412
+ class SelectiveGapicGeneration
413
+ include ::Google::Protobuf::MessageExts
414
+ extend ::Google::Protobuf::MessageExts::ClassMethods
415
+ end
416
+
353
417
  # The organization for which the client libraries are being published.
354
418
  # Affects the url where generated docs are published, etc.
355
419
  module ClientLibraryOrganization
@@ -124,8 +124,13 @@ module Google
124
124
  # @return [::String]
125
125
  # The plural name used in the resource name and permission names, such as
126
126
  # 'projects' for the resource name of 'projects/\\{project}' and the permission
127
- # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
128
- # concept of the `plural` field in k8s CRD spec
127
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
128
+ # to this is for Nested Collections that have stuttering names, as defined
129
+ # in [AIP-122](https://google.aip.dev/122#nested-collections), where the
130
+ # collection ID in the resource name pattern does not necessarily directly
131
+ # match the `plural` value.
132
+ #
133
+ # It is the same concept of the `plural` field in k8s CRD spec
129
134
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
130
135
  #
131
136
  # Note: The plural form is required even for singleton resources. See
@@ -42,7 +42,7 @@ module Google
42
42
  # The error result of the operation in case of failure or cancellation.
43
43
  # @!attribute [rw] response
44
44
  # @return [::Google::Protobuf::Any]
45
- # The normal response of the operation in case of success. If the original
45
+ # The normal, successful response of the operation. If the original
46
46
  # method returns no data on success, such as `Delete`, the response is
47
47
  # `google.protobuf.Empty`. If the original method is standard
48
48
  # `Get`/`Create`/`Update`, the response should be the resource. For other
@@ -55,7 +55,8 @@ module Google
55
55
  extend ::Google::Protobuf::MessageExts::ClassMethods
56
56
  end
57
57
 
58
- # The request message for Operations.GetOperation.
58
+ # The request message for
59
+ # Operations.GetOperation.
59
60
  # @!attribute [rw] name
60
61
  # @return [::String]
61
62
  # The name of the operation resource.
@@ -64,7 +65,8 @@ module Google
64
65
  extend ::Google::Protobuf::MessageExts::ClassMethods
65
66
  end
66
67
 
67
- # The request message for Operations.ListOperations.
68
+ # The request message for
69
+ # Operations.ListOperations.
68
70
  # @!attribute [rw] name
69
71
  # @return [::String]
70
72
  # The name of the operation's parent resource.
@@ -82,7 +84,8 @@ module Google
82
84
  extend ::Google::Protobuf::MessageExts::ClassMethods
83
85
  end
84
86
 
85
- # The response message for Operations.ListOperations.
87
+ # The response message for
88
+ # Operations.ListOperations.
86
89
  # @!attribute [rw] operations
87
90
  # @return [::Array<::Google::Longrunning::Operation>]
88
91
  # A list of operations that matches the specified filter in the request.
@@ -94,7 +97,8 @@ module Google
94
97
  extend ::Google::Protobuf::MessageExts::ClassMethods
95
98
  end
96
99
 
97
- # The request message for Operations.CancelOperation.
100
+ # The request message for
101
+ # Operations.CancelOperation.
98
102
  # @!attribute [rw] name
99
103
  # @return [::String]
100
104
  # The name of the operation resource to be cancelled.
@@ -103,7 +107,8 @@ module Google
103
107
  extend ::Google::Protobuf::MessageExts::ClassMethods
104
108
  end
105
109
 
106
- # The request message for Operations.DeleteOperation.
110
+ # The request message for
111
+ # Operations.DeleteOperation.
107
112
  # @!attribute [rw] name
108
113
  # @return [::String]
109
114
  # The name of the operation resource to be deleted.
@@ -112,7 +117,8 @@ module Google
112
117
  extend ::Google::Protobuf::MessageExts::ClassMethods
113
118
  end
114
119
 
115
- # The request message for Operations.WaitOperation.
120
+ # The request message for
121
+ # Operations.WaitOperation.
116
122
  # @!attribute [rw] name
117
123
  # @return [::String]
118
124
  # The name of the operation resource to wait on.
@@ -130,13 +136,12 @@ module Google
130
136
  #
131
137
  # Example:
132
138
  #
133
- # rpc LongRunningRecognize(LongRunningRecognizeRequest)
134
- # returns (google.longrunning.Operation) {
135
- # option (google.longrunning.operation_info) = {
136
- # response_type: "LongRunningRecognizeResponse"
137
- # metadata_type: "LongRunningRecognizeMetadata"
138
- # };
139
- # }
139
+ # rpc Export(ExportRequest) returns (google.longrunning.Operation) {
140
+ # option (google.longrunning.operation_info) = {
141
+ # response_type: "ExportResponse"
142
+ # metadata_type: "ExportMetadata"
143
+ # };
144
+ # }
140
145
  # @!attribute [rw] response_type
141
146
  # @return [::String]
142
147
  # Required. The message name of the primary return type for this
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-assured_workloads-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.19.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: 2024-02-26 00:00:00.000000000 Z
11
+ date: 2024-12-10 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.21.1
19
+ version: 0.24.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.21.1
29
+ version: 0.24.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  requirements: []
109
- rubygems_version: 3.5.6
109
+ rubygems_version: 3.5.23
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: API Client library for the Assured Workloads for Government V1beta1 API