google-cloud-api_gateway-v1 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/api_gateway/v1/api_gateway_service/client.rb +46 -16
- data/lib/google/cloud/api_gateway/v1/api_gateway_service/operations.rb +19 -15
- data/lib/google/cloud/api_gateway/v1/api_gateway_service/rest/client.rb +43 -16
- data/lib/google/cloud/api_gateway/v1/api_gateway_service/rest/operations.rb +50 -38
- data/lib/google/cloud/api_gateway/v1/api_gateway_service/rest/service_stub.rb +134 -92
- data/lib/google/cloud/api_gateway/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/longrunning/operations.rb +23 -14
- metadata +6 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e2641a295c554c69a2aa92db49e4dc4ed076b15e9696cbc10d2a2db9fdd7dee
|
4
|
+
data.tar.gz: 2f37d4de18c09d6734e6dbf309530f6ad0b4cf95b66d7950b429c5171e3dbef6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6e0afa3499bde104e4968d1a0bd43667aaa0b272e7ecd13a8a99762f00b26ef6ff487e42b1deb91341962f779aef17cb952761da84ad24adc703f9ca8cc2f84
|
7
|
+
data.tar.gz: 0b6dac4dfd2d681cb7302480d3e9cb1668aea2c462b22478a49d92a186be969398eebcafd1c9a74c395ddb39c5ba73d8f03f1c33d424f69288cd70185cc73a0c
|
data/README.md
CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/api-gateway/)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
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/api_gateway/v1"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
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::ApiGateway::V1::ApiGatewayService::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).
|
76
86
|
|
77
87
|
## Supported Ruby Versions
|
78
88
|
|
79
|
-
This library is supported on Ruby
|
89
|
+
This library is supported on Ruby 3.0+.
|
80
90
|
|
81
91
|
Google provides official support for Ruby versions that are actively supported
|
82
92
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -209,8 +209,19 @@ module Google
|
|
209
209
|
universe_domain: @config.universe_domain,
|
210
210
|
channel_args: @config.channel_args,
|
211
211
|
interceptors: @config.interceptors,
|
212
|
-
channel_pool_config: @config.channel_pool
|
212
|
+
channel_pool_config: @config.channel_pool,
|
213
|
+
logger: @config.logger
|
213
214
|
)
|
215
|
+
|
216
|
+
@api_gateway_service_stub.stub_logger&.info do |entry|
|
217
|
+
entry.set_system_name
|
218
|
+
entry.set_service
|
219
|
+
entry.message = "Created client for #{entry.service}"
|
220
|
+
entry.set_credentials_fields credentials
|
221
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
222
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
223
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
224
|
+
end
|
214
225
|
end
|
215
226
|
|
216
227
|
##
|
@@ -220,6 +231,15 @@ module Google
|
|
220
231
|
#
|
221
232
|
attr_reader :operations_client
|
222
233
|
|
234
|
+
##
|
235
|
+
# The logger used for request/response debug logging.
|
236
|
+
#
|
237
|
+
# @return [Logger]
|
238
|
+
#
|
239
|
+
def logger
|
240
|
+
@api_gateway_service_stub.logger
|
241
|
+
end
|
242
|
+
|
223
243
|
# Service calls
|
224
244
|
|
225
245
|
##
|
@@ -316,7 +336,7 @@ module Google
|
|
316
336
|
@api_gateway_service_stub.call_rpc :list_gateways, request, options: options do |response, operation|
|
317
337
|
response = ::Gapic::PagedEnumerable.new @api_gateway_service_stub, :list_gateways, request, response, operation, options
|
318
338
|
yield response, operation if block_given?
|
319
|
-
|
339
|
+
throw :response, response
|
320
340
|
end
|
321
341
|
rescue ::GRPC::BadStatus => e
|
322
342
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -403,7 +423,6 @@ module Google
|
|
403
423
|
|
404
424
|
@api_gateway_service_stub.call_rpc :get_gateway, request, options: options do |response, operation|
|
405
425
|
yield response, operation if block_given?
|
406
|
-
return response
|
407
426
|
end
|
408
427
|
rescue ::GRPC::BadStatus => e
|
409
428
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -503,7 +522,7 @@ module Google
|
|
503
522
|
@api_gateway_service_stub.call_rpc :create_gateway, request, options: options do |response, operation|
|
504
523
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
505
524
|
yield response, operation if block_given?
|
506
|
-
|
525
|
+
throw :response, response
|
507
526
|
end
|
508
527
|
rescue ::GRPC::BadStatus => e
|
509
528
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -603,7 +622,7 @@ module Google
|
|
603
622
|
@api_gateway_service_stub.call_rpc :update_gateway, request, options: options do |response, operation|
|
604
623
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
605
624
|
yield response, operation if block_given?
|
606
|
-
|
625
|
+
throw :response, response
|
607
626
|
end
|
608
627
|
rescue ::GRPC::BadStatus => e
|
609
628
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -698,7 +717,7 @@ module Google
|
|
698
717
|
@api_gateway_service_stub.call_rpc :delete_gateway, request, options: options do |response, operation|
|
699
718
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
700
719
|
yield response, operation if block_given?
|
701
|
-
|
720
|
+
throw :response, response
|
702
721
|
end
|
703
722
|
rescue ::GRPC::BadStatus => e
|
704
723
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -798,7 +817,7 @@ module Google
|
|
798
817
|
@api_gateway_service_stub.call_rpc :list_apis, request, options: options do |response, operation|
|
799
818
|
response = ::Gapic::PagedEnumerable.new @api_gateway_service_stub, :list_apis, request, response, operation, options
|
800
819
|
yield response, operation if block_given?
|
801
|
-
|
820
|
+
throw :response, response
|
802
821
|
end
|
803
822
|
rescue ::GRPC::BadStatus => e
|
804
823
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -885,7 +904,6 @@ module Google
|
|
885
904
|
|
886
905
|
@api_gateway_service_stub.call_rpc :get_api, request, options: options do |response, operation|
|
887
906
|
yield response, operation if block_given?
|
888
|
-
return response
|
889
907
|
end
|
890
908
|
rescue ::GRPC::BadStatus => e
|
891
909
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -985,7 +1003,7 @@ module Google
|
|
985
1003
|
@api_gateway_service_stub.call_rpc :create_api, request, options: options do |response, operation|
|
986
1004
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
987
1005
|
yield response, operation if block_given?
|
988
|
-
|
1006
|
+
throw :response, response
|
989
1007
|
end
|
990
1008
|
rescue ::GRPC::BadStatus => e
|
991
1009
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1085,7 +1103,7 @@ module Google
|
|
1085
1103
|
@api_gateway_service_stub.call_rpc :update_api, request, options: options do |response, operation|
|
1086
1104
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1087
1105
|
yield response, operation if block_given?
|
1088
|
-
|
1106
|
+
throw :response, response
|
1089
1107
|
end
|
1090
1108
|
rescue ::GRPC::BadStatus => e
|
1091
1109
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1180,7 +1198,7 @@ module Google
|
|
1180
1198
|
@api_gateway_service_stub.call_rpc :delete_api, request, options: options do |response, operation|
|
1181
1199
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1182
1200
|
yield response, operation if block_given?
|
1183
|
-
|
1201
|
+
throw :response, response
|
1184
1202
|
end
|
1185
1203
|
rescue ::GRPC::BadStatus => e
|
1186
1204
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1280,7 +1298,7 @@ module Google
|
|
1280
1298
|
@api_gateway_service_stub.call_rpc :list_api_configs, request, options: options do |response, operation|
|
1281
1299
|
response = ::Gapic::PagedEnumerable.new @api_gateway_service_stub, :list_api_configs, request, response, operation, options
|
1282
1300
|
yield response, operation if block_given?
|
1283
|
-
|
1301
|
+
throw :response, response
|
1284
1302
|
end
|
1285
1303
|
rescue ::GRPC::BadStatus => e
|
1286
1304
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1370,7 +1388,6 @@ module Google
|
|
1370
1388
|
|
1371
1389
|
@api_gateway_service_stub.call_rpc :get_api_config, request, options: options do |response, operation|
|
1372
1390
|
yield response, operation if block_given?
|
1373
|
-
return response
|
1374
1391
|
end
|
1375
1392
|
rescue ::GRPC::BadStatus => e
|
1376
1393
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1470,7 +1487,7 @@ module Google
|
|
1470
1487
|
@api_gateway_service_stub.call_rpc :create_api_config, request, options: options do |response, operation|
|
1471
1488
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1472
1489
|
yield response, operation if block_given?
|
1473
|
-
|
1490
|
+
throw :response, response
|
1474
1491
|
end
|
1475
1492
|
rescue ::GRPC::BadStatus => e
|
1476
1493
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1570,7 +1587,7 @@ module Google
|
|
1570
1587
|
@api_gateway_service_stub.call_rpc :update_api_config, request, options: options do |response, operation|
|
1571
1588
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1572
1589
|
yield response, operation if block_given?
|
1573
|
-
|
1590
|
+
throw :response, response
|
1574
1591
|
end
|
1575
1592
|
rescue ::GRPC::BadStatus => e
|
1576
1593
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1665,7 +1682,7 @@ module Google
|
|
1665
1682
|
@api_gateway_service_stub.call_rpc :delete_api_config, request, options: options do |response, operation|
|
1666
1683
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1667
1684
|
yield response, operation if block_given?
|
1668
|
-
|
1685
|
+
throw :response, response
|
1669
1686
|
end
|
1670
1687
|
rescue ::GRPC::BadStatus => e
|
1671
1688
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1715,6 +1732,13 @@ module Google
|
|
1715
1732
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1716
1733
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1717
1734
|
# * (`nil`) indicating no credentials
|
1735
|
+
#
|
1736
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1737
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1738
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1739
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1740
|
+
# For more information, refer to [Validate credential configurations from external
|
1741
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
1718
1742
|
# @return [::Object]
|
1719
1743
|
# @!attribute [rw] scope
|
1720
1744
|
# The OAuth scopes
|
@@ -1754,6 +1778,11 @@ module Google
|
|
1754
1778
|
# default endpoint URL. The default value of nil uses the environment
|
1755
1779
|
# universe (usually the default "googleapis.com" universe).
|
1756
1780
|
# @return [::String,nil]
|
1781
|
+
# @!attribute [rw] logger
|
1782
|
+
# A custom logger to use for request/response debug logging, or the value
|
1783
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1784
|
+
# explicitly disable logging.
|
1785
|
+
# @return [::Logger,:default,nil]
|
1757
1786
|
#
|
1758
1787
|
class Configuration
|
1759
1788
|
extend ::Gapic::Config
|
@@ -1778,6 +1807,7 @@ module Google
|
|
1778
1807
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1779
1808
|
config_attr :quota_project, nil, ::String, nil
|
1780
1809
|
config_attr :universe_domain, nil, ::String, nil
|
1810
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1781
1811
|
|
1782
1812
|
# @private
|
1783
1813
|
def initialize parent_config = nil
|
@@ -124,14 +124,6 @@ module Google
|
|
124
124
|
# Lists operations that match the specified filter in the request. If the
|
125
125
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
126
126
|
#
|
127
|
-
# NOTE: the `name` binding allows API services to override the binding
|
128
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
129
|
-
# override the binding, API services can add a binding such as
|
130
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
131
|
-
# For backwards compatibility, the default name includes the operations
|
132
|
-
# collection id, however overriding users must ensure the name binding
|
133
|
-
# is the parent resource, without the operations collection id.
|
134
|
-
#
|
135
127
|
# @overload list_operations(request, options = nil)
|
136
128
|
# Pass arguments to `list_operations` via a request object, either of type
|
137
129
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -221,7 +213,7 @@ module Google
|
|
221
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
222
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
223
215
|
yield response, operation if block_given?
|
224
|
-
|
216
|
+
throw :response, response
|
225
217
|
end
|
226
218
|
rescue ::GRPC::BadStatus => e
|
227
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -317,7 +309,7 @@ module Google
|
|
317
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
318
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
319
311
|
yield response, operation if block_given?
|
320
|
-
|
312
|
+
throw :response, response
|
321
313
|
end
|
322
314
|
rescue ::GRPC::BadStatus => e
|
323
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -406,7 +398,6 @@ module Google
|
|
406
398
|
|
407
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
408
400
|
yield response, operation if block_given?
|
409
|
-
return response
|
410
401
|
end
|
411
402
|
rescue ::GRPC::BadStatus => e
|
412
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -421,8 +412,9 @@ module Google
|
|
421
412
|
# other methods to check whether the cancellation succeeded or whether the
|
422
413
|
# operation completed despite cancellation. On successful cancellation,
|
423
414
|
# the operation is not deleted; instead, it becomes an operation with
|
424
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
425
|
-
# corresponding to
|
415
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
416
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
417
|
+
# `Code.CANCELLED`.
|
426
418
|
#
|
427
419
|
# @overload cancel_operation(request, options = nil)
|
428
420
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -501,7 +493,6 @@ module Google
|
|
501
493
|
|
502
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
503
495
|
yield response, operation if block_given?
|
504
|
-
return response
|
505
496
|
end
|
506
497
|
rescue ::GRPC::BadStatus => e
|
507
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -599,7 +590,7 @@ module Google
|
|
599
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
600
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
601
592
|
yield response, operation if block_given?
|
602
|
-
|
593
|
+
throw :response, response
|
603
594
|
end
|
604
595
|
rescue ::GRPC::BadStatus => e
|
605
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -649,6 +640,13 @@ module Google
|
|
649
640
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
650
641
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
651
642
|
# * (`nil`) indicating no credentials
|
643
|
+
#
|
644
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
645
|
+
# external source for authentication to Google Cloud, you must validate it before
|
646
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
647
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
648
|
+
# For more information, refer to [Validate credential configurations from external
|
649
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
652
650
|
# @return [::Object]
|
653
651
|
# @!attribute [rw] scope
|
654
652
|
# The OAuth scopes
|
@@ -688,6 +686,11 @@ module Google
|
|
688
686
|
# default endpoint URL. The default value of nil uses the environment
|
689
687
|
# universe (usually the default "googleapis.com" universe).
|
690
688
|
# @return [::String,nil]
|
689
|
+
# @!attribute [rw] logger
|
690
|
+
# A custom logger to use for request/response debug logging, or the value
|
691
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
692
|
+
# explicitly disable logging.
|
693
|
+
# @return [::Logger,:default,nil]
|
691
694
|
#
|
692
695
|
class Configuration
|
693
696
|
extend ::Gapic::Config
|
@@ -712,6 +715,7 @@ module Google
|
|
712
715
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
713
716
|
config_attr :quota_project, nil, ::String, nil
|
714
717
|
config_attr :universe_domain, nil, ::String, nil
|
718
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
715
719
|
|
716
720
|
# @private
|
717
721
|
def initialize parent_config = nil
|
@@ -202,8 +202,19 @@ module Google
|
|
202
202
|
endpoint: @config.endpoint,
|
203
203
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
204
204
|
universe_domain: @config.universe_domain,
|
205
|
-
credentials: credentials
|
205
|
+
credentials: credentials,
|
206
|
+
logger: @config.logger
|
206
207
|
)
|
208
|
+
|
209
|
+
@api_gateway_service_stub.logger(stub: true)&.info do |entry|
|
210
|
+
entry.set_system_name
|
211
|
+
entry.set_service
|
212
|
+
entry.message = "Created client for #{entry.service}"
|
213
|
+
entry.set_credentials_fields credentials
|
214
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
215
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
216
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
217
|
+
end
|
207
218
|
end
|
208
219
|
|
209
220
|
##
|
@@ -213,6 +224,15 @@ module Google
|
|
213
224
|
#
|
214
225
|
attr_reader :operations_client
|
215
226
|
|
227
|
+
##
|
228
|
+
# The logger used for request/response debug logging.
|
229
|
+
#
|
230
|
+
# @return [Logger]
|
231
|
+
#
|
232
|
+
def logger
|
233
|
+
@api_gateway_service_stub.logger
|
234
|
+
end
|
235
|
+
|
216
236
|
# Service calls
|
217
237
|
|
218
238
|
##
|
@@ -301,7 +321,6 @@ module Google
|
|
301
321
|
|
302
322
|
@api_gateway_service_stub.list_gateways request, options do |result, operation|
|
303
323
|
yield result, operation if block_given?
|
304
|
-
return result
|
305
324
|
end
|
306
325
|
rescue ::Gapic::Rest::Error => e
|
307
326
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -381,7 +400,6 @@ module Google
|
|
381
400
|
|
382
401
|
@api_gateway_service_stub.get_gateway request, options do |result, operation|
|
383
402
|
yield result, operation if block_given?
|
384
|
-
return result
|
385
403
|
end
|
386
404
|
rescue ::Gapic::Rest::Error => e
|
387
405
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -474,7 +492,7 @@ module Google
|
|
474
492
|
@api_gateway_service_stub.create_gateway request, options do |result, operation|
|
475
493
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
476
494
|
yield result, operation if block_given?
|
477
|
-
|
495
|
+
throw :response, result
|
478
496
|
end
|
479
497
|
rescue ::Gapic::Rest::Error => e
|
480
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -567,7 +585,7 @@ module Google
|
|
567
585
|
@api_gateway_service_stub.update_gateway request, options do |result, operation|
|
568
586
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
569
587
|
yield result, operation if block_given?
|
570
|
-
|
588
|
+
throw :response, result
|
571
589
|
end
|
572
590
|
rescue ::Gapic::Rest::Error => e
|
573
591
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -655,7 +673,7 @@ module Google
|
|
655
673
|
@api_gateway_service_stub.delete_gateway request, options do |result, operation|
|
656
674
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
657
675
|
yield result, operation if block_given?
|
658
|
-
|
676
|
+
throw :response, result
|
659
677
|
end
|
660
678
|
rescue ::Gapic::Rest::Error => e
|
661
679
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -747,7 +765,6 @@ module Google
|
|
747
765
|
|
748
766
|
@api_gateway_service_stub.list_apis request, options do |result, operation|
|
749
767
|
yield result, operation if block_given?
|
750
|
-
return result
|
751
768
|
end
|
752
769
|
rescue ::Gapic::Rest::Error => e
|
753
770
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -827,7 +844,6 @@ module Google
|
|
827
844
|
|
828
845
|
@api_gateway_service_stub.get_api request, options do |result, operation|
|
829
846
|
yield result, operation if block_given?
|
830
|
-
return result
|
831
847
|
end
|
832
848
|
rescue ::Gapic::Rest::Error => e
|
833
849
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -920,7 +936,7 @@ module Google
|
|
920
936
|
@api_gateway_service_stub.create_api request, options do |result, operation|
|
921
937
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
922
938
|
yield result, operation if block_given?
|
923
|
-
|
939
|
+
throw :response, result
|
924
940
|
end
|
925
941
|
rescue ::Gapic::Rest::Error => e
|
926
942
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1013,7 +1029,7 @@ module Google
|
|
1013
1029
|
@api_gateway_service_stub.update_api request, options do |result, operation|
|
1014
1030
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1015
1031
|
yield result, operation if block_given?
|
1016
|
-
|
1032
|
+
throw :response, result
|
1017
1033
|
end
|
1018
1034
|
rescue ::Gapic::Rest::Error => e
|
1019
1035
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1101,7 +1117,7 @@ module Google
|
|
1101
1117
|
@api_gateway_service_stub.delete_api request, options do |result, operation|
|
1102
1118
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1103
1119
|
yield result, operation if block_given?
|
1104
|
-
|
1120
|
+
throw :response, result
|
1105
1121
|
end
|
1106
1122
|
rescue ::Gapic::Rest::Error => e
|
1107
1123
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1193,7 +1209,6 @@ module Google
|
|
1193
1209
|
|
1194
1210
|
@api_gateway_service_stub.list_api_configs request, options do |result, operation|
|
1195
1211
|
yield result, operation if block_given?
|
1196
|
-
return result
|
1197
1212
|
end
|
1198
1213
|
rescue ::Gapic::Rest::Error => e
|
1199
1214
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1276,7 +1291,6 @@ module Google
|
|
1276
1291
|
|
1277
1292
|
@api_gateway_service_stub.get_api_config request, options do |result, operation|
|
1278
1293
|
yield result, operation if block_given?
|
1279
|
-
return result
|
1280
1294
|
end
|
1281
1295
|
rescue ::Gapic::Rest::Error => e
|
1282
1296
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1369,7 +1383,7 @@ module Google
|
|
1369
1383
|
@api_gateway_service_stub.create_api_config request, options do |result, operation|
|
1370
1384
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1371
1385
|
yield result, operation if block_given?
|
1372
|
-
|
1386
|
+
throw :response, result
|
1373
1387
|
end
|
1374
1388
|
rescue ::Gapic::Rest::Error => e
|
1375
1389
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1462,7 +1476,7 @@ module Google
|
|
1462
1476
|
@api_gateway_service_stub.update_api_config request, options do |result, operation|
|
1463
1477
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1464
1478
|
yield result, operation if block_given?
|
1465
|
-
|
1479
|
+
throw :response, result
|
1466
1480
|
end
|
1467
1481
|
rescue ::Gapic::Rest::Error => e
|
1468
1482
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1550,7 +1564,7 @@ module Google
|
|
1550
1564
|
@api_gateway_service_stub.delete_api_config request, options do |result, operation|
|
1551
1565
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1552
1566
|
yield result, operation if block_given?
|
1553
|
-
|
1567
|
+
throw :response, result
|
1554
1568
|
end
|
1555
1569
|
rescue ::Gapic::Rest::Error => e
|
1556
1570
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1598,6 +1612,13 @@ module Google
|
|
1598
1612
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1599
1613
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1600
1614
|
# * (`nil`) indicating no credentials
|
1615
|
+
#
|
1616
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1617
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1618
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1619
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1620
|
+
# For more information, refer to [Validate credential configurations from external
|
1621
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
1601
1622
|
# @return [::Object]
|
1602
1623
|
# @!attribute [rw] scope
|
1603
1624
|
# The OAuth scopes
|
@@ -1630,6 +1651,11 @@ module Google
|
|
1630
1651
|
# default endpoint URL. The default value of nil uses the environment
|
1631
1652
|
# universe (usually the default "googleapis.com" universe).
|
1632
1653
|
# @return [::String,nil]
|
1654
|
+
# @!attribute [rw] logger
|
1655
|
+
# A custom logger to use for request/response debug logging, or the value
|
1656
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1657
|
+
# explicitly disable logging.
|
1658
|
+
# @return [::Logger,:default,nil]
|
1633
1659
|
#
|
1634
1660
|
class Configuration
|
1635
1661
|
extend ::Gapic::Config
|
@@ -1651,6 +1677,7 @@ module Google
|
|
1651
1677
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1652
1678
|
config_attr :quota_project, nil, ::String, nil
|
1653
1679
|
config_attr :universe_domain, nil, ::String, nil
|
1680
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1654
1681
|
|
1655
1682
|
# @private
|
1656
1683
|
def initialize parent_config = nil
|