google-cloud-bigtable-v2 1.15.1 → 1.17.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/README.md +1 -2
- data/lib/google/bigtable/v2/bigtable_services_pb.rb +1 -1
- data/lib/google/bigtable/v2/data_pb.rb +2 -1
- data/lib/google/bigtable/v2/feature_flags_pb.rb +3 -1
- data/lib/google/cloud/bigtable/v2/bigtable/client.rb +1 -1
- data/lib/google/cloud/bigtable/v2/bigtable/credentials.rb +1 -1
- data/lib/google/cloud/bigtable/v2/bigtable/paths.rb +1 -1
- data/lib/google/cloud/bigtable/v2/bigtable/rest/client.rb +1645 -0
- data/lib/google/cloud/bigtable/v2/bigtable/rest/service_stub.rb +788 -0
- data/lib/google/cloud/bigtable/v2/bigtable/rest.rb +52 -0
- data/lib/google/cloud/bigtable/v2/bigtable.rb +7 -1
- data/lib/google/cloud/bigtable/v2/rest.rb +37 -0
- data/lib/google/cloud/bigtable/v2/version.rb +1 -1
- data/lib/google/cloud/bigtable/v2.rb +6 -1
- data/lib/google-cloud-bigtable-v2.rb +1 -1
- data/proto_docs/google/api/client.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +1 -1
- data/proto_docs/google/api/launch_stage.rb +1 -1
- data/proto_docs/google/api/resource.rb +1 -1
- data/proto_docs/google/api/routing.rb +1 -1
- data/proto_docs/google/bigtable/v2/bigtable.rb +1 -1
- data/proto_docs/google/bigtable/v2/data.rb +24 -1
- data/proto_docs/google/bigtable/v2/feature_flags.rb +5 -1
- data/proto_docs/google/bigtable/v2/peer_info.rb +1 -1
- data/proto_docs/google/bigtable/v2/request_stats.rb +1 -1
- data/proto_docs/google/bigtable/v2/response_params.rb +1 -1
- data/proto_docs/google/bigtable/v2/types.rb +1 -1
- data/proto_docs/google/protobuf/any.rb +1 -1
- data/proto_docs/google/protobuf/duration.rb +1 -1
- data/proto_docs/google/protobuf/timestamp.rb +8 -7
- data/proto_docs/google/protobuf/wrappers.rb +1 -1
- data/proto_docs/google/rpc/status.rb +1 -1
- data/proto_docs/google/type/date.rb +1 -1
- metadata +9 -5
|
@@ -0,0 +1,788 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
require "google/bigtable/v2/bigtable_pb"
|
|
20
|
+
|
|
21
|
+
module Google
|
|
22
|
+
module Cloud
|
|
23
|
+
module Bigtable
|
|
24
|
+
module V2
|
|
25
|
+
module Bigtable
|
|
26
|
+
module Rest
|
|
27
|
+
##
|
|
28
|
+
# REST service stub for the Bigtable service.
|
|
29
|
+
# Service stub contains baseline method implementations
|
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
|
31
|
+
#
|
|
32
|
+
class ServiceStub
|
|
33
|
+
# @private
|
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
|
35
|
+
# These require statements are intentionally placed here to initialize
|
|
36
|
+
# the REST modules only when it's required.
|
|
37
|
+
require "gapic/rest"
|
|
38
|
+
|
|
39
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
40
|
+
endpoint_template: endpoint_template,
|
|
41
|
+
universe_domain: universe_domain,
|
|
42
|
+
credentials: credentials,
|
|
43
|
+
numeric_enums: true,
|
|
44
|
+
service_name: self.class,
|
|
45
|
+
raise_faraday_errors: false,
|
|
46
|
+
logger: logger
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
##
|
|
50
|
+
# The effective universe domain
|
|
51
|
+
#
|
|
52
|
+
# @return [String]
|
|
53
|
+
#
|
|
54
|
+
def universe_domain
|
|
55
|
+
@client_stub.universe_domain
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
##
|
|
59
|
+
# The effective endpoint
|
|
60
|
+
#
|
|
61
|
+
# @return [String]
|
|
62
|
+
#
|
|
63
|
+
def endpoint
|
|
64
|
+
@client_stub.endpoint
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
##
|
|
68
|
+
# The logger used for request/response debug logging.
|
|
69
|
+
#
|
|
70
|
+
# @return [Logger]
|
|
71
|
+
#
|
|
72
|
+
def logger stub: false
|
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
##
|
|
77
|
+
# Baseline implementation for the read_rows REST call
|
|
78
|
+
#
|
|
79
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::ReadRowsRequest]
|
|
80
|
+
# A request object representing the call parameters. Required.
|
|
81
|
+
# @param options [::Gapic::CallOptions]
|
|
82
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
83
|
+
#
|
|
84
|
+
# @yieldparam chunk [::String] The chunk of data received during server streaming.
|
|
85
|
+
#
|
|
86
|
+
# @return [::Gapic::Rest::TransportOperation]
|
|
87
|
+
def read_rows(request_pb, options = nil, &)
|
|
88
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
89
|
+
|
|
90
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_read_rows_request request_pb
|
|
91
|
+
query_string_params = if query_string_params.any?
|
|
92
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
93
|
+
else
|
|
94
|
+
{}
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
response = @client_stub.make_http_request(
|
|
98
|
+
verb,
|
|
99
|
+
uri: uri,
|
|
100
|
+
body: body || "",
|
|
101
|
+
params: query_string_params,
|
|
102
|
+
method_name: "read_rows",
|
|
103
|
+
options: options,
|
|
104
|
+
is_server_streaming: true,
|
|
105
|
+
&
|
|
106
|
+
)
|
|
107
|
+
::Gapic::Rest::TransportOperation.new response
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
##
|
|
111
|
+
# Baseline implementation for the sample_row_keys REST call
|
|
112
|
+
#
|
|
113
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::SampleRowKeysRequest]
|
|
114
|
+
# A request object representing the call parameters. Required.
|
|
115
|
+
# @param options [::Gapic::CallOptions]
|
|
116
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
117
|
+
#
|
|
118
|
+
# @yieldparam chunk [::String] The chunk of data received during server streaming.
|
|
119
|
+
#
|
|
120
|
+
# @return [::Gapic::Rest::TransportOperation]
|
|
121
|
+
def sample_row_keys(request_pb, options = nil, &)
|
|
122
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
123
|
+
|
|
124
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_sample_row_keys_request request_pb
|
|
125
|
+
query_string_params = if query_string_params.any?
|
|
126
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
127
|
+
else
|
|
128
|
+
{}
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
response = @client_stub.make_http_request(
|
|
132
|
+
verb,
|
|
133
|
+
uri: uri,
|
|
134
|
+
body: body || "",
|
|
135
|
+
params: query_string_params,
|
|
136
|
+
method_name: "sample_row_keys",
|
|
137
|
+
options: options,
|
|
138
|
+
is_server_streaming: true,
|
|
139
|
+
&
|
|
140
|
+
)
|
|
141
|
+
::Gapic::Rest::TransportOperation.new response
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
##
|
|
145
|
+
# Baseline implementation for the mutate_row REST call
|
|
146
|
+
#
|
|
147
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::MutateRowRequest]
|
|
148
|
+
# A request object representing the call parameters. Required.
|
|
149
|
+
# @param options [::Gapic::CallOptions]
|
|
150
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
151
|
+
#
|
|
152
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
153
|
+
# @yieldparam result [::Google::Cloud::Bigtable::V2::MutateRowResponse]
|
|
154
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
155
|
+
#
|
|
156
|
+
# @return [::Google::Cloud::Bigtable::V2::MutateRowResponse]
|
|
157
|
+
# A result object deserialized from the server's reply
|
|
158
|
+
def mutate_row request_pb, options = nil
|
|
159
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
160
|
+
|
|
161
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_mutate_row_request request_pb
|
|
162
|
+
query_string_params = if query_string_params.any?
|
|
163
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
164
|
+
else
|
|
165
|
+
{}
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
response = @client_stub.make_http_request(
|
|
169
|
+
verb,
|
|
170
|
+
uri: uri,
|
|
171
|
+
body: body || "",
|
|
172
|
+
params: query_string_params,
|
|
173
|
+
method_name: "mutate_row",
|
|
174
|
+
options: options
|
|
175
|
+
)
|
|
176
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
177
|
+
result = ::Google::Cloud::Bigtable::V2::MutateRowResponse.decode_json response.body, ignore_unknown_fields: true
|
|
178
|
+
catch :response do
|
|
179
|
+
yield result, operation if block_given?
|
|
180
|
+
result
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
##
|
|
185
|
+
# Baseline implementation for the mutate_rows REST call
|
|
186
|
+
#
|
|
187
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::MutateRowsRequest]
|
|
188
|
+
# A request object representing the call parameters. Required.
|
|
189
|
+
# @param options [::Gapic::CallOptions]
|
|
190
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
191
|
+
#
|
|
192
|
+
# @yieldparam chunk [::String] The chunk of data received during server streaming.
|
|
193
|
+
#
|
|
194
|
+
# @return [::Gapic::Rest::TransportOperation]
|
|
195
|
+
def mutate_rows(request_pb, options = nil, &)
|
|
196
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
197
|
+
|
|
198
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_mutate_rows_request request_pb
|
|
199
|
+
query_string_params = if query_string_params.any?
|
|
200
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
201
|
+
else
|
|
202
|
+
{}
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
response = @client_stub.make_http_request(
|
|
206
|
+
verb,
|
|
207
|
+
uri: uri,
|
|
208
|
+
body: body || "",
|
|
209
|
+
params: query_string_params,
|
|
210
|
+
method_name: "mutate_rows",
|
|
211
|
+
options: options,
|
|
212
|
+
is_server_streaming: true,
|
|
213
|
+
&
|
|
214
|
+
)
|
|
215
|
+
::Gapic::Rest::TransportOperation.new response
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
##
|
|
219
|
+
# Baseline implementation for the check_and_mutate_row REST call
|
|
220
|
+
#
|
|
221
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest]
|
|
222
|
+
# A request object representing the call parameters. Required.
|
|
223
|
+
# @param options [::Gapic::CallOptions]
|
|
224
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
225
|
+
#
|
|
226
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
227
|
+
# @yieldparam result [::Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse]
|
|
228
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
229
|
+
#
|
|
230
|
+
# @return [::Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse]
|
|
231
|
+
# A result object deserialized from the server's reply
|
|
232
|
+
def check_and_mutate_row request_pb, options = nil
|
|
233
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
234
|
+
|
|
235
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_check_and_mutate_row_request request_pb
|
|
236
|
+
query_string_params = if query_string_params.any?
|
|
237
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
238
|
+
else
|
|
239
|
+
{}
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
response = @client_stub.make_http_request(
|
|
243
|
+
verb,
|
|
244
|
+
uri: uri,
|
|
245
|
+
body: body || "",
|
|
246
|
+
params: query_string_params,
|
|
247
|
+
method_name: "check_and_mutate_row",
|
|
248
|
+
options: options
|
|
249
|
+
)
|
|
250
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
251
|
+
result = ::Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse.decode_json response.body, ignore_unknown_fields: true
|
|
252
|
+
catch :response do
|
|
253
|
+
yield result, operation if block_given?
|
|
254
|
+
result
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
##
|
|
259
|
+
# Baseline implementation for the ping_and_warm REST call
|
|
260
|
+
#
|
|
261
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::PingAndWarmRequest]
|
|
262
|
+
# A request object representing the call parameters. Required.
|
|
263
|
+
# @param options [::Gapic::CallOptions]
|
|
264
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
265
|
+
#
|
|
266
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
267
|
+
# @yieldparam result [::Google::Cloud::Bigtable::V2::PingAndWarmResponse]
|
|
268
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
269
|
+
#
|
|
270
|
+
# @return [::Google::Cloud::Bigtable::V2::PingAndWarmResponse]
|
|
271
|
+
# A result object deserialized from the server's reply
|
|
272
|
+
def ping_and_warm request_pb, options = nil
|
|
273
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
274
|
+
|
|
275
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_ping_and_warm_request request_pb
|
|
276
|
+
query_string_params = if query_string_params.any?
|
|
277
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
278
|
+
else
|
|
279
|
+
{}
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
response = @client_stub.make_http_request(
|
|
283
|
+
verb,
|
|
284
|
+
uri: uri,
|
|
285
|
+
body: body || "",
|
|
286
|
+
params: query_string_params,
|
|
287
|
+
method_name: "ping_and_warm",
|
|
288
|
+
options: options
|
|
289
|
+
)
|
|
290
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
291
|
+
result = ::Google::Cloud::Bigtable::V2::PingAndWarmResponse.decode_json response.body, ignore_unknown_fields: true
|
|
292
|
+
catch :response do
|
|
293
|
+
yield result, operation if block_given?
|
|
294
|
+
result
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
##
|
|
299
|
+
# Baseline implementation for the read_modify_write_row REST call
|
|
300
|
+
#
|
|
301
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest]
|
|
302
|
+
# A request object representing the call parameters. Required.
|
|
303
|
+
# @param options [::Gapic::CallOptions]
|
|
304
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
305
|
+
#
|
|
306
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
307
|
+
# @yieldparam result [::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse]
|
|
308
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
309
|
+
#
|
|
310
|
+
# @return [::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse]
|
|
311
|
+
# A result object deserialized from the server's reply
|
|
312
|
+
def read_modify_write_row request_pb, options = nil
|
|
313
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
314
|
+
|
|
315
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_read_modify_write_row_request request_pb
|
|
316
|
+
query_string_params = if query_string_params.any?
|
|
317
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
318
|
+
else
|
|
319
|
+
{}
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
response = @client_stub.make_http_request(
|
|
323
|
+
verb,
|
|
324
|
+
uri: uri,
|
|
325
|
+
body: body || "",
|
|
326
|
+
params: query_string_params,
|
|
327
|
+
method_name: "read_modify_write_row",
|
|
328
|
+
options: options
|
|
329
|
+
)
|
|
330
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
331
|
+
result = ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse.decode_json response.body, ignore_unknown_fields: true
|
|
332
|
+
catch :response do
|
|
333
|
+
yield result, operation if block_given?
|
|
334
|
+
result
|
|
335
|
+
end
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
##
|
|
339
|
+
# Baseline implementation for the generate_initial_change_stream_partitions REST call
|
|
340
|
+
#
|
|
341
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest]
|
|
342
|
+
# A request object representing the call parameters. Required.
|
|
343
|
+
# @param options [::Gapic::CallOptions]
|
|
344
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
345
|
+
#
|
|
346
|
+
# @yieldparam chunk [::String] The chunk of data received during server streaming.
|
|
347
|
+
#
|
|
348
|
+
# @return [::Gapic::Rest::TransportOperation]
|
|
349
|
+
def generate_initial_change_stream_partitions(request_pb, options = nil, &)
|
|
350
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
351
|
+
|
|
352
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_generate_initial_change_stream_partitions_request request_pb
|
|
353
|
+
query_string_params = if query_string_params.any?
|
|
354
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
355
|
+
else
|
|
356
|
+
{}
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
response = @client_stub.make_http_request(
|
|
360
|
+
verb,
|
|
361
|
+
uri: uri,
|
|
362
|
+
body: body || "",
|
|
363
|
+
params: query_string_params,
|
|
364
|
+
method_name: "generate_initial_change_stream_partitions",
|
|
365
|
+
options: options,
|
|
366
|
+
is_server_streaming: true,
|
|
367
|
+
&
|
|
368
|
+
)
|
|
369
|
+
::Gapic::Rest::TransportOperation.new response
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
##
|
|
373
|
+
# Baseline implementation for the read_change_stream REST call
|
|
374
|
+
#
|
|
375
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest]
|
|
376
|
+
# A request object representing the call parameters. Required.
|
|
377
|
+
# @param options [::Gapic::CallOptions]
|
|
378
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
379
|
+
#
|
|
380
|
+
# @yieldparam chunk [::String] The chunk of data received during server streaming.
|
|
381
|
+
#
|
|
382
|
+
# @return [::Gapic::Rest::TransportOperation]
|
|
383
|
+
def read_change_stream(request_pb, options = nil, &)
|
|
384
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
385
|
+
|
|
386
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_read_change_stream_request request_pb
|
|
387
|
+
query_string_params = if query_string_params.any?
|
|
388
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
389
|
+
else
|
|
390
|
+
{}
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
response = @client_stub.make_http_request(
|
|
394
|
+
verb,
|
|
395
|
+
uri: uri,
|
|
396
|
+
body: body || "",
|
|
397
|
+
params: query_string_params,
|
|
398
|
+
method_name: "read_change_stream",
|
|
399
|
+
options: options,
|
|
400
|
+
is_server_streaming: true,
|
|
401
|
+
&
|
|
402
|
+
)
|
|
403
|
+
::Gapic::Rest::TransportOperation.new response
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
##
|
|
407
|
+
# Baseline implementation for the prepare_query REST call
|
|
408
|
+
#
|
|
409
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::PrepareQueryRequest]
|
|
410
|
+
# A request object representing the call parameters. Required.
|
|
411
|
+
# @param options [::Gapic::CallOptions]
|
|
412
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
413
|
+
#
|
|
414
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
415
|
+
# @yieldparam result [::Google::Cloud::Bigtable::V2::PrepareQueryResponse]
|
|
416
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
417
|
+
#
|
|
418
|
+
# @return [::Google::Cloud::Bigtable::V2::PrepareQueryResponse]
|
|
419
|
+
# A result object deserialized from the server's reply
|
|
420
|
+
def prepare_query request_pb, options = nil
|
|
421
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
422
|
+
|
|
423
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_prepare_query_request request_pb
|
|
424
|
+
query_string_params = if query_string_params.any?
|
|
425
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
426
|
+
else
|
|
427
|
+
{}
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
response = @client_stub.make_http_request(
|
|
431
|
+
verb,
|
|
432
|
+
uri: uri,
|
|
433
|
+
body: body || "",
|
|
434
|
+
params: query_string_params,
|
|
435
|
+
method_name: "prepare_query",
|
|
436
|
+
options: options
|
|
437
|
+
)
|
|
438
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
439
|
+
result = ::Google::Cloud::Bigtable::V2::PrepareQueryResponse.decode_json response.body, ignore_unknown_fields: true
|
|
440
|
+
catch :response do
|
|
441
|
+
yield result, operation if block_given?
|
|
442
|
+
result
|
|
443
|
+
end
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
##
|
|
447
|
+
# Baseline implementation for the execute_query REST call
|
|
448
|
+
#
|
|
449
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::ExecuteQueryRequest]
|
|
450
|
+
# A request object representing the call parameters. Required.
|
|
451
|
+
# @param options [::Gapic::CallOptions]
|
|
452
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
453
|
+
#
|
|
454
|
+
# @yieldparam chunk [::String] The chunk of data received during server streaming.
|
|
455
|
+
#
|
|
456
|
+
# @return [::Gapic::Rest::TransportOperation]
|
|
457
|
+
def execute_query(request_pb, options = nil, &)
|
|
458
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
459
|
+
|
|
460
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_execute_query_request request_pb
|
|
461
|
+
query_string_params = if query_string_params.any?
|
|
462
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
463
|
+
else
|
|
464
|
+
{}
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
response = @client_stub.make_http_request(
|
|
468
|
+
verb,
|
|
469
|
+
uri: uri,
|
|
470
|
+
body: body || "",
|
|
471
|
+
params: query_string_params,
|
|
472
|
+
method_name: "execute_query",
|
|
473
|
+
options: options,
|
|
474
|
+
is_server_streaming: true,
|
|
475
|
+
&
|
|
476
|
+
)
|
|
477
|
+
::Gapic::Rest::TransportOperation.new response
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
##
|
|
481
|
+
# @private
|
|
482
|
+
#
|
|
483
|
+
# GRPC transcoding helper method for the read_rows REST call
|
|
484
|
+
#
|
|
485
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::ReadRowsRequest]
|
|
486
|
+
# A request object representing the call parameters. Required.
|
|
487
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
488
|
+
# Uri, Body, Query string parameters
|
|
489
|
+
def self.transcode_read_rows_request request_pb
|
|
490
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
491
|
+
.with_bindings(
|
|
492
|
+
uri_method: :post,
|
|
493
|
+
uri_template: "/v2/{table_name}:readRows",
|
|
494
|
+
body: "*",
|
|
495
|
+
matches: [
|
|
496
|
+
["table_name", %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}, false]
|
|
497
|
+
]
|
|
498
|
+
)
|
|
499
|
+
.with_bindings(
|
|
500
|
+
uri_method: :post,
|
|
501
|
+
uri_template: "/v2/{authorized_view_name}:readRows",
|
|
502
|
+
body: "*",
|
|
503
|
+
matches: [
|
|
504
|
+
["authorized_view_name", %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+/?$}, false]
|
|
505
|
+
]
|
|
506
|
+
)
|
|
507
|
+
.with_bindings(
|
|
508
|
+
uri_method: :post,
|
|
509
|
+
uri_template: "/v2/{materialized_view_name}:readRows",
|
|
510
|
+
body: "*",
|
|
511
|
+
matches: [
|
|
512
|
+
["materialized_view_name", %r{^projects/[^/]+/instances/[^/]+/materializedViews/[^/]+/?$}, false]
|
|
513
|
+
]
|
|
514
|
+
)
|
|
515
|
+
transcoder.transcode request_pb
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
##
|
|
519
|
+
# @private
|
|
520
|
+
#
|
|
521
|
+
# GRPC transcoding helper method for the sample_row_keys REST call
|
|
522
|
+
#
|
|
523
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::SampleRowKeysRequest]
|
|
524
|
+
# A request object representing the call parameters. Required.
|
|
525
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
526
|
+
# Uri, Body, Query string parameters
|
|
527
|
+
def self.transcode_sample_row_keys_request request_pb
|
|
528
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
529
|
+
.with_bindings(
|
|
530
|
+
uri_method: :get,
|
|
531
|
+
uri_template: "/v2/{table_name}:sampleRowKeys",
|
|
532
|
+
matches: [
|
|
533
|
+
["table_name", %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}, false]
|
|
534
|
+
]
|
|
535
|
+
)
|
|
536
|
+
.with_bindings(
|
|
537
|
+
uri_method: :get,
|
|
538
|
+
uri_template: "/v2/{authorized_view_name}:sampleRowKeys",
|
|
539
|
+
matches: [
|
|
540
|
+
["authorized_view_name", %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+/?$}, false]
|
|
541
|
+
]
|
|
542
|
+
)
|
|
543
|
+
.with_bindings(
|
|
544
|
+
uri_method: :get,
|
|
545
|
+
uri_template: "/v2/{materialized_view_name}:sampleRowKeys",
|
|
546
|
+
matches: [
|
|
547
|
+
["materialized_view_name", %r{^projects/[^/]+/instances/[^/]+/materializedViews/[^/]+/?$}, false]
|
|
548
|
+
]
|
|
549
|
+
)
|
|
550
|
+
transcoder.transcode request_pb
|
|
551
|
+
end
|
|
552
|
+
|
|
553
|
+
##
|
|
554
|
+
# @private
|
|
555
|
+
#
|
|
556
|
+
# GRPC transcoding helper method for the mutate_row REST call
|
|
557
|
+
#
|
|
558
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::MutateRowRequest]
|
|
559
|
+
# A request object representing the call parameters. Required.
|
|
560
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
561
|
+
# Uri, Body, Query string parameters
|
|
562
|
+
def self.transcode_mutate_row_request request_pb
|
|
563
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
564
|
+
.with_bindings(
|
|
565
|
+
uri_method: :post,
|
|
566
|
+
uri_template: "/v2/{table_name}:mutateRow",
|
|
567
|
+
body: "*",
|
|
568
|
+
matches: [
|
|
569
|
+
["table_name", %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}, false]
|
|
570
|
+
]
|
|
571
|
+
)
|
|
572
|
+
.with_bindings(
|
|
573
|
+
uri_method: :post,
|
|
574
|
+
uri_template: "/v2/{authorized_view_name}:mutateRow",
|
|
575
|
+
body: "*",
|
|
576
|
+
matches: [
|
|
577
|
+
["authorized_view_name", %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+/?$}, false]
|
|
578
|
+
]
|
|
579
|
+
)
|
|
580
|
+
transcoder.transcode request_pb
|
|
581
|
+
end
|
|
582
|
+
|
|
583
|
+
##
|
|
584
|
+
# @private
|
|
585
|
+
#
|
|
586
|
+
# GRPC transcoding helper method for the mutate_rows REST call
|
|
587
|
+
#
|
|
588
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::MutateRowsRequest]
|
|
589
|
+
# A request object representing the call parameters. Required.
|
|
590
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
591
|
+
# Uri, Body, Query string parameters
|
|
592
|
+
def self.transcode_mutate_rows_request request_pb
|
|
593
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
594
|
+
.with_bindings(
|
|
595
|
+
uri_method: :post,
|
|
596
|
+
uri_template: "/v2/{table_name}:mutateRows",
|
|
597
|
+
body: "*",
|
|
598
|
+
matches: [
|
|
599
|
+
["table_name", %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}, false]
|
|
600
|
+
]
|
|
601
|
+
)
|
|
602
|
+
.with_bindings(
|
|
603
|
+
uri_method: :post,
|
|
604
|
+
uri_template: "/v2/{authorized_view_name}:mutateRows",
|
|
605
|
+
body: "*",
|
|
606
|
+
matches: [
|
|
607
|
+
["authorized_view_name", %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+/?$}, false]
|
|
608
|
+
]
|
|
609
|
+
)
|
|
610
|
+
transcoder.transcode request_pb
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
##
|
|
614
|
+
# @private
|
|
615
|
+
#
|
|
616
|
+
# GRPC transcoding helper method for the check_and_mutate_row REST call
|
|
617
|
+
#
|
|
618
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest]
|
|
619
|
+
# A request object representing the call parameters. Required.
|
|
620
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
621
|
+
# Uri, Body, Query string parameters
|
|
622
|
+
def self.transcode_check_and_mutate_row_request request_pb
|
|
623
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
624
|
+
.with_bindings(
|
|
625
|
+
uri_method: :post,
|
|
626
|
+
uri_template: "/v2/{table_name}:checkAndMutateRow",
|
|
627
|
+
body: "*",
|
|
628
|
+
matches: [
|
|
629
|
+
["table_name", %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}, false]
|
|
630
|
+
]
|
|
631
|
+
)
|
|
632
|
+
.with_bindings(
|
|
633
|
+
uri_method: :post,
|
|
634
|
+
uri_template: "/v2/{authorized_view_name}:checkAndMutateRow",
|
|
635
|
+
body: "*",
|
|
636
|
+
matches: [
|
|
637
|
+
["authorized_view_name", %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+/?$}, false]
|
|
638
|
+
]
|
|
639
|
+
)
|
|
640
|
+
transcoder.transcode request_pb
|
|
641
|
+
end
|
|
642
|
+
|
|
643
|
+
##
|
|
644
|
+
# @private
|
|
645
|
+
#
|
|
646
|
+
# GRPC transcoding helper method for the ping_and_warm REST call
|
|
647
|
+
#
|
|
648
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::PingAndWarmRequest]
|
|
649
|
+
# A request object representing the call parameters. Required.
|
|
650
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
651
|
+
# Uri, Body, Query string parameters
|
|
652
|
+
def self.transcode_ping_and_warm_request request_pb
|
|
653
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
654
|
+
.with_bindings(
|
|
655
|
+
uri_method: :post,
|
|
656
|
+
uri_template: "/v2/{name}:ping",
|
|
657
|
+
body: "*",
|
|
658
|
+
matches: [
|
|
659
|
+
["name", %r{^projects/[^/]+/instances/[^/]+/?$}, false]
|
|
660
|
+
]
|
|
661
|
+
)
|
|
662
|
+
transcoder.transcode request_pb
|
|
663
|
+
end
|
|
664
|
+
|
|
665
|
+
##
|
|
666
|
+
# @private
|
|
667
|
+
#
|
|
668
|
+
# GRPC transcoding helper method for the read_modify_write_row REST call
|
|
669
|
+
#
|
|
670
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest]
|
|
671
|
+
# A request object representing the call parameters. Required.
|
|
672
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
673
|
+
# Uri, Body, Query string parameters
|
|
674
|
+
def self.transcode_read_modify_write_row_request request_pb
|
|
675
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
676
|
+
.with_bindings(
|
|
677
|
+
uri_method: :post,
|
|
678
|
+
uri_template: "/v2/{table_name}:readModifyWriteRow",
|
|
679
|
+
body: "*",
|
|
680
|
+
matches: [
|
|
681
|
+
["table_name", %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}, false]
|
|
682
|
+
]
|
|
683
|
+
)
|
|
684
|
+
.with_bindings(
|
|
685
|
+
uri_method: :post,
|
|
686
|
+
uri_template: "/v2/{authorized_view_name}:readModifyWriteRow",
|
|
687
|
+
body: "*",
|
|
688
|
+
matches: [
|
|
689
|
+
["authorized_view_name", %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+/?$}, false]
|
|
690
|
+
]
|
|
691
|
+
)
|
|
692
|
+
transcoder.transcode request_pb
|
|
693
|
+
end
|
|
694
|
+
|
|
695
|
+
##
|
|
696
|
+
# @private
|
|
697
|
+
#
|
|
698
|
+
# GRPC transcoding helper method for the generate_initial_change_stream_partitions REST call
|
|
699
|
+
#
|
|
700
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest]
|
|
701
|
+
# A request object representing the call parameters. Required.
|
|
702
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
703
|
+
# Uri, Body, Query string parameters
|
|
704
|
+
def self.transcode_generate_initial_change_stream_partitions_request request_pb
|
|
705
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
706
|
+
.with_bindings(
|
|
707
|
+
uri_method: :post,
|
|
708
|
+
uri_template: "/v2/{table_name}:generateInitialChangeStreamPartitions",
|
|
709
|
+
body: "*",
|
|
710
|
+
matches: [
|
|
711
|
+
["table_name", %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}, false]
|
|
712
|
+
]
|
|
713
|
+
)
|
|
714
|
+
transcoder.transcode request_pb
|
|
715
|
+
end
|
|
716
|
+
|
|
717
|
+
##
|
|
718
|
+
# @private
|
|
719
|
+
#
|
|
720
|
+
# GRPC transcoding helper method for the read_change_stream REST call
|
|
721
|
+
#
|
|
722
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest]
|
|
723
|
+
# A request object representing the call parameters. Required.
|
|
724
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
725
|
+
# Uri, Body, Query string parameters
|
|
726
|
+
def self.transcode_read_change_stream_request request_pb
|
|
727
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
728
|
+
.with_bindings(
|
|
729
|
+
uri_method: :post,
|
|
730
|
+
uri_template: "/v2/{table_name}:readChangeStream",
|
|
731
|
+
body: "*",
|
|
732
|
+
matches: [
|
|
733
|
+
["table_name", %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}, false]
|
|
734
|
+
]
|
|
735
|
+
)
|
|
736
|
+
transcoder.transcode request_pb
|
|
737
|
+
end
|
|
738
|
+
|
|
739
|
+
##
|
|
740
|
+
# @private
|
|
741
|
+
#
|
|
742
|
+
# GRPC transcoding helper method for the prepare_query REST call
|
|
743
|
+
#
|
|
744
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::PrepareQueryRequest]
|
|
745
|
+
# A request object representing the call parameters. Required.
|
|
746
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
747
|
+
# Uri, Body, Query string parameters
|
|
748
|
+
def self.transcode_prepare_query_request request_pb
|
|
749
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
750
|
+
.with_bindings(
|
|
751
|
+
uri_method: :post,
|
|
752
|
+
uri_template: "/v2/{instance_name}:prepareQuery",
|
|
753
|
+
body: "*",
|
|
754
|
+
matches: [
|
|
755
|
+
["instance_name", %r{^projects/[^/]+/instances/[^/]+/?$}, false]
|
|
756
|
+
]
|
|
757
|
+
)
|
|
758
|
+
transcoder.transcode request_pb
|
|
759
|
+
end
|
|
760
|
+
|
|
761
|
+
##
|
|
762
|
+
# @private
|
|
763
|
+
#
|
|
764
|
+
# GRPC transcoding helper method for the execute_query REST call
|
|
765
|
+
#
|
|
766
|
+
# @param request_pb [::Google::Cloud::Bigtable::V2::ExecuteQueryRequest]
|
|
767
|
+
# A request object representing the call parameters. Required.
|
|
768
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
769
|
+
# Uri, Body, Query string parameters
|
|
770
|
+
def self.transcode_execute_query_request request_pb
|
|
771
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
772
|
+
.with_bindings(
|
|
773
|
+
uri_method: :post,
|
|
774
|
+
uri_template: "/v2/{instance_name}:executeQuery",
|
|
775
|
+
body: "*",
|
|
776
|
+
matches: [
|
|
777
|
+
["instance_name", %r{^projects/[^/]+/instances/[^/]+/?$}, false]
|
|
778
|
+
]
|
|
779
|
+
)
|
|
780
|
+
transcoder.transcode request_pb
|
|
781
|
+
end
|
|
782
|
+
end
|
|
783
|
+
end
|
|
784
|
+
end
|
|
785
|
+
end
|
|
786
|
+
end
|
|
787
|
+
end
|
|
788
|
+
end
|