google-cloud-location 0.4.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed78c960f7659c73efc175194152bd5d618441aebb9a315ba4158225c346470f
4
- data.tar.gz: d278218b9b719e6ec6814bb052a3ee4cf748092007946ccc268c3fd5090dca84
3
+ metadata.gz: 263e927c45db3f3a53ff18879b05fc118ef31d050749cc64d75c081712456562
4
+ data.tar.gz: 20263758aa15afb8299bfd2fda154584a4bd7f0d07e004147bc4b8b2c13956ff
5
5
  SHA512:
6
- metadata.gz: cb69bc2e2b497bcefd641adf648e2340aa3405e21a296c99ea496dd66e50462057a5f39ea5282f14b9b59a1e44f5aaca957d7879512b1ea395c65810f32b0682
7
- data.tar.gz: f827bf1a13ce3c3735ec10a091703b491189b6de670358b49135fc81dd00642741dc6439b1562c25b8f549ff8654bca4fd13a0633de12079757d77316e203bfe
6
+ metadata.gz: 3ace33f3a9838f36047a2d698ed64ed8042d90d9832e1da13ff01d81e3432d8db15ef4bc9a09da11c837f4e8bddc186fbb89730fc516e5827afd0b4013eb1880
7
+ data.tar.gz: 1014849345a7f13a0aea722065e01b09c3c9d45c00000317bbd8921b71d202a2fdb3299f9fe3342e76fc0d3e09a6e5acb67932666bd309a512ecfccdcc04dd04
@@ -122,7 +122,7 @@ module Google
122
122
  credentials = @config.credentials
123
123
  # Use self-signed JWT if the endpoint is unchanged from default,
124
124
  # but only if the default endpoint does not have a region prefix.
125
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
125
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
126
126
  !@config.endpoint.split(".").first.include?("-")
127
127
  credentials ||= Credentials.default scope: @config.scope,
128
128
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -362,9 +362,9 @@ module Google
362
362
  # * (`String`) The path to a service account key file in JSON format
363
363
  # * (`Hash`) A service account key as a Hash
364
364
  # * (`Google::Auth::Credentials`) A googleauth credentials object
365
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
365
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
366
366
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
367
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
367
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
368
368
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
369
369
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
370
370
  # * (`nil`) indicating no credentials
@@ -406,7 +406,9 @@ module Google
406
406
  class Configuration
407
407
  extend ::Gapic::Config
408
408
 
409
- config_attr :endpoint, "cloud.googleapis.com", ::String
409
+ DEFAULT_ENDPOINT = "cloud.googleapis.com"
410
+
411
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
410
412
  config_attr :credentials, nil do |value|
411
413
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
412
414
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -118,7 +118,7 @@ module Google
118
118
  credentials = @config.credentials
119
119
  # Use self-signed JWT if the endpoint is unchanged from default,
120
120
  # but only if the default endpoint does not have a region prefix.
121
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
121
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
122
122
  !@config.endpoint.split(".").first.include?("-")
123
123
  credentials ||= Credentials.default scope: @config.scope,
124
124
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -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://googleapis.dev/ruby/googleauth/latest/index.html))
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://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
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
@@ -342,7 +342,9 @@ module Google
342
342
  class Configuration
343
343
  extend ::Gapic::Config
344
344
 
345
- config_attr :endpoint, "cloud.googleapis.com", ::String
345
+ DEFAULT_ENDPOINT = "cloud.googleapis.com"
346
+
347
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
346
348
  config_attr :credentials, nil do |value|
347
349
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
348
350
  allowed.any? { |klass| klass === value }
@@ -60,7 +60,7 @@ module Google
60
60
 
61
61
  verb, uri, query_string_params, body = ServiceStub.transcode_list_locations_request request_pb, bindings_override: bindings_override
62
62
  query_string_params = if query_string_params.any?
63
- query_string_params.to_h { |p| p.split("=", 2) }
63
+ query_string_params.to_h { |p| p.split "=", 2 }
64
64
  else
65
65
  {}
66
66
  end
@@ -100,7 +100,7 @@ module Google
100
100
 
101
101
  verb, uri, query_string_params, body = ServiceStub.transcode_get_location_request request_pb, bindings_override: bindings_override
102
102
  query_string_params = if query_string_params.any?
103
- query_string_params.to_h { |p| p.split("=", 2) }
103
+ query_string_params.to_h { |p| p.split "=", 2 }
104
104
  else
105
105
  {}
106
106
  end
@@ -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
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("google/cloud/location/locations.proto", :syntax => :proto3) do
12
- add_message "google.cloud.location.ListLocationsRequest" do
13
- optional :name, :string, 1
14
- optional :filter, :string, 2
15
- optional :page_size, :int32, 3
16
- optional :page_token, :string, 4
17
- end
18
- add_message "google.cloud.location.ListLocationsResponse" do
19
- repeated :locations, :message, 1, "google.cloud.location.Location"
20
- optional :next_page_token, :string, 2
21
- end
22
- add_message "google.cloud.location.GetLocationRequest" do
23
- optional :name, :string, 1
24
- end
25
- add_message "google.cloud.location.Location" do
26
- optional :name, :string, 1
27
- optional :location_id, :string, 4
28
- optional :display_name, :string, 5
29
- map :labels, :string, :string, 2
30
- optional :metadata, :message, 3, "google.protobuf.Any"
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
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Location
23
- VERSION = "0.4.0"
23
+ VERSION = "0.5.1"
24
24
  end
25
25
  end
26
26
  end
@@ -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 place that API users can report issues. Example:
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
- # method_behavior:
244
- # - selector: CreateAdDomain
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
- # Example 3: Pack and unpack a message in Python.
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
- # Example 4: Pack and unpack a message in Go
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.0
4
+ version: 0.5.1
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-02-14 00:00:00.000000000 Z
11
+ date: 2023-06-06 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.17.1
19
+ version: 0.19.1
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.17.1
29
+ version: 0.19.1
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.1
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.1
60
+ version: 1.26.3
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement