google-cloud-location 0.8.1 → 0.9.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/lib/google/cloud/location/locations/client.rb +28 -3
- data/lib/google/cloud/location/locations/rest/client.rb +28 -3
- data/lib/google/cloud/location/locations/rest/service_stub.rb +30 -14
- data/lib/google/cloud/location/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- 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: 8b6365018d7007304ce5e7034e6272aa3b9a5b7d76105c0b20cd00ad4ed23190
|
4
|
+
data.tar.gz: a889a9a14ffd8a50b9afcea16d17f2c9f9e0e1d7e3e06d041c7c96a97795ecdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33beef6339443a4506e70c72a8371c1845b3784ff4ad7395ce31b66759a608331ff7d42d015e63481539090b3f621ba8d6fe738e4be1ae8d83a2271649e78fd3
|
7
|
+
data.tar.gz: 6549f1d9f29f231834bc4e7cececf770d0f932faa745a06fa303c3053d1c5ac98da4247450f039eaaafd8cc55adcc078a72a0d3960bcdd20b7efbc48ade0c818
|
@@ -156,8 +156,28 @@ module Google
|
|
156
156
|
universe_domain: @config.universe_domain,
|
157
157
|
channel_args: @config.channel_args,
|
158
158
|
interceptors: @config.interceptors,
|
159
|
-
channel_pool_config: @config.channel_pool
|
159
|
+
channel_pool_config: @config.channel_pool,
|
160
|
+
logger: @config.logger
|
160
161
|
)
|
162
|
+
|
163
|
+
@locations_stub.stub_logger&.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
|
+
end
|
173
|
+
|
174
|
+
##
|
175
|
+
# The logger used for request/response debug logging.
|
176
|
+
#
|
177
|
+
# @return [Logger]
|
178
|
+
#
|
179
|
+
def logger
|
180
|
+
@locations_stub.logger
|
161
181
|
end
|
162
182
|
|
163
183
|
# Service calls
|
@@ -253,7 +273,7 @@ module Google
|
|
253
273
|
@locations_stub.call_rpc :list_locations, request, options: options do |response, operation|
|
254
274
|
response = ::Gapic::PagedEnumerable.new @locations_stub, :list_locations, request, response, operation, options
|
255
275
|
yield response, operation if block_given?
|
256
|
-
|
276
|
+
throw :response, response
|
257
277
|
end
|
258
278
|
rescue ::GRPC::BadStatus => e
|
259
279
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -339,7 +359,6 @@ module Google
|
|
339
359
|
|
340
360
|
@locations_stub.call_rpc :get_location, request, options: options do |response, operation|
|
341
361
|
yield response, operation if block_given?
|
342
|
-
return response
|
343
362
|
end
|
344
363
|
rescue ::GRPC::BadStatus => e
|
345
364
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -428,6 +447,11 @@ module Google
|
|
428
447
|
# default endpoint URL. The default value of nil uses the environment
|
429
448
|
# universe (usually the default "googleapis.com" universe).
|
430
449
|
# @return [::String,nil]
|
450
|
+
# @!attribute [rw] logger
|
451
|
+
# A custom logger to use for request/response debug logging, or the value
|
452
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
453
|
+
# explicitly disable logging.
|
454
|
+
# @return [::Logger,:default,nil]
|
431
455
|
#
|
432
456
|
class Configuration
|
433
457
|
extend ::Gapic::Config
|
@@ -452,6 +476,7 @@ module Google
|
|
452
476
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
453
477
|
config_attr :quota_project, nil, ::String, nil
|
454
478
|
config_attr :universe_domain, nil, ::String, nil
|
479
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
455
480
|
|
456
481
|
# @private
|
457
482
|
def initialize parent_config = nil
|
@@ -149,8 +149,28 @@ module Google
|
|
149
149
|
endpoint: @config.endpoint,
|
150
150
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
151
151
|
universe_domain: @config.universe_domain,
|
152
|
-
credentials: credentials
|
152
|
+
credentials: credentials,
|
153
|
+
logger: @config.logger
|
153
154
|
)
|
155
|
+
|
156
|
+
@locations_stub.logger(stub: true)&.info do |entry|
|
157
|
+
entry.set_system_name
|
158
|
+
entry.set_service
|
159
|
+
entry.message = "Created client for #{entry.service}"
|
160
|
+
entry.set_credentials_fields credentials
|
161
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
162
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
163
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# The logger used for request/response debug logging.
|
169
|
+
#
|
170
|
+
# @return [Logger]
|
171
|
+
#
|
172
|
+
def logger
|
173
|
+
@locations_stub.logger
|
154
174
|
end
|
155
175
|
|
156
176
|
# Service calls
|
@@ -241,7 +261,7 @@ module Google
|
|
241
261
|
@locations_stub.list_locations request, options, bindings_override: bindings_override do |result, operation|
|
242
262
|
result = ::Gapic::Rest::PagedEnumerable.new @locations_stub, :list_locations, "locations", request, result, options
|
243
263
|
yield result, operation if block_given?
|
244
|
-
|
264
|
+
throw :response, result
|
245
265
|
end
|
246
266
|
rescue ::Gapic::Rest::Error => e
|
247
267
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -322,7 +342,6 @@ module Google
|
|
322
342
|
|
323
343
|
@locations_stub.get_location request, options, bindings_override: bindings_override do |result, operation|
|
324
344
|
yield result, operation if block_given?
|
325
|
-
return result
|
326
345
|
end
|
327
346
|
rescue ::Gapic::Rest::Error => e
|
328
347
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -402,6 +421,11 @@ module Google
|
|
402
421
|
# default endpoint URL. The default value of nil uses the environment
|
403
422
|
# universe (usually the default "googleapis.com" universe).
|
404
423
|
# @return [::String,nil]
|
424
|
+
# @!attribute [rw] logger
|
425
|
+
# A custom logger to use for request/response debug logging, or the value
|
426
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
427
|
+
# explicitly disable logging.
|
428
|
+
# @return [::Logger,:default,nil]
|
405
429
|
#
|
406
430
|
class Configuration
|
407
431
|
extend ::Gapic::Config
|
@@ -430,6 +454,7 @@ module Google
|
|
430
454
|
# by the host service.
|
431
455
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
432
456
|
config_attr :bindings_override, {}, ::Hash, nil
|
457
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
433
458
|
|
434
459
|
# @private
|
435
460
|
def initialize parent_config = nil
|
@@ -29,7 +29,8 @@ module Google
|
|
29
29
|
# including transcoding, making the REST call, and deserialing the response.
|
30
30
|
#
|
31
31
|
class ServiceStub
|
32
|
-
|
32
|
+
# @private
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
33
34
|
# These require statements are intentionally placed here to initialize
|
34
35
|
# the REST modules only when it's required.
|
35
36
|
require "gapic/rest"
|
@@ -39,7 +40,9 @@ module Google
|
|
39
40
|
universe_domain: universe_domain,
|
40
41
|
credentials: credentials,
|
41
42
|
numeric_enums: true,
|
42
|
-
|
43
|
+
service_name: self.class,
|
44
|
+
raise_faraday_errors: false,
|
45
|
+
logger: logger
|
43
46
|
end
|
44
47
|
|
45
48
|
##
|
@@ -60,6 +63,15 @@ module Google
|
|
60
63
|
@client_stub.endpoint
|
61
64
|
end
|
62
65
|
|
66
|
+
##
|
67
|
+
# The logger used for request/response debug logging.
|
68
|
+
#
|
69
|
+
# @return [Logger]
|
70
|
+
#
|
71
|
+
def logger stub: false
|
72
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
73
|
+
end
|
74
|
+
|
63
75
|
##
|
64
76
|
# Baseline implementation for the list_locations REST call
|
65
77
|
#
|
@@ -88,16 +100,18 @@ module Google
|
|
88
100
|
|
89
101
|
response = @client_stub.make_http_request(
|
90
102
|
verb,
|
91
|
-
uri:
|
92
|
-
body:
|
93
|
-
params:
|
103
|
+
uri: uri,
|
104
|
+
body: body || "",
|
105
|
+
params: query_string_params,
|
106
|
+
method_name: "list_locations",
|
94
107
|
options: options
|
95
108
|
)
|
96
109
|
operation = ::Gapic::Rest::TransportOperation.new response
|
97
110
|
result = ::Google::Cloud::Location::ListLocationsResponse.decode_json response.body, ignore_unknown_fields: true
|
98
|
-
|
99
|
-
|
100
|
-
|
111
|
+
catch :response do
|
112
|
+
yield result, operation if block_given?
|
113
|
+
result
|
114
|
+
end
|
101
115
|
end
|
102
116
|
|
103
117
|
##
|
@@ -128,16 +142,18 @@ module Google
|
|
128
142
|
|
129
143
|
response = @client_stub.make_http_request(
|
130
144
|
verb,
|
131
|
-
uri:
|
132
|
-
body:
|
133
|
-
params:
|
145
|
+
uri: uri,
|
146
|
+
body: body || "",
|
147
|
+
params: query_string_params,
|
148
|
+
method_name: "get_location",
|
134
149
|
options: options
|
135
150
|
)
|
136
151
|
operation = ::Gapic::Rest::TransportOperation.new response
|
137
152
|
result = ::Google::Cloud::Location::Location.decode_json response.body, ignore_unknown_fields: true
|
138
|
-
|
139
|
-
|
140
|
-
|
153
|
+
catch :response do
|
154
|
+
yield result, operation if block_given?
|
155
|
+
result
|
156
|
+
end
|
141
157
|
end
|
142
158
|
|
143
159
|
##
|
@@ -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
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-location
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.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-
|
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
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
|
-
rubygems_version: 3.5.
|
96
|
+
rubygems_version: 3.5.23
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: API Client library for the Locations API
|