google-cloud-vision_ai-v1 0.2.0 → 0.4.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 +31 -21
- data/lib/google/cloud/vision_ai/v1/app_platform/client.rb +57 -27
- data/lib/google/cloud/vision_ai/v1/app_platform/operations.rb +19 -15
- data/lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb +53 -27
- data/lib/google/cloud/vision_ai/v1/app_platform/rest/operations.rb +50 -38
- data/lib/google/cloud/vision_ai/v1/app_platform/rest/service_stub.rb +222 -158
- data/lib/google/cloud/vision_ai/v1/health_check_service/client.rb +36 -2
- data/lib/google/cloud/vision_ai/v1/health_check_service/rest/client.rb +36 -2
- data/lib/google/cloud/vision_ai/v1/health_check_service/rest/service_stub.rb +22 -8
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/client.rb +50 -19
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/operations.rb +19 -15
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/client.rb +47 -19
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/operations.rb +50 -38
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/service_stub.rb +158 -110
- data/lib/google/cloud/vision_ai/v1/streaming_service/client.rb +36 -7
- data/lib/google/cloud/vision_ai/v1/streaming_service/rest/client.rb +36 -4
- data/lib/google/cloud/vision_ai/v1/streaming_service/rest/service_stub.rb +38 -20
- data/lib/google/cloud/vision_ai/v1/streams_service/client.rb +54 -24
- data/lib/google/cloud/vision_ai/v1/streams_service/operations.rb +19 -15
- data/lib/google/cloud/vision_ai/v1/streams_service/rest/client.rb +50 -24
- data/lib/google/cloud/vision_ai/v1/streams_service/rest/operations.rb +50 -38
- data/lib/google/cloud/vision_ai/v1/streams_service/rest/service_stub.rb +198 -140
- data/lib/google/cloud/vision_ai/v1/version.rb +1 -1
- data/lib/google/cloud/vision_ai/v1/warehouse/client.rb +71 -64
- data/lib/google/cloud/vision_ai/v1/warehouse/operations.rb +19 -15
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/client.rb +70 -63
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/operations.rb +50 -38
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/service_stub.rb +510 -374
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/visionai/v1/annotations.rb +4 -0
- data/proto_docs/google/cloud/visionai/v1/lva.rb +8 -0
- data/proto_docs/google/cloud/visionai/v1/platform.rb +44 -0
- data/proto_docs/google/cloud/visionai/v1/streaming_resources.rb +4 -0
- data/proto_docs/google/cloud/visionai/v1/streaming_service.rb +32 -0
- data/proto_docs/google/cloud/visionai/v1/warehouse.rb +64 -0
- data/proto_docs/google/longrunning/operations.rb +23 -14
- data/proto_docs/google/protobuf/struct.rb +12 -0
- data/proto_docs/google/type/datetime.rb +4 -0
- metadata +6 -9
@@ -159,14 +159,26 @@ module Google
|
|
159
159
|
endpoint: @config.endpoint,
|
160
160
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
161
161
|
universe_domain: @config.universe_domain,
|
162
|
-
credentials: credentials
|
162
|
+
credentials: credentials,
|
163
|
+
logger: @config.logger
|
163
164
|
)
|
164
165
|
|
166
|
+
@app_platform_stub.logger(stub: true)&.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
|
+
|
165
176
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
166
177
|
config.credentials = credentials
|
167
178
|
config.quota_project = @quota_project_id
|
168
179
|
config.endpoint = @app_platform_stub.endpoint
|
169
180
|
config.universe_domain = @app_platform_stub.universe_domain
|
181
|
+
config.logger = @app_platform_stub.logger if config.respond_to? :logger=
|
170
182
|
end
|
171
183
|
|
172
184
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
@@ -174,6 +186,7 @@ module Google
|
|
174
186
|
config.quota_project = @quota_project_id
|
175
187
|
config.endpoint = @app_platform_stub.endpoint
|
176
188
|
config.universe_domain = @app_platform_stub.universe_domain
|
189
|
+
config.logger = @app_platform_stub.logger if config.respond_to? :logger=
|
177
190
|
end
|
178
191
|
end
|
179
192
|
|
@@ -198,6 +211,15 @@ module Google
|
|
198
211
|
#
|
199
212
|
attr_reader :iam_policy_client
|
200
213
|
|
214
|
+
##
|
215
|
+
# The logger used for request/response debug logging.
|
216
|
+
#
|
217
|
+
# @return [Logger]
|
218
|
+
#
|
219
|
+
def logger
|
220
|
+
@app_platform_stub.logger
|
221
|
+
end
|
222
|
+
|
201
223
|
# Service calls
|
202
224
|
|
203
225
|
##
|
@@ -286,7 +308,6 @@ module Google
|
|
286
308
|
|
287
309
|
@app_platform_stub.list_applications request, options do |result, operation|
|
288
310
|
yield result, operation if block_given?
|
289
|
-
return result
|
290
311
|
end
|
291
312
|
rescue ::Gapic::Rest::Error => e
|
292
313
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -365,7 +386,6 @@ module Google
|
|
365
386
|
|
366
387
|
@app_platform_stub.get_application request, options do |result, operation|
|
367
388
|
yield result, operation if block_given?
|
368
|
-
return result
|
369
389
|
end
|
370
390
|
rescue ::Gapic::Rest::Error => e
|
371
391
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -470,7 +490,7 @@ module Google
|
|
470
490
|
@app_platform_stub.create_application request, options do |result, operation|
|
471
491
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
472
492
|
yield result, operation if block_given?
|
473
|
-
|
493
|
+
throw :response, result
|
474
494
|
end
|
475
495
|
rescue ::Gapic::Rest::Error => e
|
476
496
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -577,7 +597,7 @@ module Google
|
|
577
597
|
@app_platform_stub.update_application request, options do |result, operation|
|
578
598
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
579
599
|
yield result, operation if block_given?
|
580
|
-
|
600
|
+
throw :response, result
|
581
601
|
end
|
582
602
|
rescue ::Gapic::Rest::Error => e
|
583
603
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -682,7 +702,7 @@ module Google
|
|
682
702
|
@app_platform_stub.delete_application request, options do |result, operation|
|
683
703
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
684
704
|
yield result, operation if block_given?
|
685
|
-
|
705
|
+
throw :response, result
|
686
706
|
end
|
687
707
|
rescue ::Gapic::Rest::Error => e
|
688
708
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -791,7 +811,7 @@ module Google
|
|
791
811
|
@app_platform_stub.deploy_application request, options do |result, operation|
|
792
812
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
793
813
|
yield result, operation if block_given?
|
794
|
-
|
814
|
+
throw :response, result
|
795
815
|
end
|
796
816
|
rescue ::Gapic::Rest::Error => e
|
797
817
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -894,7 +914,7 @@ module Google
|
|
894
914
|
@app_platform_stub.undeploy_application request, options do |result, operation|
|
895
915
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
896
916
|
yield result, operation if block_given?
|
897
|
-
|
917
|
+
throw :response, result
|
898
918
|
end
|
899
919
|
rescue ::Gapic::Rest::Error => e
|
900
920
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1003,7 +1023,7 @@ module Google
|
|
1003
1023
|
@app_platform_stub.add_application_stream_input request, options do |result, operation|
|
1004
1024
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1005
1025
|
yield result, operation if block_given?
|
1006
|
-
|
1026
|
+
throw :response, result
|
1007
1027
|
end
|
1008
1028
|
rescue ::Gapic::Rest::Error => e
|
1009
1029
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1110,7 +1130,7 @@ module Google
|
|
1110
1130
|
@app_platform_stub.remove_application_stream_input request, options do |result, operation|
|
1111
1131
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1112
1132
|
yield result, operation if block_given?
|
1113
|
-
|
1133
|
+
throw :response, result
|
1114
1134
|
end
|
1115
1135
|
rescue ::Gapic::Rest::Error => e
|
1116
1136
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1221,7 +1241,7 @@ module Google
|
|
1221
1241
|
@app_platform_stub.update_application_stream_input request, options do |result, operation|
|
1222
1242
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1223
1243
|
yield result, operation if block_given?
|
1224
|
-
|
1244
|
+
throw :response, result
|
1225
1245
|
end
|
1226
1246
|
rescue ::Gapic::Rest::Error => e
|
1227
1247
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1313,7 +1333,6 @@ module Google
|
|
1313
1333
|
|
1314
1334
|
@app_platform_stub.list_instances request, options do |result, operation|
|
1315
1335
|
yield result, operation if block_given?
|
1316
|
-
return result
|
1317
1336
|
end
|
1318
1337
|
rescue ::Gapic::Rest::Error => e
|
1319
1338
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1392,7 +1411,6 @@ module Google
|
|
1392
1411
|
|
1393
1412
|
@app_platform_stub.get_instance request, options do |result, operation|
|
1394
1413
|
yield result, operation if block_given?
|
1395
|
-
return result
|
1396
1414
|
end
|
1397
1415
|
rescue ::Gapic::Rest::Error => e
|
1398
1416
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1500,7 +1518,7 @@ module Google
|
|
1500
1518
|
@app_platform_stub.create_application_instances request, options do |result, operation|
|
1501
1519
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1502
1520
|
yield result, operation if block_given?
|
1503
|
-
|
1521
|
+
throw :response, result
|
1504
1522
|
end
|
1505
1523
|
rescue ::Gapic::Rest::Error => e
|
1506
1524
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1607,7 +1625,7 @@ module Google
|
|
1607
1625
|
@app_platform_stub.delete_application_instances request, options do |result, operation|
|
1608
1626
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1609
1627
|
yield result, operation if block_given?
|
1610
|
-
|
1628
|
+
throw :response, result
|
1611
1629
|
end
|
1612
1630
|
rescue ::Gapic::Rest::Error => e
|
1613
1631
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1717,7 +1735,7 @@ module Google
|
|
1717
1735
|
@app_platform_stub.update_application_instances request, options do |result, operation|
|
1718
1736
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1719
1737
|
yield result, operation if block_given?
|
1720
|
-
|
1738
|
+
throw :response, result
|
1721
1739
|
end
|
1722
1740
|
rescue ::Gapic::Rest::Error => e
|
1723
1741
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1809,7 +1827,6 @@ module Google
|
|
1809
1827
|
|
1810
1828
|
@app_platform_stub.list_drafts request, options do |result, operation|
|
1811
1829
|
yield result, operation if block_given?
|
1812
|
-
return result
|
1813
1830
|
end
|
1814
1831
|
rescue ::Gapic::Rest::Error => e
|
1815
1832
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1888,7 +1905,6 @@ module Google
|
|
1888
1905
|
|
1889
1906
|
@app_platform_stub.get_draft request, options do |result, operation|
|
1890
1907
|
yield result, operation if block_given?
|
1891
|
-
return result
|
1892
1908
|
end
|
1893
1909
|
rescue ::Gapic::Rest::Error => e
|
1894
1910
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1993,7 +2009,7 @@ module Google
|
|
1993
2009
|
@app_platform_stub.create_draft request, options do |result, operation|
|
1994
2010
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1995
2011
|
yield result, operation if block_given?
|
1996
|
-
|
2012
|
+
throw :response, result
|
1997
2013
|
end
|
1998
2014
|
rescue ::Gapic::Rest::Error => e
|
1999
2015
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2103,7 +2119,7 @@ module Google
|
|
2103
2119
|
@app_platform_stub.update_draft request, options do |result, operation|
|
2104
2120
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2105
2121
|
yield result, operation if block_given?
|
2106
|
-
|
2122
|
+
throw :response, result
|
2107
2123
|
end
|
2108
2124
|
rescue ::Gapic::Rest::Error => e
|
2109
2125
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2204,7 +2220,7 @@ module Google
|
|
2204
2220
|
@app_platform_stub.delete_draft request, options do |result, operation|
|
2205
2221
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2206
2222
|
yield result, operation if block_given?
|
2207
|
-
|
2223
|
+
throw :response, result
|
2208
2224
|
end
|
2209
2225
|
rescue ::Gapic::Rest::Error => e
|
2210
2226
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2296,7 +2312,6 @@ module Google
|
|
2296
2312
|
|
2297
2313
|
@app_platform_stub.list_processors request, options do |result, operation|
|
2298
2314
|
yield result, operation if block_given?
|
2299
|
-
return result
|
2300
2315
|
end
|
2301
2316
|
rescue ::Gapic::Rest::Error => e
|
2302
2317
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2376,7 +2391,6 @@ module Google
|
|
2376
2391
|
|
2377
2392
|
@app_platform_stub.list_prebuilt_processors request, options do |result, operation|
|
2378
2393
|
yield result, operation if block_given?
|
2379
|
-
return result
|
2380
2394
|
end
|
2381
2395
|
rescue ::Gapic::Rest::Error => e
|
2382
2396
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2455,7 +2469,6 @@ module Google
|
|
2455
2469
|
|
2456
2470
|
@app_platform_stub.get_processor request, options do |result, operation|
|
2457
2471
|
yield result, operation if block_given?
|
2458
|
-
return result
|
2459
2472
|
end
|
2460
2473
|
rescue ::Gapic::Rest::Error => e
|
2461
2474
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2560,7 +2573,7 @@ module Google
|
|
2560
2573
|
@app_platform_stub.create_processor request, options do |result, operation|
|
2561
2574
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2562
2575
|
yield result, operation if block_given?
|
2563
|
-
|
2576
|
+
throw :response, result
|
2564
2577
|
end
|
2565
2578
|
rescue ::Gapic::Rest::Error => e
|
2566
2579
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2667,7 +2680,7 @@ module Google
|
|
2667
2680
|
@app_platform_stub.update_processor request, options do |result, operation|
|
2668
2681
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2669
2682
|
yield result, operation if block_given?
|
2670
|
-
|
2683
|
+
throw :response, result
|
2671
2684
|
end
|
2672
2685
|
rescue ::Gapic::Rest::Error => e
|
2673
2686
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2768,7 +2781,7 @@ module Google
|
|
2768
2781
|
@app_platform_stub.delete_processor request, options do |result, operation|
|
2769
2782
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2770
2783
|
yield result, operation if block_given?
|
2771
|
-
|
2784
|
+
throw :response, result
|
2772
2785
|
end
|
2773
2786
|
rescue ::Gapic::Rest::Error => e
|
2774
2787
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2816,6 +2829,13 @@ module Google
|
|
2816
2829
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
2817
2830
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
2818
2831
|
# * (`nil`) indicating no credentials
|
2832
|
+
#
|
2833
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
2834
|
+
# external source for authentication to Google Cloud, you must validate it before
|
2835
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
2836
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
2837
|
+
# For more information, refer to [Validate credential configurations from external
|
2838
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
2819
2839
|
# @return [::Object]
|
2820
2840
|
# @!attribute [rw] scope
|
2821
2841
|
# The OAuth scopes
|
@@ -2848,6 +2868,11 @@ module Google
|
|
2848
2868
|
# default endpoint URL. The default value of nil uses the environment
|
2849
2869
|
# universe (usually the default "googleapis.com" universe).
|
2850
2870
|
# @return [::String,nil]
|
2871
|
+
# @!attribute [rw] logger
|
2872
|
+
# A custom logger to use for request/response debug logging, or the value
|
2873
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2874
|
+
# explicitly disable logging.
|
2875
|
+
# @return [::Logger,:default,nil]
|
2851
2876
|
#
|
2852
2877
|
class Configuration
|
2853
2878
|
extend ::Gapic::Config
|
@@ -2869,6 +2894,7 @@ module Google
|
|
2869
2894
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2870
2895
|
config_attr :quota_project, nil, ::String, nil
|
2871
2896
|
config_attr :universe_domain, nil, ::String, nil
|
2897
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2872
2898
|
|
2873
2899
|
# @private
|
2874
2900
|
def initialize parent_config = nil
|
@@ -115,14 +115,6 @@ module Google
|
|
115
115
|
# Lists operations that match the specified filter in the request. If the
|
116
116
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
117
117
|
#
|
118
|
-
# NOTE: the `name` binding allows API services to override the binding
|
119
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
120
|
-
# override the binding, API services can add a binding such as
|
121
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
122
|
-
# For backwards compatibility, the default name includes the operations
|
123
|
-
# collection id, however overriding users must ensure the name binding
|
124
|
-
# is the parent resource, without the operations collection id.
|
125
|
-
#
|
126
118
|
# @overload list_operations(request, options = nil)
|
127
119
|
# Pass arguments to `list_operations` via a request object, either of type
|
128
120
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -204,7 +196,7 @@ module Google
|
|
204
196
|
@operations_stub.list_operations request, options do |result, operation|
|
205
197
|
result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
|
206
198
|
yield result, operation if block_given?
|
207
|
-
|
199
|
+
throw :response, result
|
208
200
|
end
|
209
201
|
rescue ::Gapic::Rest::Error => e
|
210
202
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -293,7 +285,7 @@ module Google
|
|
293
285
|
@operations_stub.get_operation request, options do |result, operation|
|
294
286
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
295
287
|
yield result, operation if block_given?
|
296
|
-
|
288
|
+
throw :response, result
|
297
289
|
end
|
298
290
|
rescue ::Gapic::Rest::Error => e
|
299
291
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -375,7 +367,6 @@ module Google
|
|
375
367
|
|
376
368
|
@operations_stub.delete_operation request, options do |result, operation|
|
377
369
|
yield result, operation if block_given?
|
378
|
-
return result
|
379
370
|
end
|
380
371
|
rescue ::Gapic::Rest::Error => e
|
381
372
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -390,8 +381,9 @@ module Google
|
|
390
381
|
# other methods to check whether the cancellation succeeded or whether the
|
391
382
|
# operation completed despite cancellation. On successful cancellation,
|
392
383
|
# the operation is not deleted; instead, it becomes an operation with
|
393
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
394
|
-
# corresponding to
|
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`.
|
395
387
|
#
|
396
388
|
# @overload cancel_operation(request, options = nil)
|
397
389
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -463,7 +455,6 @@ module Google
|
|
463
455
|
|
464
456
|
@operations_stub.cancel_operation request, options do |result, operation|
|
465
457
|
yield result, operation if block_given?
|
466
|
-
return result
|
467
458
|
end
|
468
459
|
rescue ::Gapic::Rest::Error => e
|
469
460
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -511,6 +502,13 @@ module Google
|
|
511
502
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
512
503
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
513
504
|
# * (`nil`) indicating no credentials
|
505
|
+
#
|
506
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
507
|
+
# external source for authentication to Google Cloud, you must validate it before
|
508
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
509
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
510
|
+
# For more information, refer to [Validate credential configurations from external
|
511
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
514
512
|
# @return [::Object]
|
515
513
|
# @!attribute [rw] scope
|
516
514
|
# The OAuth scopes
|
@@ -543,6 +541,11 @@ module Google
|
|
543
541
|
# default endpoint URL. The default value of nil uses the environment
|
544
542
|
# universe (usually the default "googleapis.com" universe).
|
545
543
|
# @return [::String,nil]
|
544
|
+
# @!attribute [rw] logger
|
545
|
+
# A custom logger to use for request/response debug logging, or the value
|
546
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
547
|
+
# explicitly disable logging.
|
548
|
+
# @return [::Logger,:default,nil]
|
546
549
|
#
|
547
550
|
class Configuration
|
548
551
|
extend ::Gapic::Config
|
@@ -564,6 +567,7 @@ module Google
|
|
564
567
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
565
568
|
config_attr :quota_project, nil, ::String, nil
|
566
569
|
config_attr :universe_domain, nil, ::String, nil
|
570
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
567
571
|
|
568
572
|
# @private
|
569
573
|
def initialize parent_config = nil
|
@@ -683,16 +687,18 @@ module Google
|
|
683
687
|
|
684
688
|
response = @client_stub.make_http_request(
|
685
689
|
verb,
|
686
|
-
uri:
|
687
|
-
body:
|
688
|
-
params:
|
690
|
+
uri: uri,
|
691
|
+
body: body || "",
|
692
|
+
params: query_string_params,
|
693
|
+
method_name: "list_operations",
|
689
694
|
options: options
|
690
695
|
)
|
691
696
|
operation = ::Gapic::Rest::TransportOperation.new response
|
692
697
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
693
|
-
|
694
|
-
|
695
|
-
|
698
|
+
catch :response do
|
699
|
+
yield result, operation if block_given?
|
700
|
+
result
|
701
|
+
end
|
696
702
|
end
|
697
703
|
|
698
704
|
##
|
@@ -721,16 +727,18 @@ module Google
|
|
721
727
|
|
722
728
|
response = @client_stub.make_http_request(
|
723
729
|
verb,
|
724
|
-
uri:
|
725
|
-
body:
|
726
|
-
params:
|
730
|
+
uri: uri,
|
731
|
+
body: body || "",
|
732
|
+
params: query_string_params,
|
733
|
+
method_name: "get_operation",
|
727
734
|
options: options
|
728
735
|
)
|
729
736
|
operation = ::Gapic::Rest::TransportOperation.new response
|
730
737
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
731
|
-
|
732
|
-
|
733
|
-
|
738
|
+
catch :response do
|
739
|
+
yield result, operation if block_given?
|
740
|
+
result
|
741
|
+
end
|
734
742
|
end
|
735
743
|
|
736
744
|
##
|
@@ -759,16 +767,18 @@ module Google
|
|
759
767
|
|
760
768
|
response = @client_stub.make_http_request(
|
761
769
|
verb,
|
762
|
-
uri:
|
763
|
-
body:
|
764
|
-
params:
|
770
|
+
uri: uri,
|
771
|
+
body: body || "",
|
772
|
+
params: query_string_params,
|
773
|
+
method_name: "delete_operation",
|
765
774
|
options: options
|
766
775
|
)
|
767
776
|
operation = ::Gapic::Rest::TransportOperation.new response
|
768
777
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
769
|
-
|
770
|
-
|
771
|
-
|
778
|
+
catch :response do
|
779
|
+
yield result, operation if block_given?
|
780
|
+
result
|
781
|
+
end
|
772
782
|
end
|
773
783
|
|
774
784
|
##
|
@@ -797,16 +807,18 @@ module Google
|
|
797
807
|
|
798
808
|
response = @client_stub.make_http_request(
|
799
809
|
verb,
|
800
|
-
uri:
|
801
|
-
body:
|
802
|
-
params:
|
810
|
+
uri: uri,
|
811
|
+
body: body || "",
|
812
|
+
params: query_string_params,
|
813
|
+
method_name: "cancel_operation",
|
803
814
|
options: options
|
804
815
|
)
|
805
816
|
operation = ::Gapic::Rest::TransportOperation.new response
|
806
817
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
807
|
-
|
808
|
-
|
809
|
-
|
818
|
+
catch :response do
|
819
|
+
yield result, operation if block_given?
|
820
|
+
result
|
821
|
+
end
|
810
822
|
end
|
811
823
|
|
812
824
|
##
|