google-cloud-location 0.3.0 → 0.5.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 +6 -8
- data/lib/google/cloud/location/locations/rest/client.rb +10 -10
- data/lib/google/cloud/location/locations/rest/service_stub.rb +8 -6
- data/lib/google/cloud/location/locations_pb.rb +25 -21
- data/lib/google/cloud/location/version.rb +1 -1
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/protobuf/any.rb +7 -4
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ad1ecacee48e1a9588bf6fe72b46d21c1097fafa9c64f276d1a6a2c5bc92f22
|
4
|
+
data.tar.gz: 66f2eb303b3d44967dc90d7b6e055e4da5132f21c85c69474dbe99331c71c62a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b39ea0831662917ac289045cd61175fb846216c07fbea1d03aead976a46e6eba3c91c961a72898a22ac05a49a958e74c70feb0f0b91051bf3c8803da20070065
|
7
|
+
data.tar.gz: 23a129d8954e6a5bfe1b1e9b71f4da78881b06b9e0e4df614fbacc68ed294f27bd1225dc0c7f2152bd427d7db933a7c00d33403131310e092c0139ce59d14564
|
@@ -190,13 +190,11 @@ module Google
|
|
190
190
|
# # Call the list_locations method.
|
191
191
|
# result = client.list_locations request
|
192
192
|
#
|
193
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
194
|
-
# #
|
195
|
-
#
|
196
|
-
# # methods are also available for managing paging directly.
|
197
|
-
# result.each do |response|
|
193
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
194
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
195
|
+
# result.each do |item|
|
198
196
|
# # Each element is of type ::Google::Cloud::Location::Location.
|
199
|
-
# p
|
197
|
+
# p item
|
200
198
|
# end
|
201
199
|
#
|
202
200
|
def list_locations request, options = nil
|
@@ -364,9 +362,9 @@ module Google
|
|
364
362
|
# * (`String`) The path to a service account key file in JSON format
|
365
363
|
# * (`Hash`) A service account key as a Hash
|
366
364
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
367
|
-
# (see the [googleauth docs](https://
|
365
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
368
366
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
369
|
-
# (see the [signet docs](https://
|
367
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
370
368
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
371
369
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
372
370
|
# * (`nil`) indicating no credentials
|
@@ -160,9 +160,9 @@ module Google
|
|
160
160
|
# The standard list page size.
|
161
161
|
# @param page_token [::String]
|
162
162
|
# The standard list page token.
|
163
|
-
# @yield [result,
|
163
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
164
164
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Location::Location>]
|
165
|
-
# @yieldparam
|
165
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
166
166
|
#
|
167
167
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Location::Location>]
|
168
168
|
#
|
@@ -196,9 +196,9 @@ module Google
|
|
196
196
|
|
197
197
|
bindings_override = @config.bindings_override["google.cloud.location.Locations.ListLocations"]
|
198
198
|
|
199
|
-
@locations_stub.list_locations request, options, bindings_override: bindings_override do |result,
|
199
|
+
@locations_stub.list_locations request, options, bindings_override: bindings_override do |result, operation|
|
200
200
|
result = ::Gapic::Rest::PagedEnumerable.new @locations_stub, :list_locations, "locations", request, result, options
|
201
|
-
yield result,
|
201
|
+
yield result, operation if block_given?
|
202
202
|
return result
|
203
203
|
end
|
204
204
|
rescue ::Gapic::Rest::Error => e
|
@@ -225,9 +225,9 @@ module Google
|
|
225
225
|
#
|
226
226
|
# @param name [::String]
|
227
227
|
# Resource name for the location.
|
228
|
-
# @yield [result,
|
228
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
229
229
|
# @yieldparam result [::Google::Cloud::Location::Location]
|
230
|
-
# @yieldparam
|
230
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
231
231
|
#
|
232
232
|
# @return [::Google::Cloud::Location::Location]
|
233
233
|
#
|
@@ -261,8 +261,8 @@ module Google
|
|
261
261
|
|
262
262
|
bindings_override = @config.bindings_override["google.cloud.location.Locations.GetLocation"]
|
263
263
|
|
264
|
-
@locations_stub.get_location request, options, bindings_override: bindings_override do |result,
|
265
|
-
yield result,
|
264
|
+
@locations_stub.get_location request, options, bindings_override: bindings_override do |result, operation|
|
265
|
+
yield result, operation if block_given?
|
266
266
|
return result
|
267
267
|
end
|
268
268
|
rescue ::Gapic::Rest::Error => e
|
@@ -307,9 +307,9 @@ module Google
|
|
307
307
|
# * (`String`) The path to a service account key file in JSON format
|
308
308
|
# * (`Hash`) A service account key as a Hash
|
309
309
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
310
|
-
# (see the [googleauth docs](https://
|
310
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
311
311
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
312
|
-
# (see the [signet docs](https://
|
312
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
313
313
|
# * (`nil`) indicating no credentials
|
314
314
|
# @return [::Object]
|
315
315
|
# @!attribute [rw] scope
|
@@ -49,9 +49,9 @@ module Google
|
|
49
49
|
# @param bindings_override [::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil]
|
50
50
|
# Binding overrides for the transcoding. Only used internally.
|
51
51
|
#
|
52
|
-
# @yield [result,
|
52
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
53
53
|
# @yieldparam result [::Google::Cloud::Location::ListLocationsResponse]
|
54
|
-
# @yieldparam
|
54
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
55
55
|
#
|
56
56
|
# @return [::Google::Cloud::Location::ListLocationsResponse]
|
57
57
|
# A result object deserialized from the server's reply
|
@@ -72,9 +72,10 @@ module Google
|
|
72
72
|
params: query_string_params,
|
73
73
|
options: options
|
74
74
|
)
|
75
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
75
76
|
result = ::Google::Cloud::Location::ListLocationsResponse.decode_json response.body, ignore_unknown_fields: true
|
76
77
|
|
77
|
-
yield result,
|
78
|
+
yield result, operation if block_given?
|
78
79
|
result
|
79
80
|
end
|
80
81
|
|
@@ -88,9 +89,9 @@ module Google
|
|
88
89
|
# @param bindings_override [::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil]
|
89
90
|
# Binding overrides for the transcoding. Only used internally.
|
90
91
|
#
|
91
|
-
# @yield [result,
|
92
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
92
93
|
# @yieldparam result [::Google::Cloud::Location::Location]
|
93
|
-
# @yieldparam
|
94
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
94
95
|
#
|
95
96
|
# @return [::Google::Cloud::Location::Location]
|
96
97
|
# A result object deserialized from the server's reply
|
@@ -111,9 +112,10 @@ module Google
|
|
111
112
|
params: query_string_params,
|
112
113
|
options: options
|
113
114
|
)
|
115
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
114
116
|
result = ::Google::Cloud::Location::Location.decode_json response.body, ignore_unknown_fields: true
|
115
117
|
|
116
|
-
yield result,
|
118
|
+
yield result, operation if block_given?
|
117
119
|
result
|
118
120
|
end
|
119
121
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/location/locations.proto
|
3
4
|
|
@@ -7,29 +8,32 @@ require 'google/api/annotations_pb'
|
|
7
8
|
require 'google/protobuf/any_pb'
|
8
9
|
require 'google/api/client_pb'
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
11
|
+
|
12
|
+
descriptor_data = "\n%google/cloud/location/locations.proto\x12\x15google.cloud.location\x1a\x1cgoogle/api/annotations.proto\x1a\x19google/protobuf/any.proto\x1a\x17google/api/client.proto\"[\n\x14ListLocationsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"d\n\x15ListLocationsResponse\x12\x32\n\tlocations\x18\x01 \x03(\x0b\x32\x1f.google.cloud.location.Location\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\"\n\x12GetLocationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xd7\x01\n\x08Location\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12;\n\x06labels\x18\x02 \x03(\x0b\x32+.google.cloud.location.Location.LabelsEntry\x12&\n\x08metadata\x18\x03 \x01(\x0b\x32\x14.google.protobuf.Any\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xa4\x03\n\tLocations\x12\xab\x01\n\rListLocations\x12+.google.cloud.location.ListLocationsRequest\x1a,.google.cloud.location.ListLocationsResponse\"?\x82\xd3\xe4\x93\x02\x39\x12\x14/v1/{name=locations}Z!\x12\x1f/v1/{name=projects/*}/locations\x12\x9e\x01\n\x0bGetLocation\x12).google.cloud.location.GetLocationRequest\x1a\x1f.google.cloud.location.Location\"C\x82\xd3\xe4\x93\x02=\x12\x16/v1/{name=locations/*}Z#\x12!/v1/{name=projects/*/locations/*}\x1aH\xca\x41\x14\x63loud.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBo\n\x19\x63om.google.cloud.locationB\x0eLocationsProtoP\x01Z=google.golang.org/genproto/googleapis/cloud/location;location\xf8\x01\x01\x62\x06proto3"
|
13
|
+
|
14
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
15
|
+
|
16
|
+
begin
|
17
|
+
pool.add_serialized_file(descriptor_data)
|
18
|
+
rescue TypeError => e
|
19
|
+
# Compatibility code: will be removed in the next major version.
|
20
|
+
require 'google/protobuf/descriptor_pb'
|
21
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
22
|
+
parsed.clear_dependency
|
23
|
+
serialized = parsed.class.encode(parsed)
|
24
|
+
file = pool.add_serialized_file(serialized)
|
25
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
26
|
+
imports = [
|
27
|
+
["google.protobuf.Any", "google/protobuf/any.proto"],
|
28
|
+
]
|
29
|
+
imports.each do |type_name, expected_filename|
|
30
|
+
import_file = pool.lookup(type_name).file_descriptor
|
31
|
+
if import_file.name != expected_filename
|
32
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
31
33
|
end
|
32
34
|
end
|
35
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
36
|
+
warn "This will become an error in the next major version."
|
33
37
|
end
|
34
38
|
|
35
39
|
module Google
|
@@ -35,7 +35,9 @@ module Google
|
|
35
35
|
# Details about how and where to publish client libraries.
|
36
36
|
# @!attribute [rw] version
|
37
37
|
# @return [::String]
|
38
|
-
# Version of the API to apply these settings to.
|
38
|
+
# Version of the API to apply these settings to. This is the full protobuf
|
39
|
+
# package for the API, ending in the version element.
|
40
|
+
# Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
|
39
41
|
# @!attribute [rw] launch_stage
|
40
42
|
# @return [::Google::Api::LaunchStage]
|
41
43
|
# Launch stage of this version of the API.
|
@@ -81,7 +83,7 @@ module Google
|
|
81
83
|
# long-running operation pattern.
|
82
84
|
# @!attribute [rw] new_issue_uri
|
83
85
|
# @return [::String]
|
84
|
-
# Link to a
|
86
|
+
# Link to a *public* URI where users can report issues. Example:
|
85
87
|
# https://issuetracker.google.com/issues/new?component=190865&template=1161103
|
86
88
|
# @!attribute [rw] documentation_uri
|
87
89
|
# @return [::String]
|
@@ -111,6 +113,10 @@ module Google
|
|
111
113
|
# Client library settings. If the same version string appears multiple
|
112
114
|
# times in this list, then the last one wins. Settings from earlier
|
113
115
|
# settings with the same version string are discarded.
|
116
|
+
# @!attribute [rw] proto_reference_documentation_uri
|
117
|
+
# @return [::String]
|
118
|
+
# Optional link to proto reference documentation. Example:
|
119
|
+
# https://cloud.google.com/pubsub/lite/docs/reference/rpc
|
114
120
|
class Publishing
|
115
121
|
include ::Google::Protobuf::MessageExts
|
116
122
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -203,9 +209,57 @@ module Google
|
|
203
209
|
# @!attribute [rw] common
|
204
210
|
# @return [::Google::Api::CommonLanguageSettings]
|
205
211
|
# Some settings.
|
212
|
+
# @!attribute [rw] renamed_services
|
213
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
214
|
+
# Map from original service names to renamed versions.
|
215
|
+
# This is used when the default generated types
|
216
|
+
# would cause a naming conflict. (Neither name is
|
217
|
+
# fully-qualified.)
|
218
|
+
# Example: Subscriber to SubscriberServiceApi.
|
219
|
+
# @!attribute [rw] renamed_resources
|
220
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
221
|
+
# Map from full resource types to the effective short name
|
222
|
+
# for the resource. This is used when otherwise resource
|
223
|
+
# named from different services would cause naming collisions.
|
224
|
+
# Example entry:
|
225
|
+
# "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
|
226
|
+
# @!attribute [rw] ignored_resources
|
227
|
+
# @return [::Array<::String>]
|
228
|
+
# List of full resource types to ignore during generation.
|
229
|
+
# This is typically used for API-specific Location resources,
|
230
|
+
# which should be handled by the generator as if they were actually
|
231
|
+
# the common Location resources.
|
232
|
+
# Example entry: "documentai.googleapis.com/Location"
|
233
|
+
# @!attribute [rw] forced_namespace_aliases
|
234
|
+
# @return [::Array<::String>]
|
235
|
+
# Namespaces which must be aliased in snippets due to
|
236
|
+
# a known (but non-generator-predictable) naming collision
|
237
|
+
# @!attribute [rw] handwritten_signatures
|
238
|
+
# @return [::Array<::String>]
|
239
|
+
# Method signatures (in the form "service.method(signature)")
|
240
|
+
# which are provided separately, so shouldn't be generated.
|
241
|
+
# Snippets *calling* these methods are still generated, however.
|
206
242
|
class DotnetSettings
|
207
243
|
include ::Google::Protobuf::MessageExts
|
208
244
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
245
|
+
|
246
|
+
# @!attribute [rw] key
|
247
|
+
# @return [::String]
|
248
|
+
# @!attribute [rw] value
|
249
|
+
# @return [::String]
|
250
|
+
class RenamedServicesEntry
|
251
|
+
include ::Google::Protobuf::MessageExts
|
252
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
253
|
+
end
|
254
|
+
|
255
|
+
# @!attribute [rw] key
|
256
|
+
# @return [::String]
|
257
|
+
# @!attribute [rw] value
|
258
|
+
# @return [::String]
|
259
|
+
class RenamedResourcesEntry
|
260
|
+
include ::Google::Protobuf::MessageExts
|
261
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
262
|
+
end
|
209
263
|
end
|
210
264
|
|
211
265
|
# Settings for Ruby client libraries.
|
@@ -240,8 +294,8 @@ module Google
|
|
240
294
|
# Example of a YAML configuration::
|
241
295
|
#
|
242
296
|
# publishing:
|
243
|
-
#
|
244
|
-
# - selector:
|
297
|
+
# method_settings:
|
298
|
+
# - selector: google.cloud.speech.v2.Speech.BatchRecognize
|
245
299
|
# long_running:
|
246
300
|
# initial_poll_delay:
|
247
301
|
# seconds: 60 # 1 minute
|
@@ -299,6 +353,15 @@ module Google
|
|
299
353
|
|
300
354
|
# Street View Org.
|
301
355
|
STREET_VIEW = 4
|
356
|
+
|
357
|
+
# Shopping Org.
|
358
|
+
SHOPPING = 5
|
359
|
+
|
360
|
+
# Geo Org.
|
361
|
+
GEO = 6
|
362
|
+
|
363
|
+
# Generative AI - https://developers.generativeai.google
|
364
|
+
GENERATIVE_AI = 7
|
302
365
|
end
|
303
366
|
|
304
367
|
# To where should client libraries be published?
|
@@ -43,8 +43,12 @@ module Google
|
|
43
43
|
# if (any.is(Foo.class)) {
|
44
44
|
# foo = any.unpack(Foo.class);
|
45
45
|
# }
|
46
|
+
# // or ...
|
47
|
+
# if (any.isSameTypeAs(Foo.getDefaultInstance())) {
|
48
|
+
# foo = any.unpack(Foo.getDefaultInstance());
|
49
|
+
# }
|
46
50
|
#
|
47
|
-
#
|
51
|
+
# Example 3: Pack and unpack a message in Python.
|
48
52
|
#
|
49
53
|
# foo = Foo(...)
|
50
54
|
# any = Any()
|
@@ -54,7 +58,7 @@ module Google
|
|
54
58
|
# any.Unpack(foo)
|
55
59
|
# ...
|
56
60
|
#
|
57
|
-
#
|
61
|
+
# Example 4: Pack and unpack a message in Go
|
58
62
|
#
|
59
63
|
# foo := &pb.Foo{...}
|
60
64
|
# any, err := anypb.New(foo)
|
@@ -73,9 +77,8 @@ module Google
|
|
73
77
|
# in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
74
78
|
# name "y.z".
|
75
79
|
#
|
76
|
-
#
|
77
80
|
# JSON
|
78
|
-
#
|
81
|
+
# ====
|
79
82
|
# The JSON representation of an `Any` value uses the regular
|
80
83
|
# representation of the deserialized, embedded message, with an
|
81
84
|
# additional field `@type` which contains the type URL. Example:
|
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.5.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: 2023-
|
11
|
+
date: 2023-05-31 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.19.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.19.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -50,14 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.26.
|
53
|
+
version: 1.26.3
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 1.26.
|
60
|
+
version: 1.26.3
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: minitest
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|