google-cloud-commerce-consumer-procurement-v1 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service/client.rb +31 -6
- data/lib/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service/operations.rb +12 -15
- data/lib/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service/rest/client.rb +31 -6
- data/lib/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service/rest/operations.rb +43 -38
- data/lib/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service/rest/service_stub.rb +54 -32
- data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/client.rb +28 -6
- data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/rest/client.rb +28 -6
- data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/rest/service_stub.rb +54 -32
- data/lib/google/cloud/commerce/consumer/procurement/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58ed77380e4ea6b181eb3f519a17dac764cf7b03a965c42bea614f8dbcce7b95
|
4
|
+
data.tar.gz: de5ea3ffe884c736113f78889ae9a748e6efe3a8b198e0b8c743cf9b15719e2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7a8222fc978ddbc4e28f6a2c4ff0210172b381cc12b64496e9201a1054906db24e353731cd9e37a233755cd582f8d9ffad832fc9b153486d8f8f6e03d78d5f4
|
7
|
+
data.tar.gz: 793969b30df25433e2a6955b44ed6bc71e349c5f65f2731b6640f41542979b8829398709cc679fecc556f9cf023e203f1131258770157ad3f757b135e2c72fb8
|
data/README.md
CHANGED
@@ -42,33 +42,43 @@ for class and method documentation.
|
|
42
42
|
See also the [Product Documentation](https://cloud.google.com/marketplace/docs/)
|
43
43
|
for general usage information.
|
44
44
|
|
45
|
-
##
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
45
|
+
## Debug Logging
|
46
|
+
|
47
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
48
|
+
your application's integration with the API. When logging is activated, key
|
49
|
+
events such as requests and responses, along with data payloads and metadata
|
50
|
+
such as headers and client configuration, are logged to the standard error
|
51
|
+
stream.
|
52
|
+
|
53
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
54
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
55
|
+
customers, private keys, or other security data that could be compromising if
|
56
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
57
|
+
the principle of least access. Google also recommends that Client Library Debug
|
58
|
+
Logging be enabled only temporarily during active debugging, and not used
|
59
|
+
permanently in production.
|
60
|
+
|
61
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
62
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
63
|
+
list of client library gem names. This will select the default logging behavior,
|
64
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
65
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
66
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
67
|
+
results in logs appearing alongside your application logs in the
|
68
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
69
|
+
|
70
|
+
You can customize logging by modifying the `logger` configuration when
|
71
|
+
constructing a client object. For example:
|
54
72
|
|
55
73
|
```ruby
|
74
|
+
require "google/cloud/commerce/consumer/procurement/v1"
|
56
75
|
require "logger"
|
57
76
|
|
58
|
-
|
59
|
-
|
60
|
-
def logger
|
61
|
-
LOGGER
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
66
|
-
module GRPC
|
67
|
-
extend MyLogger
|
77
|
+
client = ::Google::Cloud::Commerce::Consumer::Procurement::V1::LicenseManagementService::Client.new do |config|
|
78
|
+
config.logger = Logger.new "my-app.log"
|
68
79
|
end
|
69
80
|
```
|
70
81
|
|
71
|
-
|
72
82
|
## Google Cloud Samples
|
73
83
|
|
74
84
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
data/lib/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service/client.rb
CHANGED
@@ -186,8 +186,19 @@ module Google
|
|
186
186
|
universe_domain: @config.universe_domain,
|
187
187
|
channel_args: @config.channel_args,
|
188
188
|
interceptors: @config.interceptors,
|
189
|
-
channel_pool_config: @config.channel_pool
|
189
|
+
channel_pool_config: @config.channel_pool,
|
190
|
+
logger: @config.logger
|
190
191
|
)
|
192
|
+
|
193
|
+
@consumer_procurement_service_stub.stub_logger&.info do |entry|
|
194
|
+
entry.set_system_name
|
195
|
+
entry.set_service
|
196
|
+
entry.message = "Created client for #{entry.service}"
|
197
|
+
entry.set_credentials_fields credentials
|
198
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
199
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
200
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
201
|
+
end
|
191
202
|
end
|
192
203
|
|
193
204
|
##
|
@@ -197,6 +208,15 @@ module Google
|
|
197
208
|
#
|
198
209
|
attr_reader :operations_client
|
199
210
|
|
211
|
+
##
|
212
|
+
# The logger used for request/response debug logging.
|
213
|
+
#
|
214
|
+
# @return [Logger]
|
215
|
+
#
|
216
|
+
def logger
|
217
|
+
@consumer_procurement_service_stub.logger
|
218
|
+
end
|
219
|
+
|
200
220
|
# Service calls
|
201
221
|
|
202
222
|
##
|
@@ -309,7 +329,7 @@ module Google
|
|
309
329
|
@consumer_procurement_service_stub.call_rpc :place_order, request, options: options do |response, operation|
|
310
330
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
311
331
|
yield response, operation if block_given?
|
312
|
-
|
332
|
+
throw :response, response
|
313
333
|
end
|
314
334
|
rescue ::GRPC::BadStatus => e
|
315
335
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -396,7 +416,6 @@ module Google
|
|
396
416
|
|
397
417
|
@consumer_procurement_service_stub.call_rpc :get_order, request, options: options do |response, operation|
|
398
418
|
yield response, operation if block_given?
|
399
|
-
return response
|
400
419
|
end
|
401
420
|
rescue ::GRPC::BadStatus => e
|
402
421
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -513,7 +532,7 @@ module Google
|
|
513
532
|
@consumer_procurement_service_stub.call_rpc :list_orders, request, options: options do |response, operation|
|
514
533
|
response = ::Gapic::PagedEnumerable.new @consumer_procurement_service_stub, :list_orders, request, response, operation, options
|
515
534
|
yield response, operation if block_given?
|
516
|
-
|
535
|
+
throw :response, response
|
517
536
|
end
|
518
537
|
rescue ::GRPC::BadStatus => e
|
519
538
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -619,7 +638,7 @@ module Google
|
|
619
638
|
@consumer_procurement_service_stub.call_rpc :modify_order, request, options: options do |response, operation|
|
620
639
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
621
640
|
yield response, operation if block_given?
|
622
|
-
|
641
|
+
throw :response, response
|
623
642
|
end
|
624
643
|
rescue ::GRPC::BadStatus => e
|
625
644
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -721,7 +740,7 @@ module Google
|
|
721
740
|
@consumer_procurement_service_stub.call_rpc :cancel_order, request, options: options do |response, operation|
|
722
741
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
723
742
|
yield response, operation if block_given?
|
724
|
-
|
743
|
+
throw :response, response
|
725
744
|
end
|
726
745
|
rescue ::GRPC::BadStatus => e
|
727
746
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -810,6 +829,11 @@ module Google
|
|
810
829
|
# default endpoint URL. The default value of nil uses the environment
|
811
830
|
# universe (usually the default "googleapis.com" universe).
|
812
831
|
# @return [::String,nil]
|
832
|
+
# @!attribute [rw] logger
|
833
|
+
# A custom logger to use for request/response debug logging, or the value
|
834
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
835
|
+
# explicitly disable logging.
|
836
|
+
# @return [::Logger,:default,nil]
|
813
837
|
#
|
814
838
|
class Configuration
|
815
839
|
extend ::Gapic::Config
|
@@ -834,6 +858,7 @@ module Google
|
|
834
858
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
835
859
|
config_attr :quota_project, nil, ::String, nil
|
836
860
|
config_attr :universe_domain, nil, ::String, nil
|
861
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
837
862
|
|
838
863
|
# @private
|
839
864
|
def initialize parent_config = nil
|
data/lib/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service/operations.rb
CHANGED
@@ -126,14 +126,6 @@ module Google
|
|
126
126
|
# Lists operations that match the specified filter in the request. If the
|
127
127
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
128
128
|
#
|
129
|
-
# NOTE: the `name` binding allows API services to override the binding
|
130
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
131
|
-
# override the binding, API services can add a binding such as
|
132
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
133
|
-
# For backwards compatibility, the default name includes the operations
|
134
|
-
# collection id, however overriding users must ensure the name binding
|
135
|
-
# is the parent resource, without the operations collection id.
|
136
|
-
#
|
137
129
|
# @overload list_operations(request, options = nil)
|
138
130
|
# Pass arguments to `list_operations` via a request object, either of type
|
139
131
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -223,7 +215,7 @@ module Google
|
|
223
215
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
224
216
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
225
217
|
yield response, operation if block_given?
|
226
|
-
|
218
|
+
throw :response, response
|
227
219
|
end
|
228
220
|
rescue ::GRPC::BadStatus => e
|
229
221
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -319,7 +311,7 @@ module Google
|
|
319
311
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
320
312
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
321
313
|
yield response, operation if block_given?
|
322
|
-
|
314
|
+
throw :response, response
|
323
315
|
end
|
324
316
|
rescue ::GRPC::BadStatus => e
|
325
317
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -408,7 +400,6 @@ module Google
|
|
408
400
|
|
409
401
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
410
402
|
yield response, operation if block_given?
|
411
|
-
return response
|
412
403
|
end
|
413
404
|
rescue ::GRPC::BadStatus => e
|
414
405
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -423,8 +414,9 @@ module Google
|
|
423
414
|
# other methods to check whether the cancellation succeeded or whether the
|
424
415
|
# operation completed despite cancellation. On successful cancellation,
|
425
416
|
# the operation is not deleted; instead, it becomes an operation with
|
426
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
427
|
-
# corresponding to
|
417
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
418
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
419
|
+
# `Code.CANCELLED`.
|
428
420
|
#
|
429
421
|
# @overload cancel_operation(request, options = nil)
|
430
422
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -503,7 +495,6 @@ module Google
|
|
503
495
|
|
504
496
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
505
497
|
yield response, operation if block_given?
|
506
|
-
return response
|
507
498
|
end
|
508
499
|
rescue ::GRPC::BadStatus => e
|
509
500
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -601,7 +592,7 @@ module Google
|
|
601
592
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
602
593
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
603
594
|
yield response, operation if block_given?
|
604
|
-
|
595
|
+
throw :response, response
|
605
596
|
end
|
606
597
|
rescue ::GRPC::BadStatus => e
|
607
598
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -690,6 +681,11 @@ module Google
|
|
690
681
|
# default endpoint URL. The default value of nil uses the environment
|
691
682
|
# universe (usually the default "googleapis.com" universe).
|
692
683
|
# @return [::String,nil]
|
684
|
+
# @!attribute [rw] logger
|
685
|
+
# A custom logger to use for request/response debug logging, or the value
|
686
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
687
|
+
# explicitly disable logging.
|
688
|
+
# @return [::Logger,:default,nil]
|
693
689
|
#
|
694
690
|
class Configuration
|
695
691
|
extend ::Gapic::Config
|
@@ -714,6 +710,7 @@ module Google
|
|
714
710
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
715
711
|
config_attr :quota_project, nil, ::String, nil
|
716
712
|
config_attr :universe_domain, nil, ::String, nil
|
713
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
717
714
|
|
718
715
|
# @private
|
719
716
|
def initialize parent_config = nil
|
data/lib/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service/rest/client.rb
CHANGED
@@ -179,8 +179,19 @@ module Google
|
|
179
179
|
endpoint: @config.endpoint,
|
180
180
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
181
181
|
universe_domain: @config.universe_domain,
|
182
|
-
credentials: credentials
|
182
|
+
credentials: credentials,
|
183
|
+
logger: @config.logger
|
183
184
|
)
|
185
|
+
|
186
|
+
@consumer_procurement_service_stub.logger(stub: true)&.info do |entry|
|
187
|
+
entry.set_system_name
|
188
|
+
entry.set_service
|
189
|
+
entry.message = "Created client for #{entry.service}"
|
190
|
+
entry.set_credentials_fields credentials
|
191
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
192
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
193
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
194
|
+
end
|
184
195
|
end
|
185
196
|
|
186
197
|
##
|
@@ -190,6 +201,15 @@ module Google
|
|
190
201
|
#
|
191
202
|
attr_reader :operations_client
|
192
203
|
|
204
|
+
##
|
205
|
+
# The logger used for request/response debug logging.
|
206
|
+
#
|
207
|
+
# @return [Logger]
|
208
|
+
#
|
209
|
+
def logger
|
210
|
+
@consumer_procurement_service_stub.logger
|
211
|
+
end
|
212
|
+
|
193
213
|
# Service calls
|
194
214
|
|
195
215
|
##
|
@@ -295,7 +315,7 @@ module Google
|
|
295
315
|
@consumer_procurement_service_stub.place_order request, options do |result, operation|
|
296
316
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
297
317
|
yield result, operation if block_given?
|
298
|
-
|
318
|
+
throw :response, result
|
299
319
|
end
|
300
320
|
rescue ::Gapic::Rest::Error => e
|
301
321
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -375,7 +395,6 @@ module Google
|
|
375
395
|
|
376
396
|
@consumer_procurement_service_stub.get_order request, options do |result, operation|
|
377
397
|
yield result, operation if block_given?
|
378
|
-
return result
|
379
398
|
end
|
380
399
|
rescue ::Gapic::Rest::Error => e
|
381
400
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -485,7 +504,7 @@ module Google
|
|
485
504
|
@consumer_procurement_service_stub.list_orders request, options do |result, operation|
|
486
505
|
result = ::Gapic::Rest::PagedEnumerable.new @consumer_procurement_service_stub, :list_orders, "orders", request, result, options
|
487
506
|
yield result, operation if block_given?
|
488
|
-
|
507
|
+
throw :response, result
|
489
508
|
end
|
490
509
|
rescue ::Gapic::Rest::Error => e
|
491
510
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -584,7 +603,7 @@ module Google
|
|
584
603
|
@consumer_procurement_service_stub.modify_order request, options do |result, operation|
|
585
604
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
586
605
|
yield result, operation if block_given?
|
587
|
-
|
606
|
+
throw :response, result
|
588
607
|
end
|
589
608
|
rescue ::Gapic::Rest::Error => e
|
590
609
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -679,7 +698,7 @@ module Google
|
|
679
698
|
@consumer_procurement_service_stub.cancel_order request, options do |result, operation|
|
680
699
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
681
700
|
yield result, operation if block_given?
|
682
|
-
|
701
|
+
throw :response, result
|
683
702
|
end
|
684
703
|
rescue ::Gapic::Rest::Error => e
|
685
704
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -759,6 +778,11 @@ module Google
|
|
759
778
|
# default endpoint URL. The default value of nil uses the environment
|
760
779
|
# universe (usually the default "googleapis.com" universe).
|
761
780
|
# @return [::String,nil]
|
781
|
+
# @!attribute [rw] logger
|
782
|
+
# A custom logger to use for request/response debug logging, or the value
|
783
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
784
|
+
# explicitly disable logging.
|
785
|
+
# @return [::Logger,:default,nil]
|
762
786
|
#
|
763
787
|
class Configuration
|
764
788
|
extend ::Gapic::Config
|
@@ -780,6 +804,7 @@ module Google
|
|
780
804
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
781
805
|
config_attr :quota_project, nil, ::String, nil
|
782
806
|
config_attr :universe_domain, nil, ::String, nil
|
807
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
783
808
|
|
784
809
|
# @private
|
785
810
|
def initialize parent_config = nil
|
@@ -117,14 +117,6 @@ module Google
|
|
117
117
|
# Lists operations that match the specified filter in the request. If the
|
118
118
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
119
119
|
#
|
120
|
-
# NOTE: the `name` binding allows API services to override the binding
|
121
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
122
|
-
# override the binding, API services can add a binding such as
|
123
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
124
|
-
# For backwards compatibility, the default name includes the operations
|
125
|
-
# collection id, however overriding users must ensure the name binding
|
126
|
-
# is the parent resource, without the operations collection id.
|
127
|
-
#
|
128
120
|
# @overload list_operations(request, options = nil)
|
129
121
|
# Pass arguments to `list_operations` via a request object, either of type
|
130
122
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -206,7 +198,7 @@ module Google
|
|
206
198
|
@operations_stub.list_operations request, options do |result, operation|
|
207
199
|
result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
|
208
200
|
yield result, operation if block_given?
|
209
|
-
|
201
|
+
throw :response, result
|
210
202
|
end
|
211
203
|
rescue ::Gapic::Rest::Error => e
|
212
204
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -295,7 +287,7 @@ module Google
|
|
295
287
|
@operations_stub.get_operation request, options do |result, operation|
|
296
288
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
297
289
|
yield result, operation if block_given?
|
298
|
-
|
290
|
+
throw :response, result
|
299
291
|
end
|
300
292
|
rescue ::Gapic::Rest::Error => e
|
301
293
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -377,7 +369,6 @@ module Google
|
|
377
369
|
|
378
370
|
@operations_stub.delete_operation request, options do |result, operation|
|
379
371
|
yield result, operation if block_given?
|
380
|
-
return result
|
381
372
|
end
|
382
373
|
rescue ::Gapic::Rest::Error => e
|
383
374
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -392,8 +383,9 @@ module Google
|
|
392
383
|
# other methods to check whether the cancellation succeeded or whether the
|
393
384
|
# operation completed despite cancellation. On successful cancellation,
|
394
385
|
# the operation is not deleted; instead, it becomes an operation with
|
395
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
396
|
-
# corresponding to
|
386
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
387
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
388
|
+
# `Code.CANCELLED`.
|
397
389
|
#
|
398
390
|
# @overload cancel_operation(request, options = nil)
|
399
391
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -465,7 +457,6 @@ module Google
|
|
465
457
|
|
466
458
|
@operations_stub.cancel_operation request, options do |result, operation|
|
467
459
|
yield result, operation if block_given?
|
468
|
-
return result
|
469
460
|
end
|
470
461
|
rescue ::Gapic::Rest::Error => e
|
471
462
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -545,6 +536,11 @@ module Google
|
|
545
536
|
# default endpoint URL. The default value of nil uses the environment
|
546
537
|
# universe (usually the default "googleapis.com" universe).
|
547
538
|
# @return [::String,nil]
|
539
|
+
# @!attribute [rw] logger
|
540
|
+
# A custom logger to use for request/response debug logging, or the value
|
541
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
542
|
+
# explicitly disable logging.
|
543
|
+
# @return [::Logger,:default,nil]
|
548
544
|
#
|
549
545
|
class Configuration
|
550
546
|
extend ::Gapic::Config
|
@@ -566,6 +562,7 @@ module Google
|
|
566
562
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
567
563
|
config_attr :quota_project, nil, ::String, nil
|
568
564
|
config_attr :universe_domain, nil, ::String, nil
|
565
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
569
566
|
|
570
567
|
# @private
|
571
568
|
def initialize parent_config = nil
|
@@ -685,16 +682,18 @@ module Google
|
|
685
682
|
|
686
683
|
response = @client_stub.make_http_request(
|
687
684
|
verb,
|
688
|
-
uri:
|
689
|
-
body:
|
690
|
-
params:
|
685
|
+
uri: uri,
|
686
|
+
body: body || "",
|
687
|
+
params: query_string_params,
|
688
|
+
method_name: "list_operations",
|
691
689
|
options: options
|
692
690
|
)
|
693
691
|
operation = ::Gapic::Rest::TransportOperation.new response
|
694
692
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
695
|
-
|
696
|
-
|
697
|
-
|
693
|
+
catch :response do
|
694
|
+
yield result, operation if block_given?
|
695
|
+
result
|
696
|
+
end
|
698
697
|
end
|
699
698
|
|
700
699
|
##
|
@@ -723,16 +722,18 @@ module Google
|
|
723
722
|
|
724
723
|
response = @client_stub.make_http_request(
|
725
724
|
verb,
|
726
|
-
uri:
|
727
|
-
body:
|
728
|
-
params:
|
725
|
+
uri: uri,
|
726
|
+
body: body || "",
|
727
|
+
params: query_string_params,
|
728
|
+
method_name: "get_operation",
|
729
729
|
options: options
|
730
730
|
)
|
731
731
|
operation = ::Gapic::Rest::TransportOperation.new response
|
732
732
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
733
|
-
|
734
|
-
|
735
|
-
|
733
|
+
catch :response do
|
734
|
+
yield result, operation if block_given?
|
735
|
+
result
|
736
|
+
end
|
736
737
|
end
|
737
738
|
|
738
739
|
##
|
@@ -761,16 +762,18 @@ module Google
|
|
761
762
|
|
762
763
|
response = @client_stub.make_http_request(
|
763
764
|
verb,
|
764
|
-
uri:
|
765
|
-
body:
|
766
|
-
params:
|
765
|
+
uri: uri,
|
766
|
+
body: body || "",
|
767
|
+
params: query_string_params,
|
768
|
+
method_name: "delete_operation",
|
767
769
|
options: options
|
768
770
|
)
|
769
771
|
operation = ::Gapic::Rest::TransportOperation.new response
|
770
772
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
771
|
-
|
772
|
-
|
773
|
-
|
773
|
+
catch :response do
|
774
|
+
yield result, operation if block_given?
|
775
|
+
result
|
776
|
+
end
|
774
777
|
end
|
775
778
|
|
776
779
|
##
|
@@ -799,16 +802,18 @@ module Google
|
|
799
802
|
|
800
803
|
response = @client_stub.make_http_request(
|
801
804
|
verb,
|
802
|
-
uri:
|
803
|
-
body:
|
804
|
-
params:
|
805
|
+
uri: uri,
|
806
|
+
body: body || "",
|
807
|
+
params: query_string_params,
|
808
|
+
method_name: "cancel_operation",
|
805
809
|
options: options
|
806
810
|
)
|
807
811
|
operation = ::Gapic::Rest::TransportOperation.new response
|
808
812
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
809
|
-
|
810
|
-
|
811
|
-
|
813
|
+
catch :response do
|
814
|
+
yield result, operation if block_given?
|
815
|
+
result
|
816
|
+
end
|
812
817
|
end
|
813
818
|
|
814
819
|
##
|
@@ -32,7 +32,8 @@ module Google
|
|
32
32
|
# including transcoding, making the REST call, and deserialing the response.
|
33
33
|
#
|
34
34
|
class ServiceStub
|
35
|
-
|
35
|
+
# @private
|
36
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
36
37
|
# These require statements are intentionally placed here to initialize
|
37
38
|
# the REST modules only when it's required.
|
38
39
|
require "gapic/rest"
|
@@ -42,7 +43,9 @@ module Google
|
|
42
43
|
universe_domain: universe_domain,
|
43
44
|
credentials: credentials,
|
44
45
|
numeric_enums: true,
|
45
|
-
|
46
|
+
service_name: self.class,
|
47
|
+
raise_faraday_errors: false,
|
48
|
+
logger: logger
|
46
49
|
end
|
47
50
|
|
48
51
|
##
|
@@ -63,6 +66,15 @@ module Google
|
|
63
66
|
@client_stub.endpoint
|
64
67
|
end
|
65
68
|
|
69
|
+
##
|
70
|
+
# The logger used for request/response debug logging.
|
71
|
+
#
|
72
|
+
# @return [Logger]
|
73
|
+
#
|
74
|
+
def logger stub: false
|
75
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
76
|
+
end
|
77
|
+
|
66
78
|
##
|
67
79
|
# Baseline implementation for the place_order REST call
|
68
80
|
#
|
@@ -89,16 +101,18 @@ module Google
|
|
89
101
|
|
90
102
|
response = @client_stub.make_http_request(
|
91
103
|
verb,
|
92
|
-
uri:
|
93
|
-
body:
|
94
|
-
params:
|
104
|
+
uri: uri,
|
105
|
+
body: body || "",
|
106
|
+
params: query_string_params,
|
107
|
+
method_name: "place_order",
|
95
108
|
options: options
|
96
109
|
)
|
97
110
|
operation = ::Gapic::Rest::TransportOperation.new response
|
98
111
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
99
|
-
|
100
|
-
|
101
|
-
|
112
|
+
catch :response do
|
113
|
+
yield result, operation if block_given?
|
114
|
+
result
|
115
|
+
end
|
102
116
|
end
|
103
117
|
|
104
118
|
##
|
@@ -127,16 +141,18 @@ module Google
|
|
127
141
|
|
128
142
|
response = @client_stub.make_http_request(
|
129
143
|
verb,
|
130
|
-
uri:
|
131
|
-
body:
|
132
|
-
params:
|
144
|
+
uri: uri,
|
145
|
+
body: body || "",
|
146
|
+
params: query_string_params,
|
147
|
+
method_name: "get_order",
|
133
148
|
options: options
|
134
149
|
)
|
135
150
|
operation = ::Gapic::Rest::TransportOperation.new response
|
136
151
|
result = ::Google::Cloud::Commerce::Consumer::Procurement::V1::Order.decode_json response.body, ignore_unknown_fields: true
|
137
|
-
|
138
|
-
|
139
|
-
|
152
|
+
catch :response do
|
153
|
+
yield result, operation if block_given?
|
154
|
+
result
|
155
|
+
end
|
140
156
|
end
|
141
157
|
|
142
158
|
##
|
@@ -165,16 +181,18 @@ module Google
|
|
165
181
|
|
166
182
|
response = @client_stub.make_http_request(
|
167
183
|
verb,
|
168
|
-
uri:
|
169
|
-
body:
|
170
|
-
params:
|
184
|
+
uri: uri,
|
185
|
+
body: body || "",
|
186
|
+
params: query_string_params,
|
187
|
+
method_name: "list_orders",
|
171
188
|
options: options
|
172
189
|
)
|
173
190
|
operation = ::Gapic::Rest::TransportOperation.new response
|
174
191
|
result = ::Google::Cloud::Commerce::Consumer::Procurement::V1::ListOrdersResponse.decode_json response.body, ignore_unknown_fields: true
|
175
|
-
|
176
|
-
|
177
|
-
|
192
|
+
catch :response do
|
193
|
+
yield result, operation if block_given?
|
194
|
+
result
|
195
|
+
end
|
178
196
|
end
|
179
197
|
|
180
198
|
##
|
@@ -203,16 +221,18 @@ module Google
|
|
203
221
|
|
204
222
|
response = @client_stub.make_http_request(
|
205
223
|
verb,
|
206
|
-
uri:
|
207
|
-
body:
|
208
|
-
params:
|
224
|
+
uri: uri,
|
225
|
+
body: body || "",
|
226
|
+
params: query_string_params,
|
227
|
+
method_name: "modify_order",
|
209
228
|
options: options
|
210
229
|
)
|
211
230
|
operation = ::Gapic::Rest::TransportOperation.new response
|
212
231
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
213
|
-
|
214
|
-
|
215
|
-
|
232
|
+
catch :response do
|
233
|
+
yield result, operation if block_given?
|
234
|
+
result
|
235
|
+
end
|
216
236
|
end
|
217
237
|
|
218
238
|
##
|
@@ -241,16 +261,18 @@ module Google
|
|
241
261
|
|
242
262
|
response = @client_stub.make_http_request(
|
243
263
|
verb,
|
244
|
-
uri:
|
245
|
-
body:
|
246
|
-
params:
|
264
|
+
uri: uri,
|
265
|
+
body: body || "",
|
266
|
+
params: query_string_params,
|
267
|
+
method_name: "cancel_order",
|
247
268
|
options: options
|
248
269
|
)
|
249
270
|
operation = ::Gapic::Rest::TransportOperation.new response
|
250
271
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
251
|
-
|
252
|
-
|
253
|
-
|
272
|
+
catch :response do
|
273
|
+
yield result, operation if block_given?
|
274
|
+
result
|
275
|
+
end
|
254
276
|
end
|
255
277
|
|
256
278
|
##
|
@@ -159,8 +159,28 @@ module Google
|
|
159
159
|
universe_domain: @config.universe_domain,
|
160
160
|
channel_args: @config.channel_args,
|
161
161
|
interceptors: @config.interceptors,
|
162
|
-
channel_pool_config: @config.channel_pool
|
162
|
+
channel_pool_config: @config.channel_pool,
|
163
|
+
logger: @config.logger
|
163
164
|
)
|
165
|
+
|
166
|
+
@license_management_service_stub.stub_logger&.info do |entry|
|
167
|
+
entry.set_system_name
|
168
|
+
entry.set_service
|
169
|
+
entry.message = "Created client for #{entry.service}"
|
170
|
+
entry.set_credentials_fields credentials
|
171
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
172
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
173
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
##
|
178
|
+
# The logger used for request/response debug logging.
|
179
|
+
#
|
180
|
+
# @return [Logger]
|
181
|
+
#
|
182
|
+
def logger
|
183
|
+
@license_management_service_stub.logger
|
164
184
|
end
|
165
185
|
|
166
186
|
# Service calls
|
@@ -246,7 +266,6 @@ module Google
|
|
246
266
|
|
247
267
|
@license_management_service_stub.call_rpc :get_license_pool, request, options: options do |response, operation|
|
248
268
|
yield response, operation if block_given?
|
249
|
-
return response
|
250
269
|
end
|
251
270
|
rescue ::GRPC::BadStatus => e
|
252
271
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -338,7 +357,6 @@ module Google
|
|
338
357
|
|
339
358
|
@license_management_service_stub.call_rpc :update_license_pool, request, options: options do |response, operation|
|
340
359
|
yield response, operation if block_given?
|
341
|
-
return response
|
342
360
|
end
|
343
361
|
rescue ::GRPC::BadStatus => e
|
344
362
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -427,7 +445,6 @@ module Google
|
|
427
445
|
|
428
446
|
@license_management_service_stub.call_rpc :assign, request, options: options do |response, operation|
|
429
447
|
yield response, operation if block_given?
|
430
|
-
return response
|
431
448
|
end
|
432
449
|
rescue ::GRPC::BadStatus => e
|
433
450
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -516,7 +533,6 @@ module Google
|
|
516
533
|
|
517
534
|
@license_management_service_stub.call_rpc :unassign, request, options: options do |response, operation|
|
518
535
|
yield response, operation if block_given?
|
519
|
-
return response
|
520
536
|
end
|
521
537
|
rescue ::GRPC::BadStatus => e
|
522
538
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -613,7 +629,7 @@ module Google
|
|
613
629
|
@license_management_service_stub.call_rpc :enumerate_licensed_users, request, options: options do |response, operation|
|
614
630
|
response = ::Gapic::PagedEnumerable.new @license_management_service_stub, :enumerate_licensed_users, request, response, operation, options
|
615
631
|
yield response, operation if block_given?
|
616
|
-
|
632
|
+
throw :response, response
|
617
633
|
end
|
618
634
|
rescue ::GRPC::BadStatus => e
|
619
635
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -702,6 +718,11 @@ module Google
|
|
702
718
|
# default endpoint URL. The default value of nil uses the environment
|
703
719
|
# universe (usually the default "googleapis.com" universe).
|
704
720
|
# @return [::String,nil]
|
721
|
+
# @!attribute [rw] logger
|
722
|
+
# A custom logger to use for request/response debug logging, or the value
|
723
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
724
|
+
# explicitly disable logging.
|
725
|
+
# @return [::Logger,:default,nil]
|
705
726
|
#
|
706
727
|
class Configuration
|
707
728
|
extend ::Gapic::Config
|
@@ -726,6 +747,7 @@ module Google
|
|
726
747
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
727
748
|
config_attr :quota_project, nil, ::String, nil
|
728
749
|
config_attr :universe_domain, nil, ::String, nil
|
750
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
729
751
|
|
730
752
|
# @private
|
731
753
|
def initialize parent_config = nil
|
data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/rest/client.rb
CHANGED
@@ -152,8 +152,28 @@ module Google
|
|
152
152
|
endpoint: @config.endpoint,
|
153
153
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
154
154
|
universe_domain: @config.universe_domain,
|
155
|
-
credentials: credentials
|
155
|
+
credentials: credentials,
|
156
|
+
logger: @config.logger
|
156
157
|
)
|
158
|
+
|
159
|
+
@license_management_service_stub.logger(stub: true)&.info do |entry|
|
160
|
+
entry.set_system_name
|
161
|
+
entry.set_service
|
162
|
+
entry.message = "Created client for #{entry.service}"
|
163
|
+
entry.set_credentials_fields credentials
|
164
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
165
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
166
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
##
|
171
|
+
# The logger used for request/response debug logging.
|
172
|
+
#
|
173
|
+
# @return [Logger]
|
174
|
+
#
|
175
|
+
def logger
|
176
|
+
@license_management_service_stub.logger
|
157
177
|
end
|
158
178
|
|
159
179
|
# Service calls
|
@@ -232,7 +252,6 @@ module Google
|
|
232
252
|
|
233
253
|
@license_management_service_stub.get_license_pool request, options do |result, operation|
|
234
254
|
yield result, operation if block_given?
|
235
|
-
return result
|
236
255
|
end
|
237
256
|
rescue ::Gapic::Rest::Error => e
|
238
257
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -317,7 +336,6 @@ module Google
|
|
317
336
|
|
318
337
|
@license_management_service_stub.update_license_pool request, options do |result, operation|
|
319
338
|
yield result, operation if block_given?
|
320
|
-
return result
|
321
339
|
end
|
322
340
|
rescue ::Gapic::Rest::Error => e
|
323
341
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -399,7 +417,6 @@ module Google
|
|
399
417
|
|
400
418
|
@license_management_service_stub.assign request, options do |result, operation|
|
401
419
|
yield result, operation if block_given?
|
402
|
-
return result
|
403
420
|
end
|
404
421
|
rescue ::Gapic::Rest::Error => e
|
405
422
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -481,7 +498,6 @@ module Google
|
|
481
498
|
|
482
499
|
@license_management_service_stub.unassign request, options do |result, operation|
|
483
500
|
yield result, operation if block_given?
|
484
|
-
return result
|
485
501
|
end
|
486
502
|
rescue ::Gapic::Rest::Error => e
|
487
503
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -571,7 +587,7 @@ module Google
|
|
571
587
|
@license_management_service_stub.enumerate_licensed_users request, options do |result, operation|
|
572
588
|
result = ::Gapic::Rest::PagedEnumerable.new @license_management_service_stub, :enumerate_licensed_users, "licensed_users", request, result, options
|
573
589
|
yield result, operation if block_given?
|
574
|
-
|
590
|
+
throw :response, result
|
575
591
|
end
|
576
592
|
rescue ::Gapic::Rest::Error => e
|
577
593
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -651,6 +667,11 @@ module Google
|
|
651
667
|
# default endpoint URL. The default value of nil uses the environment
|
652
668
|
# universe (usually the default "googleapis.com" universe).
|
653
669
|
# @return [::String,nil]
|
670
|
+
# @!attribute [rw] logger
|
671
|
+
# A custom logger to use for request/response debug logging, or the value
|
672
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
673
|
+
# explicitly disable logging.
|
674
|
+
# @return [::Logger,:default,nil]
|
654
675
|
#
|
655
676
|
class Configuration
|
656
677
|
extend ::Gapic::Config
|
@@ -672,6 +693,7 @@ module Google
|
|
672
693
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
673
694
|
config_attr :quota_project, nil, ::String, nil
|
674
695
|
config_attr :universe_domain, nil, ::String, nil
|
696
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
675
697
|
|
676
698
|
# @private
|
677
699
|
def initialize parent_config = nil
|
@@ -32,7 +32,8 @@ module Google
|
|
32
32
|
# including transcoding, making the REST call, and deserialing the response.
|
33
33
|
#
|
34
34
|
class ServiceStub
|
35
|
-
|
35
|
+
# @private
|
36
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
36
37
|
# These require statements are intentionally placed here to initialize
|
37
38
|
# the REST modules only when it's required.
|
38
39
|
require "gapic/rest"
|
@@ -42,7 +43,9 @@ module Google
|
|
42
43
|
universe_domain: universe_domain,
|
43
44
|
credentials: credentials,
|
44
45
|
numeric_enums: true,
|
45
|
-
|
46
|
+
service_name: self.class,
|
47
|
+
raise_faraday_errors: false,
|
48
|
+
logger: logger
|
46
49
|
end
|
47
50
|
|
48
51
|
##
|
@@ -63,6 +66,15 @@ module Google
|
|
63
66
|
@client_stub.endpoint
|
64
67
|
end
|
65
68
|
|
69
|
+
##
|
70
|
+
# The logger used for request/response debug logging.
|
71
|
+
#
|
72
|
+
# @return [Logger]
|
73
|
+
#
|
74
|
+
def logger stub: false
|
75
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
76
|
+
end
|
77
|
+
|
66
78
|
##
|
67
79
|
# Baseline implementation for the get_license_pool REST call
|
68
80
|
#
|
@@ -89,16 +101,18 @@ module Google
|
|
89
101
|
|
90
102
|
response = @client_stub.make_http_request(
|
91
103
|
verb,
|
92
|
-
uri:
|
93
|
-
body:
|
94
|
-
params:
|
104
|
+
uri: uri,
|
105
|
+
body: body || "",
|
106
|
+
params: query_string_params,
|
107
|
+
method_name: "get_license_pool",
|
95
108
|
options: options
|
96
109
|
)
|
97
110
|
operation = ::Gapic::Rest::TransportOperation.new response
|
98
111
|
result = ::Google::Cloud::Commerce::Consumer::Procurement::V1::LicensePool.decode_json response.body, ignore_unknown_fields: true
|
99
|
-
|
100
|
-
|
101
|
-
|
112
|
+
catch :response do
|
113
|
+
yield result, operation if block_given?
|
114
|
+
result
|
115
|
+
end
|
102
116
|
end
|
103
117
|
|
104
118
|
##
|
@@ -127,16 +141,18 @@ module Google
|
|
127
141
|
|
128
142
|
response = @client_stub.make_http_request(
|
129
143
|
verb,
|
130
|
-
uri:
|
131
|
-
body:
|
132
|
-
params:
|
144
|
+
uri: uri,
|
145
|
+
body: body || "",
|
146
|
+
params: query_string_params,
|
147
|
+
method_name: "update_license_pool",
|
133
148
|
options: options
|
134
149
|
)
|
135
150
|
operation = ::Gapic::Rest::TransportOperation.new response
|
136
151
|
result = ::Google::Cloud::Commerce::Consumer::Procurement::V1::LicensePool.decode_json response.body, ignore_unknown_fields: true
|
137
|
-
|
138
|
-
|
139
|
-
|
152
|
+
catch :response do
|
153
|
+
yield result, operation if block_given?
|
154
|
+
result
|
155
|
+
end
|
140
156
|
end
|
141
157
|
|
142
158
|
##
|
@@ -165,16 +181,18 @@ module Google
|
|
165
181
|
|
166
182
|
response = @client_stub.make_http_request(
|
167
183
|
verb,
|
168
|
-
uri:
|
169
|
-
body:
|
170
|
-
params:
|
184
|
+
uri: uri,
|
185
|
+
body: body || "",
|
186
|
+
params: query_string_params,
|
187
|
+
method_name: "assign",
|
171
188
|
options: options
|
172
189
|
)
|
173
190
|
operation = ::Gapic::Rest::TransportOperation.new response
|
174
191
|
result = ::Google::Cloud::Commerce::Consumer::Procurement::V1::AssignResponse.decode_json response.body, ignore_unknown_fields: true
|
175
|
-
|
176
|
-
|
177
|
-
|
192
|
+
catch :response do
|
193
|
+
yield result, operation if block_given?
|
194
|
+
result
|
195
|
+
end
|
178
196
|
end
|
179
197
|
|
180
198
|
##
|
@@ -203,16 +221,18 @@ module Google
|
|
203
221
|
|
204
222
|
response = @client_stub.make_http_request(
|
205
223
|
verb,
|
206
|
-
uri:
|
207
|
-
body:
|
208
|
-
params:
|
224
|
+
uri: uri,
|
225
|
+
body: body || "",
|
226
|
+
params: query_string_params,
|
227
|
+
method_name: "unassign",
|
209
228
|
options: options
|
210
229
|
)
|
211
230
|
operation = ::Gapic::Rest::TransportOperation.new response
|
212
231
|
result = ::Google::Cloud::Commerce::Consumer::Procurement::V1::UnassignResponse.decode_json response.body, ignore_unknown_fields: true
|
213
|
-
|
214
|
-
|
215
|
-
|
232
|
+
catch :response do
|
233
|
+
yield result, operation if block_given?
|
234
|
+
result
|
235
|
+
end
|
216
236
|
end
|
217
237
|
|
218
238
|
##
|
@@ -241,16 +261,18 @@ module Google
|
|
241
261
|
|
242
262
|
response = @client_stub.make_http_request(
|
243
263
|
verb,
|
244
|
-
uri:
|
245
|
-
body:
|
246
|
-
params:
|
264
|
+
uri: uri,
|
265
|
+
body: body || "",
|
266
|
+
params: query_string_params,
|
267
|
+
method_name: "enumerate_licensed_users",
|
247
268
|
options: options
|
248
269
|
)
|
249
270
|
operation = ::Gapic::Rest::TransportOperation.new response
|
250
271
|
result = ::Google::Cloud::Commerce::Consumer::Procurement::V1::EnumerateLicensedUsersResponse.decode_json response.body, ignore_unknown_fields: true
|
251
|
-
|
252
|
-
|
253
|
-
|
272
|
+
catch :response do
|
273
|
+
yield result, operation if block_given?
|
274
|
+
result
|
275
|
+
end
|
254
276
|
end
|
255
277
|
|
256
278
|
##
|
@@ -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
|
@@ -212,6 +215,12 @@ module Google
|
|
212
215
|
# enabled. By default, asynchronous REST clients will not be generated.
|
213
216
|
# This feature will be enabled by default 1 month after launching the
|
214
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.
|
215
224
|
class ExperimentalFeatures
|
216
225
|
include ::Google::Protobuf::MessageExts
|
217
226
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -297,9 +306,28 @@ module Google
|
|
297
306
|
# @!attribute [rw] common
|
298
307
|
# @return [::Google::Api::CommonLanguageSettings]
|
299
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
|
300
319
|
class GoSettings
|
301
320
|
include ::Google::Protobuf::MessageExts
|
302
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
|
303
331
|
end
|
304
332
|
|
305
333
|
# Describes the generator configuration for a method.
|
@@ -375,6 +403,17 @@ module Google
|
|
375
403
|
end
|
376
404
|
end
|
377
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
|
+
|
378
417
|
# The organization for which the client libraries are being published.
|
379
418
|
# Affects the url where generated docs are published, etc.
|
380
419
|
module ClientLibraryOrganization
|
@@ -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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
-
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
137
|
-
#
|
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-commerce-consumer-procurement-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.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-10
|
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.
|
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.
|
29
|
+
version: 0.24.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
|
-
rubygems_version: 3.5.
|
119
|
+
rubygems_version: 3.5.23
|
120
120
|
signing_key:
|
121
121
|
specification_version: 4
|
122
122
|
summary: Enables consumers to procure products served by Cloud Marketplace platform.
|