google-cloud-service_directory-v1beta1 0.15.2 → 0.17.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/service_directory/v1beta1/lookup_service/client.rb +35 -2
- data/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/client.rb +35 -2
- data/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub.rb +22 -8
- data/lib/google/cloud/service_directory/v1beta1/registration_service/client.rb +38 -19
- data/lib/google/cloud/service_directory/v1beta1/registration_service/rest/client.rb +38 -19
- data/lib/google/cloud/service_directory/v1beta1/registration_service/rest/service_stub.rb +158 -110
- data/lib/google/cloud/service_directory/v1beta1/version.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1beta1/endpoint_pb.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1beta1/lookup_service_pb.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1beta1/namespace_pb.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1beta1/registration_service_pb.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1beta1/service_pb.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- 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: c51a9dc9a1f2b3bbb3b6bec129ca64f26d6edd630d02ebcaf35388d7374e4d1c
|
4
|
+
data.tar.gz: ce6ae8c730b40490db12225016335c13e0d64b2cbbf87244f23146465aa6ac92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f93a9c3438fe7ce48965fdba1674364063647c7d43510645b8ceaaab3b0b88a8454d2f357d75b2da35ec51c8546178c91f1dd1dbff73509da82b437a04c3512
|
7
|
+
data.tar.gz: e434007aab7913f27c7dbbbe73add591e7edfa6815f3938978f0cc8061d6fc88ff6ba59aed44ef44554738b14f4882f8e54ff6d9c51f1b2d8cfc420d294d0286
|
data/README.md
CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/service-directory)
|
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/service_directory/v1beta1"
|
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::ServiceDirectory::V1beta1::LookupService::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
|
@@ -163,14 +163,26 @@ module Google
|
|
163
163
|
universe_domain: @config.universe_domain,
|
164
164
|
channel_args: @config.channel_args,
|
165
165
|
interceptors: @config.interceptors,
|
166
|
-
channel_pool_config: @config.channel_pool
|
166
|
+
channel_pool_config: @config.channel_pool,
|
167
|
+
logger: @config.logger
|
167
168
|
)
|
168
169
|
|
170
|
+
@lookup_service_stub.stub_logger&.info do |entry|
|
171
|
+
entry.set_system_name
|
172
|
+
entry.set_service
|
173
|
+
entry.message = "Created client for #{entry.service}"
|
174
|
+
entry.set_credentials_fields credentials
|
175
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
176
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
177
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
178
|
+
end
|
179
|
+
|
169
180
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
170
181
|
config.credentials = credentials
|
171
182
|
config.quota_project = @quota_project_id
|
172
183
|
config.endpoint = @lookup_service_stub.endpoint
|
173
184
|
config.universe_domain = @lookup_service_stub.universe_domain
|
185
|
+
config.logger = @lookup_service_stub.logger if config.respond_to? :logger=
|
174
186
|
end
|
175
187
|
end
|
176
188
|
|
@@ -181,6 +193,15 @@ module Google
|
|
181
193
|
#
|
182
194
|
attr_reader :location_client
|
183
195
|
|
196
|
+
##
|
197
|
+
# The logger used for request/response debug logging.
|
198
|
+
#
|
199
|
+
# @return [Logger]
|
200
|
+
#
|
201
|
+
def logger
|
202
|
+
@lookup_service_stub.logger
|
203
|
+
end
|
204
|
+
|
184
205
|
# Service calls
|
185
206
|
|
186
207
|
##
|
@@ -306,7 +327,6 @@ module Google
|
|
306
327
|
|
307
328
|
@lookup_service_stub.call_rpc :resolve_service, request, options: options do |response, operation|
|
308
329
|
yield response, operation if block_given?
|
309
|
-
return response
|
310
330
|
end
|
311
331
|
rescue ::GRPC::BadStatus => e
|
312
332
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -356,6 +376,13 @@ module Google
|
|
356
376
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
357
377
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
358
378
|
# * (`nil`) indicating no credentials
|
379
|
+
#
|
380
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
381
|
+
# external source for authentication to Google Cloud, you must validate it before
|
382
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
383
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
384
|
+
# For more information, refer to [Validate credential configurations from external
|
385
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
359
386
|
# @return [::Object]
|
360
387
|
# @!attribute [rw] scope
|
361
388
|
# The OAuth scopes
|
@@ -395,6 +422,11 @@ module Google
|
|
395
422
|
# default endpoint URL. The default value of nil uses the environment
|
396
423
|
# universe (usually the default "googleapis.com" universe).
|
397
424
|
# @return [::String,nil]
|
425
|
+
# @!attribute [rw] logger
|
426
|
+
# A custom logger to use for request/response debug logging, or the value
|
427
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
428
|
+
# explicitly disable logging.
|
429
|
+
# @return [::Logger,:default,nil]
|
398
430
|
#
|
399
431
|
class Configuration
|
400
432
|
extend ::Gapic::Config
|
@@ -419,6 +451,7 @@ module Google
|
|
419
451
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
420
452
|
config_attr :quota_project, nil, ::String, nil
|
421
453
|
config_attr :universe_domain, nil, ::String, nil
|
454
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
422
455
|
|
423
456
|
# @private
|
424
457
|
def initialize parent_config = nil
|
@@ -156,15 +156,27 @@ module Google
|
|
156
156
|
endpoint: @config.endpoint,
|
157
157
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
158
158
|
universe_domain: @config.universe_domain,
|
159
|
-
credentials: credentials
|
159
|
+
credentials: credentials,
|
160
|
+
logger: @config.logger
|
160
161
|
)
|
161
162
|
|
163
|
+
@lookup_service_stub.logger(stub: true)&.info do |entry|
|
164
|
+
entry.set_system_name
|
165
|
+
entry.set_service
|
166
|
+
entry.message = "Created client for #{entry.service}"
|
167
|
+
entry.set_credentials_fields credentials
|
168
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
169
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
170
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
171
|
+
end
|
172
|
+
|
162
173
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
163
174
|
config.credentials = credentials
|
164
175
|
config.quota_project = @quota_project_id
|
165
176
|
config.endpoint = @lookup_service_stub.endpoint
|
166
177
|
config.universe_domain = @lookup_service_stub.universe_domain
|
167
178
|
config.bindings_override = @config.bindings_override
|
179
|
+
config.logger = @lookup_service_stub.logger if config.respond_to? :logger=
|
168
180
|
end
|
169
181
|
end
|
170
182
|
|
@@ -175,6 +187,15 @@ module Google
|
|
175
187
|
#
|
176
188
|
attr_reader :location_client
|
177
189
|
|
190
|
+
##
|
191
|
+
# The logger used for request/response debug logging.
|
192
|
+
#
|
193
|
+
# @return [Logger]
|
194
|
+
#
|
195
|
+
def logger
|
196
|
+
@lookup_service_stub.logger
|
197
|
+
end
|
198
|
+
|
178
199
|
# Service calls
|
179
200
|
|
180
201
|
##
|
@@ -293,7 +314,6 @@ module Google
|
|
293
314
|
|
294
315
|
@lookup_service_stub.resolve_service request, options do |result, operation|
|
295
316
|
yield result, operation if block_given?
|
296
|
-
return result
|
297
317
|
end
|
298
318
|
rescue ::Gapic::Rest::Error => e
|
299
319
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -341,6 +361,13 @@ module Google
|
|
341
361
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
342
362
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
343
363
|
# * (`nil`) indicating no credentials
|
364
|
+
#
|
365
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
366
|
+
# external source for authentication to Google Cloud, you must validate it before
|
367
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
368
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
369
|
+
# For more information, refer to [Validate credential configurations from external
|
370
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
344
371
|
# @return [::Object]
|
345
372
|
# @!attribute [rw] scope
|
346
373
|
# The OAuth scopes
|
@@ -373,6 +400,11 @@ module Google
|
|
373
400
|
# default endpoint URL. The default value of nil uses the environment
|
374
401
|
# universe (usually the default "googleapis.com" universe).
|
375
402
|
# @return [::String,nil]
|
403
|
+
# @!attribute [rw] logger
|
404
|
+
# A custom logger to use for request/response debug logging, or the value
|
405
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
406
|
+
# explicitly disable logging.
|
407
|
+
# @return [::Logger,:default,nil]
|
376
408
|
#
|
377
409
|
class Configuration
|
378
410
|
extend ::Gapic::Config
|
@@ -401,6 +433,7 @@ module Google
|
|
401
433
|
# by the host service.
|
402
434
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
403
435
|
config_attr :bindings_override, {}, ::Hash, nil
|
436
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
404
437
|
|
405
438
|
# @private
|
406
439
|
def initialize parent_config = nil
|
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the resolve_service REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "resolve_service",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -177,14 +177,26 @@ module Google
|
|
177
177
|
universe_domain: @config.universe_domain,
|
178
178
|
channel_args: @config.channel_args,
|
179
179
|
interceptors: @config.interceptors,
|
180
|
-
channel_pool_config: @config.channel_pool
|
180
|
+
channel_pool_config: @config.channel_pool,
|
181
|
+
logger: @config.logger
|
181
182
|
)
|
182
183
|
|
184
|
+
@registration_service_stub.stub_logger&.info do |entry|
|
185
|
+
entry.set_system_name
|
186
|
+
entry.set_service
|
187
|
+
entry.message = "Created client for #{entry.service}"
|
188
|
+
entry.set_credentials_fields credentials
|
189
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
190
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
191
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
192
|
+
end
|
193
|
+
|
183
194
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
184
195
|
config.credentials = credentials
|
185
196
|
config.quota_project = @quota_project_id
|
186
197
|
config.endpoint = @registration_service_stub.endpoint
|
187
198
|
config.universe_domain = @registration_service_stub.universe_domain
|
199
|
+
config.logger = @registration_service_stub.logger if config.respond_to? :logger=
|
188
200
|
end
|
189
201
|
end
|
190
202
|
|
@@ -195,6 +207,15 @@ module Google
|
|
195
207
|
#
|
196
208
|
attr_reader :location_client
|
197
209
|
|
210
|
+
##
|
211
|
+
# The logger used for request/response debug logging.
|
212
|
+
#
|
213
|
+
# @return [Logger]
|
214
|
+
#
|
215
|
+
def logger
|
216
|
+
@registration_service_stub.logger
|
217
|
+
end
|
218
|
+
|
198
219
|
# Service calls
|
199
220
|
|
200
221
|
##
|
@@ -288,7 +309,6 @@ module Google
|
|
288
309
|
|
289
310
|
@registration_service_stub.call_rpc :create_namespace, request, options: options do |response, operation|
|
290
311
|
yield response, operation if block_given?
|
291
|
-
return response
|
292
312
|
end
|
293
313
|
rescue ::GRPC::BadStatus => e
|
294
314
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -427,7 +447,7 @@ module Google
|
|
427
447
|
@registration_service_stub.call_rpc :list_namespaces, request, options: options do |response, operation|
|
428
448
|
response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_namespaces, request, response, operation, options
|
429
449
|
yield response, operation if block_given?
|
430
|
-
|
450
|
+
throw :response, response
|
431
451
|
end
|
432
452
|
rescue ::GRPC::BadStatus => e
|
433
453
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -513,7 +533,6 @@ module Google
|
|
513
533
|
|
514
534
|
@registration_service_stub.call_rpc :get_namespace, request, options: options do |response, operation|
|
515
535
|
yield response, operation if block_given?
|
516
|
-
return response
|
517
536
|
end
|
518
537
|
rescue ::GRPC::BadStatus => e
|
519
538
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -601,7 +620,6 @@ module Google
|
|
601
620
|
|
602
621
|
@registration_service_stub.call_rpc :update_namespace, request, options: options do |response, operation|
|
603
622
|
yield response, operation if block_given?
|
604
|
-
return response
|
605
623
|
end
|
606
624
|
rescue ::GRPC::BadStatus => e
|
607
625
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -688,7 +706,6 @@ module Google
|
|
688
706
|
|
689
707
|
@registration_service_stub.call_rpc :delete_namespace, request, options: options do |response, operation|
|
690
708
|
yield response, operation if block_given?
|
691
|
-
return response
|
692
709
|
end
|
693
710
|
rescue ::GRPC::BadStatus => e
|
694
711
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -784,7 +801,6 @@ module Google
|
|
784
801
|
|
785
802
|
@registration_service_stub.call_rpc :create_service, request, options: options do |response, operation|
|
786
803
|
yield response, operation if block_given?
|
787
|
-
return response
|
788
804
|
end
|
789
805
|
rescue ::GRPC::BadStatus => e
|
790
806
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -926,7 +942,7 @@ module Google
|
|
926
942
|
@registration_service_stub.call_rpc :list_services, request, options: options do |response, operation|
|
927
943
|
response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_services, request, response, operation, options
|
928
944
|
yield response, operation if block_given?
|
929
|
-
|
945
|
+
throw :response, response
|
930
946
|
end
|
931
947
|
rescue ::GRPC::BadStatus => e
|
932
948
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1012,7 +1028,6 @@ module Google
|
|
1012
1028
|
|
1013
1029
|
@registration_service_stub.call_rpc :get_service, request, options: options do |response, operation|
|
1014
1030
|
yield response, operation if block_given?
|
1015
|
-
return response
|
1016
1031
|
end
|
1017
1032
|
rescue ::GRPC::BadStatus => e
|
1018
1033
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1100,7 +1115,6 @@ module Google
|
|
1100
1115
|
|
1101
1116
|
@registration_service_stub.call_rpc :update_service, request, options: options do |response, operation|
|
1102
1117
|
yield response, operation if block_given?
|
1103
|
-
return response
|
1104
1118
|
end
|
1105
1119
|
rescue ::GRPC::BadStatus => e
|
1106
1120
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1187,7 +1201,6 @@ module Google
|
|
1187
1201
|
|
1188
1202
|
@registration_service_stub.call_rpc :delete_service, request, options: options do |response, operation|
|
1189
1203
|
yield response, operation if block_given?
|
1190
|
-
return response
|
1191
1204
|
end
|
1192
1205
|
rescue ::GRPC::BadStatus => e
|
1193
1206
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1283,7 +1296,6 @@ module Google
|
|
1283
1296
|
|
1284
1297
|
@registration_service_stub.call_rpc :create_endpoint, request, options: options do |response, operation|
|
1285
1298
|
yield response, operation if block_given?
|
1286
|
-
return response
|
1287
1299
|
end
|
1288
1300
|
rescue ::GRPC::BadStatus => e
|
1289
1301
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1427,7 +1439,7 @@ module Google
|
|
1427
1439
|
@registration_service_stub.call_rpc :list_endpoints, request, options: options do |response, operation|
|
1428
1440
|
response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_endpoints, request, response, operation, options
|
1429
1441
|
yield response, operation if block_given?
|
1430
|
-
|
1442
|
+
throw :response, response
|
1431
1443
|
end
|
1432
1444
|
rescue ::GRPC::BadStatus => e
|
1433
1445
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1513,7 +1525,6 @@ module Google
|
|
1513
1525
|
|
1514
1526
|
@registration_service_stub.call_rpc :get_endpoint, request, options: options do |response, operation|
|
1515
1527
|
yield response, operation if block_given?
|
1516
|
-
return response
|
1517
1528
|
end
|
1518
1529
|
rescue ::GRPC::BadStatus => e
|
1519
1530
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1601,7 +1612,6 @@ module Google
|
|
1601
1612
|
|
1602
1613
|
@registration_service_stub.call_rpc :update_endpoint, request, options: options do |response, operation|
|
1603
1614
|
yield response, operation if block_given?
|
1604
|
-
return response
|
1605
1615
|
end
|
1606
1616
|
rescue ::GRPC::BadStatus => e
|
1607
1617
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1687,7 +1697,6 @@ module Google
|
|
1687
1697
|
|
1688
1698
|
@registration_service_stub.call_rpc :delete_endpoint, request, options: options do |response, operation|
|
1689
1699
|
yield response, operation if block_given?
|
1690
|
-
return response
|
1691
1700
|
end
|
1692
1701
|
rescue ::GRPC::BadStatus => e
|
1693
1702
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1777,7 +1786,6 @@ module Google
|
|
1777
1786
|
|
1778
1787
|
@registration_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
1779
1788
|
yield response, operation if block_given?
|
1780
|
-
return response
|
1781
1789
|
end
|
1782
1790
|
rescue ::GRPC::BadStatus => e
|
1783
1791
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1875,7 +1883,6 @@ module Google
|
|
1875
1883
|
|
1876
1884
|
@registration_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
1877
1885
|
yield response, operation if block_given?
|
1878
|
-
return response
|
1879
1886
|
end
|
1880
1887
|
rescue ::GRPC::BadStatus => e
|
1881
1888
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1968,7 +1975,6 @@ module Google
|
|
1968
1975
|
|
1969
1976
|
@registration_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
1970
1977
|
yield response, operation if block_given?
|
1971
|
-
return response
|
1972
1978
|
end
|
1973
1979
|
rescue ::GRPC::BadStatus => e
|
1974
1980
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2018,6 +2024,13 @@ module Google
|
|
2018
2024
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2019
2025
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2020
2026
|
# * (`nil`) indicating no credentials
|
2027
|
+
#
|
2028
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
2029
|
+
# external source for authentication to Google Cloud, you must validate it before
|
2030
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
2031
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
2032
|
+
# For more information, refer to [Validate credential configurations from external
|
2033
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
2021
2034
|
# @return [::Object]
|
2022
2035
|
# @!attribute [rw] scope
|
2023
2036
|
# The OAuth scopes
|
@@ -2057,6 +2070,11 @@ module Google
|
|
2057
2070
|
# default endpoint URL. The default value of nil uses the environment
|
2058
2071
|
# universe (usually the default "googleapis.com" universe).
|
2059
2072
|
# @return [::String,nil]
|
2073
|
+
# @!attribute [rw] logger
|
2074
|
+
# A custom logger to use for request/response debug logging, or the value
|
2075
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2076
|
+
# explicitly disable logging.
|
2077
|
+
# @return [::Logger,:default,nil]
|
2060
2078
|
#
|
2061
2079
|
class Configuration
|
2062
2080
|
extend ::Gapic::Config
|
@@ -2081,6 +2099,7 @@ module Google
|
|
2081
2099
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2082
2100
|
config_attr :quota_project, nil, ::String, nil
|
2083
2101
|
config_attr :universe_domain, nil, ::String, nil
|
2102
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2084
2103
|
|
2085
2104
|
# @private
|
2086
2105
|
def initialize parent_config = nil
|