google-cloud-location 0.3.beta.1 → 0.3.beta.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d91f01afc5e162fb6acf5fbed86b645f1703832e51dab92a65cf56585ad96791
4
- data.tar.gz: 2ea953918c7f1d8429bb906cc705327ec82f1975ba99a5afa0efd1c2416ab87a
3
+ metadata.gz: 024b4e76ec465464831b0d0a7bf112f073af6b876f1b018f943affda9fb968e4
4
+ data.tar.gz: 4018f03d8ca6d9d47b5bb679543a797e2028064a9af0be6d04c1191bd5d46969
5
5
  SHA512:
6
- metadata.gz: 4bdcf798ec2fe4299a48fdfda05e073323c8f4ecdda9037e9f85383a1005e2f300cb5f6e7a1900c8a9215db9bd57ac12d7b69bd8f76a85107bc6032fce7ac659
7
- data.tar.gz: bfa91aea618ca13c9cf930ca356f368f32542c99b131d38aee920d8adc1d253b8cb0c9a88c4cdf730866c26d6bde73237ab7db9b98606af5a3ef196501d795bb
6
+ metadata.gz: a5b67aabc4189ac9715875a454c20db1f6d2303cd5afe83ad565b9cba0efd9695d14f9245e2ee7c671001778dcfe92c104cbb7542a070d60872671e5df8a11f7
7
+ data.tar.gz: b249ed3ea3c938a3a769de8cdf24dd6feea216babeb33c77400218507cf6fbb09f57d47a721ed3754cf1c188ca03317854344cfcac3e90a26d2a0fde28b3d3c3
@@ -194,7 +194,9 @@ module Google
194
194
  metadata: @config.metadata,
195
195
  retry_policy: @config.retry_policy
196
196
 
197
- @locations_stub.list_locations request, options do |result, response|
197
+ bindings_override = @config.bindings_override["google.cloud.location.Locations.ListLocations"]
198
+
199
+ @locations_stub.list_locations request, options, bindings_override: bindings_override do |result, response|
198
200
  result = ::Gapic::Rest::PagedEnumerable.new @locations_stub, :list_locations, "locations", request, result, options
199
201
  yield result, response if block_given?
200
202
  return result
@@ -261,7 +263,9 @@ module Google
261
263
  metadata: @config.metadata,
262
264
  retry_policy: @config.retry_policy
263
265
 
264
- @locations_stub.get_location request, options do |result, response|
266
+ bindings_override = @config.bindings_override["google.cloud.location.Locations.GetLocation"]
267
+
268
+ @locations_stub.get_location request, options, bindings_override: bindings_override do |result, response|
265
269
  yield result, response if block_given?
266
270
  return result
267
271
  end
@@ -359,6 +363,13 @@ module Google
359
363
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
360
364
  config_attr :quota_project, nil, ::String, nil
361
365
 
366
+ # @private
367
+ # Overrides for http bindings for the RPCs of this service
368
+ # are only used when this service is used as mixin, and only
369
+ # by the host service.
370
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
371
+ config_attr :bindings_override, {}, ::Hash, nil
372
+
362
373
  # @private
363
374
  def initialize parent_config = nil
364
375
  @parent_config = parent_config unless parent_config.nil?
@@ -44,6 +44,8 @@ module Google
44
44
  # A request object representing the call parameters. Required.
45
45
  # @param options [::Gapic::CallOptions]
46
46
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
47
+ # @param bindings_override [::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil]
48
+ # Binding overrides for the transcoding. Only used internally.
47
49
  #
48
50
  # @yield [result, response] Access the result along with the Faraday response object
49
51
  # @yieldparam result [::Google::Cloud::Location::ListLocationsResponse]
@@ -51,10 +53,10 @@ module Google
51
53
  #
52
54
  # @return [::Google::Cloud::Location::ListLocationsResponse]
53
55
  # A result object deserialized from the server's reply
54
- def list_locations request_pb, options = nil
56
+ def list_locations request_pb, options = nil, bindings_override: nil
55
57
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
56
58
 
57
- verb, uri, query_string_params, body = ServiceStub.transcode_list_locations_request request_pb
59
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_locations_request request_pb, bindings_override: bindings_override
58
60
  query_string_params = if query_string_params.any?
59
61
  query_string_params.to_h { |p| p.split("=", 2) }
60
62
  else
@@ -81,6 +83,8 @@ module Google
81
83
  # A request object representing the call parameters. Required.
82
84
  # @param options [::Gapic::CallOptions]
83
85
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
86
+ # @param bindings_override [::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil]
87
+ # Binding overrides for the transcoding. Only used internally.
84
88
  #
85
89
  # @yield [result, response] Access the result along with the Faraday response object
86
90
  # @yieldparam result [::Google::Cloud::Location::Location]
@@ -88,10 +92,10 @@ module Google
88
92
  #
89
93
  # @return [::Google::Cloud::Location::Location]
90
94
  # A result object deserialized from the server's reply
91
- def get_location request_pb, options = nil
95
+ def get_location request_pb, options = nil, bindings_override: nil
92
96
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
93
97
 
94
- verb, uri, query_string_params, body = ServiceStub.transcode_get_location_request request_pb
98
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_location_request request_pb, bindings_override: bindings_override
95
99
  query_string_params = if query_string_params.any?
96
100
  query_string_params.to_h { |p| p.split("=", 2) }
97
101
  else
@@ -118,24 +122,27 @@ module Google
118
122
  #
119
123
  # @param request_pb [::Google::Cloud::Location::ListLocationsRequest]
120
124
  # A request object representing the call parameters. Required.
125
+ # @param bindings_override [::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil]
126
+ # Binding overrides for the transcoding.
121
127
  # @return [Array(String, [String, nil], Hash{String => String})]
122
128
  # Uri, Body, Query string parameters
123
- def self.transcode_list_locations_request request_pb
124
- transcoder = Gapic::Rest::GrpcTranscoder.new
125
- .with_bindings(
126
- uri_method: :get,
127
- uri_template: "/v1/{name}",
128
- matches: [
129
- ["name", %r{^locations/?$}, false]
130
- ]
131
- )
132
- .with_bindings(
133
- uri_method: :get,
134
- uri_template: "/v1/{name}/locations",
135
- matches: [
136
- ["name", %r{^projects/[^/]+/?$}, false]
137
- ]
138
- )
129
+ def self.transcode_list_locations_request request_pb, bindings_override: nil
130
+ transcoder = Gapic::Rest::GrpcTranscoder.new(bindings_override) if bindings_override
131
+ transcoder ||= Gapic::Rest::GrpcTranscoder.new
132
+ .with_bindings(
133
+ uri_method: :get,
134
+ uri_template: "/v1/{name}",
135
+ matches: [
136
+ ["name", %r{^locations/?$}, false]
137
+ ]
138
+ )
139
+ .with_bindings(
140
+ uri_method: :get,
141
+ uri_template: "/v1/{name}/locations",
142
+ matches: [
143
+ ["name", %r{^projects/[^/]+/?$}, false]
144
+ ]
145
+ )
139
146
  transcoder.transcode request_pb
140
147
  end
141
148
 
@@ -146,24 +153,27 @@ module Google
146
153
  #
147
154
  # @param request_pb [::Google::Cloud::Location::GetLocationRequest]
148
155
  # A request object representing the call parameters. Required.
156
+ # @param bindings_override [::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil]
157
+ # Binding overrides for the transcoding.
149
158
  # @return [Array(String, [String, nil], Hash{String => String})]
150
159
  # Uri, Body, Query string parameters
151
- def self.transcode_get_location_request request_pb
152
- transcoder = Gapic::Rest::GrpcTranscoder.new
153
- .with_bindings(
154
- uri_method: :get,
155
- uri_template: "/v1/{name}",
156
- matches: [
157
- ["name", %r{^locations/[^/]+/?$}, false]
158
- ]
159
- )
160
- .with_bindings(
161
- uri_method: :get,
162
- uri_template: "/v1/{name}",
163
- matches: [
164
- ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
165
- ]
166
- )
160
+ def self.transcode_get_location_request request_pb, bindings_override: nil
161
+ transcoder = Gapic::Rest::GrpcTranscoder.new(bindings_override) if bindings_override
162
+ transcoder ||= Gapic::Rest::GrpcTranscoder.new
163
+ .with_bindings(
164
+ uri_method: :get,
165
+ uri_template: "/v1/{name}",
166
+ matches: [
167
+ ["name", %r{^locations/[^/]+/?$}, false]
168
+ ]
169
+ )
170
+ .with_bindings(
171
+ uri_method: :get,
172
+ uri_template: "/v1/{name}",
173
+ matches: [
174
+ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
175
+ ]
176
+ )
167
177
  transcoder.transcode request_pb
168
178
  end
169
179
  end
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Location
23
- VERSION = "0.3.beta.1"
23
+ VERSION = "0.3.beta.2"
24
24
  end
25
25
  end
26
26
  end
@@ -29,6 +29,7 @@ module Google
29
29
  # require "google/cloud/location"
30
30
  # client = ::Google::Cloud::Location::Locations::Client.new
31
31
  #
32
+ ##
32
33
  # To load this package, including all its services, and instantiate a REST client:
33
34
  #
34
35
  # @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.3.beta.1
4
+ version: 0.3.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-08 00:00:00.000000000 Z
11
+ date: 2022-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common