google-cloud-location 0.5.0 → 0.6.0

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: 0ad1ecacee48e1a9588bf6fe72b46d21c1097fafa9c64f276d1a6a2c5bc92f22
4
- data.tar.gz: 66f2eb303b3d44967dc90d7b6e055e4da5132f21c85c69474dbe99331c71c62a
3
+ metadata.gz: a8f95c228820fa0cccacd1b0b64051018111272a039d9e09e011b986ba67a5cf
4
+ data.tar.gz: 17ccd042d790fd10983b89da3ff7e05fd0a9161b339507a1e4d9873d12d6031a
5
5
  SHA512:
6
- metadata.gz: b39ea0831662917ac289045cd61175fb846216c07fbea1d03aead976a46e6eba3c91c961a72898a22ac05a49a958e74c70feb0f0b91051bf3c8803da20070065
7
- data.tar.gz: 23a129d8954e6a5bfe1b1e9b71f4da78881b06b9e0e4df614fbacc68ed294f27bd1225dc0c7f2152bd427d7db933a7c00d33403131310e092c0139ce59d14564
6
+ metadata.gz: 175a0888c931e828c1b4493a32121bfa59917a61a1c3a7690bee51ed9d60e882853be9e8004836f260d02efca54bb19e9fe470c1dca701eee6f5d2beefee4fb1
7
+ data.tar.gz: 4a0db694ae9daab369e2d6c275ca5ad5493ed07927f9e822cbe87f2281ace7f5f1b6dc933cecf62bcfdca7eaefcfae420d3b5e5ffbd9e2003fd8c3cb19b80fe3
@@ -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
@@ -137,7 +137,8 @@ module Google
137
137
  credentials: credentials,
138
138
  endpoint: @config.endpoint,
139
139
  channel_args: @config.channel_args,
140
- interceptors: @config.interceptors
140
+ interceptors: @config.interceptors,
141
+ channel_pool_config: @config.channel_pool
141
142
  )
142
143
  end
143
144
 
@@ -406,7 +407,9 @@ module Google
406
407
  class Configuration
407
408
  extend ::Gapic::Config
408
409
 
409
- config_attr :endpoint, "cloud.googleapis.com", ::String
410
+ DEFAULT_ENDPOINT = "cloud.googleapis.com"
411
+
412
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
410
413
  config_attr :credentials, nil do |value|
411
414
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
412
415
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -441,6 +444,14 @@ module Google
441
444
  end
442
445
  end
443
446
 
447
+ ##
448
+ # Configuration for the channel pool
449
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
450
+ #
451
+ def channel_pool
452
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
453
+ end
454
+
444
455
  ##
445
456
  # Configuration RPC class for the Locations API.
446
457
  #
@@ -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
@@ -167,6 +167,26 @@ module Google
167
167
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Location::Location>]
168
168
  #
169
169
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
170
+ #
171
+ # @example Basic example
172
+ # require "google/cloud/location"
173
+ #
174
+ # # Create a client object. The client can be reused for multiple calls.
175
+ # client = Google::Cloud::Location::Locations::Rest::Client.new
176
+ #
177
+ # # Create a request. To set request fields, pass in keyword arguments.
178
+ # request = Google::Cloud::Location::ListLocationsRequest.new
179
+ #
180
+ # # Call the list_locations method.
181
+ # result = client.list_locations request
182
+ #
183
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
184
+ # # over elements, and API calls will be issued to fetch pages as needed.
185
+ # result.each do |item|
186
+ # # Each element is of type ::Google::Cloud::Location::Location.
187
+ # p item
188
+ # end
189
+ #
170
190
  def list_locations request, options = nil
171
191
  raise ::ArgumentError, "request must be provided" if request.nil?
172
192
 
@@ -232,6 +252,22 @@ module Google
232
252
  # @return [::Google::Cloud::Location::Location]
233
253
  #
234
254
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
255
+ #
256
+ # @example Basic example
257
+ # require "google/cloud/location"
258
+ #
259
+ # # Create a client object. The client can be reused for multiple calls.
260
+ # client = Google::Cloud::Location::Locations::Rest::Client.new
261
+ #
262
+ # # Create a request. To set request fields, pass in keyword arguments.
263
+ # request = Google::Cloud::Location::GetLocationRequest.new
264
+ #
265
+ # # Call the get_location method.
266
+ # result = client.get_location request
267
+ #
268
+ # # The returned object is of type Google::Cloud::Location::Location.
269
+ # p result
270
+ #
235
271
  def get_location request, options = nil
236
272
  raise ::ArgumentError, "request must be provided" if request.nil?
237
273
 
@@ -342,7 +378,9 @@ module Google
342
378
  class Configuration
343
379
  extend ::Gapic::Config
344
380
 
345
- config_attr :endpoint, "cloud.googleapis.com", ::String
381
+ DEFAULT_ENDPOINT = "cloud.googleapis.com"
382
+
383
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
346
384
  config_attr :credentials, nil do |value|
347
385
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
348
386
  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
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Location
23
- VERSION = "0.5.0"
23
+ VERSION = "0.6.0"
24
24
  end
25
25
  end
26
26
  end
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.5.0
4
+ version: 0.6.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-05-31 00:00:00.000000000 Z
11
+ date: 2023-09-12 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.0
19
+ version: 0.20.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.19.0
29
+ version: 0.20.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  - !ruby/object:Gem::Version
206
206
  version: '0'
207
207
  requirements: []
208
- rubygems_version: 3.4.2
208
+ rubygems_version: 3.4.19
209
209
  signing_key:
210
210
  specification_version: 4
211
211
  summary: API Client library for the Locations API