google-cloud-bigtable-v2 0.3.5 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/bigtable/v2/bigtable_pb.rb +1 -0
- data/lib/google/bigtable/v2/bigtable_services_pb.rb +1 -1
- data/lib/google/cloud/bigtable/v2/bigtable/client.rb +39 -14
- data/lib/google/cloud/bigtable/v2/version.rb +1 -1
- data/proto_docs/google/api/routing.rb +459 -0
- data/proto_docs/google/bigtable/v2/bigtable.rb +3 -2
- data/proto_docs/google/bigtable/v2/data.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5fb75fc501d818ecd5807733a7bfc74a171ce4faa364c396ac877d79d569672
|
4
|
+
data.tar.gz: 36207f12fa04771251de03294407eab209bee753a0506e42a38d3f3192d19798
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 753e7151d7ab0b4251b6cbf8563a13633eb79298923e1a070b4a15a68298a12b43bac5a577bdb00dde920d38c66e939c6374b58f0c1ab0bc167fe90553a54f52
|
7
|
+
data.tar.gz: ec37feca1c7686983e03522dea95d2db2f4687bf660e3cc43e1d7100bf055947ad3ecf71b8ae708f9535c51d1cfce90e52e2c2e0010c9686f35131fd851aa17d
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Bigtable::V2::ReadRowsRequest.new # (request fields a
|
|
37
37
|
response = client.read_rows request
|
38
38
|
```
|
39
39
|
|
40
|
-
View the [Client Library Documentation](https://
|
40
|
+
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigtable-v2/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/bigtable)
|
@@ -5,6 +5,7 @@ require 'google/api/annotations_pb'
|
|
5
5
|
require 'google/api/client_pb'
|
6
6
|
require 'google/api/field_behavior_pb'
|
7
7
|
require 'google/api/resource_pb'
|
8
|
+
require 'google/api/routing_pb'
|
8
9
|
require 'google/bigtable/v2/data_pb'
|
9
10
|
require 'google/protobuf/wrappers_pb'
|
10
11
|
require 'google/rpc/status_pb'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# Source: google/bigtable/v2/bigtable.proto for package 'Google.Cloud.Bigtable.V2'
|
3
3
|
# Original file comments:
|
4
|
-
# Copyright 2019 Google LLC
|
4
|
+
# Copyright 2019 Google LLC
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -204,12 +204,13 @@ module Google
|
|
204
204
|
# This value specifies routing for replication. If not specified, the
|
205
205
|
# "default" application profile will be used.
|
206
206
|
# @param rows [::Google::Cloud::Bigtable::V2::RowSet, ::Hash]
|
207
|
-
# The row keys and/or ranges to read. If not specified, reads
|
207
|
+
# The row keys and/or ranges to read sequentially. If not specified, reads
|
208
|
+
# from all rows.
|
208
209
|
# @param filter [::Google::Cloud::Bigtable::V2::RowFilter, ::Hash]
|
209
210
|
# The filter to apply to the contents of the specified row(s). If unset,
|
210
211
|
# reads the entirety of each row.
|
211
212
|
# @param rows_limit [::Integer]
|
212
|
-
# The read will
|
213
|
+
# The read will stop after committing to N rows' worth of results. The
|
213
214
|
# default (zero) is to return all results.
|
214
215
|
#
|
215
216
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -256,11 +257,15 @@ module Google
|
|
256
257
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
257
258
|
|
258
259
|
header_params = {}
|
259
|
-
if request.table_name
|
260
|
+
if request.table_name &&
|
261
|
+
%r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name)
|
260
262
|
header_params["table_name"] = request.table_name
|
261
263
|
end
|
264
|
+
if request.app_profile_id && !request.app_profile_id.empty?
|
265
|
+
header_params["app_profile_id"] = request.app_profile_id
|
266
|
+
end
|
262
267
|
|
263
|
-
request_params_header =
|
268
|
+
request_params_header = URI.encode_www_form header_params
|
264
269
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
265
270
|
|
266
271
|
options.apply_defaults timeout: @config.rpcs.read_rows.timeout,
|
@@ -352,11 +357,15 @@ module Google
|
|
352
357
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
353
358
|
|
354
359
|
header_params = {}
|
355
|
-
if request.table_name
|
360
|
+
if request.table_name &&
|
361
|
+
%r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name)
|
356
362
|
header_params["table_name"] = request.table_name
|
357
363
|
end
|
364
|
+
if request.app_profile_id && !request.app_profile_id.empty?
|
365
|
+
header_params["app_profile_id"] = request.app_profile_id
|
366
|
+
end
|
358
367
|
|
359
|
-
request_params_header =
|
368
|
+
request_params_header = URI.encode_www_form header_params
|
360
369
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
361
370
|
|
362
371
|
options.apply_defaults timeout: @config.rpcs.sample_row_keys.timeout,
|
@@ -449,11 +458,15 @@ module Google
|
|
449
458
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
450
459
|
|
451
460
|
header_params = {}
|
452
|
-
if request.table_name
|
461
|
+
if request.table_name &&
|
462
|
+
%r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name)
|
453
463
|
header_params["table_name"] = request.table_name
|
454
464
|
end
|
465
|
+
if request.app_profile_id && !request.app_profile_id.empty?
|
466
|
+
header_params["app_profile_id"] = request.app_profile_id
|
467
|
+
end
|
455
468
|
|
456
|
-
request_params_header =
|
469
|
+
request_params_header = URI.encode_www_form header_params
|
457
470
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
458
471
|
|
459
472
|
options.apply_defaults timeout: @config.rpcs.mutate_row.timeout,
|
@@ -548,11 +561,15 @@ module Google
|
|
548
561
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
549
562
|
|
550
563
|
header_params = {}
|
551
|
-
if request.table_name
|
564
|
+
if request.table_name &&
|
565
|
+
%r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name)
|
552
566
|
header_params["table_name"] = request.table_name
|
553
567
|
end
|
568
|
+
if request.app_profile_id && !request.app_profile_id.empty?
|
569
|
+
header_params["app_profile_id"] = request.app_profile_id
|
570
|
+
end
|
554
571
|
|
555
|
-
request_params_header =
|
572
|
+
request_params_header = URI.encode_www_form header_params
|
556
573
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
557
574
|
|
558
575
|
options.apply_defaults timeout: @config.rpcs.mutate_rows.timeout,
|
@@ -658,11 +675,15 @@ module Google
|
|
658
675
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
659
676
|
|
660
677
|
header_params = {}
|
661
|
-
if request.table_name
|
678
|
+
if request.table_name &&
|
679
|
+
%r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name)
|
662
680
|
header_params["table_name"] = request.table_name
|
663
681
|
end
|
682
|
+
if request.app_profile_id && !request.app_profile_id.empty?
|
683
|
+
header_params["app_profile_id"] = request.app_profile_id
|
684
|
+
end
|
664
685
|
|
665
|
-
request_params_header =
|
686
|
+
request_params_header = URI.encode_www_form header_params
|
666
687
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
667
688
|
|
668
689
|
options.apply_defaults timeout: @config.rpcs.check_and_mutate_row.timeout,
|
@@ -759,11 +780,15 @@ module Google
|
|
759
780
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
760
781
|
|
761
782
|
header_params = {}
|
762
|
-
if request.table_name
|
783
|
+
if request.table_name &&
|
784
|
+
%r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name)
|
763
785
|
header_params["table_name"] = request.table_name
|
764
786
|
end
|
787
|
+
if request.app_profile_id && !request.app_profile_id.empty?
|
788
|
+
header_params["app_profile_id"] = request.app_profile_id
|
789
|
+
end
|
765
790
|
|
766
|
-
request_params_header =
|
791
|
+
request_params_header = URI.encode_www_form header_params
|
767
792
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
768
793
|
|
769
794
|
options.apply_defaults timeout: @config.rpcs.read_modify_write_row.timeout,
|
@@ -0,0 +1,459 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 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
|
+
|
20
|
+
module Google
|
21
|
+
module Api
|
22
|
+
# Specifies the routing information that should be sent along with the request
|
23
|
+
# in the form of routing header.
|
24
|
+
# **NOTE:** All service configuration rules follow the "last one wins" order.
|
25
|
+
#
|
26
|
+
# The examples below will apply to an RPC which has the following request type:
|
27
|
+
#
|
28
|
+
# Message Definition:
|
29
|
+
#
|
30
|
+
# message Request {
|
31
|
+
# // The name of the Table
|
32
|
+
# // Values can be of the following formats:
|
33
|
+
# // - `projects/<project>/tables/<table>`
|
34
|
+
# // - `projects/<project>/instances/<instance>/tables/<table>`
|
35
|
+
# // - `region/<region>/zones/<zone>/tables/<table>`
|
36
|
+
# string table_name = 1;
|
37
|
+
#
|
38
|
+
# // This value specifies routing for replication.
|
39
|
+
# // It can be in the following formats:
|
40
|
+
# // - `profiles/<profile_id>`
|
41
|
+
# // - a legacy `profile_id` that can be any string
|
42
|
+
# string app_profile_id = 2;
|
43
|
+
# }
|
44
|
+
#
|
45
|
+
# Example message:
|
46
|
+
#
|
47
|
+
# {
|
48
|
+
# table_name: projects/proj_foo/instances/instance_bar/table/table_baz,
|
49
|
+
# app_profile_id: profiles/prof_qux
|
50
|
+
# }
|
51
|
+
#
|
52
|
+
# The routing header consists of one or multiple key-value pairs. Every key
|
53
|
+
# and value must be percent-encoded, and joined together in the format of
|
54
|
+
# `key1=value1&key2=value2`.
|
55
|
+
# In the examples below I am skipping the percent-encoding for readablity.
|
56
|
+
#
|
57
|
+
# Example 1
|
58
|
+
#
|
59
|
+
# Extracting a field from the request to put into the routing header
|
60
|
+
# unchanged, with the key equal to the field name.
|
61
|
+
#
|
62
|
+
# annotation:
|
63
|
+
#
|
64
|
+
# option (google.api.routing) = {
|
65
|
+
# // Take the `app_profile_id`.
|
66
|
+
# routing_parameters {
|
67
|
+
# field: "app_profile_id"
|
68
|
+
# }
|
69
|
+
# };
|
70
|
+
#
|
71
|
+
# result:
|
72
|
+
#
|
73
|
+
# x-goog-request-params: app_profile_id=profiles/prof_qux
|
74
|
+
#
|
75
|
+
# Example 2
|
76
|
+
#
|
77
|
+
# Extracting a field from the request to put into the routing header
|
78
|
+
# unchanged, with the key different from the field name.
|
79
|
+
#
|
80
|
+
# annotation:
|
81
|
+
#
|
82
|
+
# option (google.api.routing) = {
|
83
|
+
# // Take the `app_profile_id`, but name it `routing_id` in the header.
|
84
|
+
# routing_parameters {
|
85
|
+
# field: "app_profile_id"
|
86
|
+
# path_template: "{routing_id=**}"
|
87
|
+
# }
|
88
|
+
# };
|
89
|
+
#
|
90
|
+
# result:
|
91
|
+
#
|
92
|
+
# x-goog-request-params: routing_id=profiles/prof_qux
|
93
|
+
#
|
94
|
+
# Example 3
|
95
|
+
#
|
96
|
+
# Extracting a field from the request to put into the routing
|
97
|
+
# header, while matching a path template syntax on the field's value.
|
98
|
+
#
|
99
|
+
# NB: it is more useful to send nothing than to send garbage for the purpose
|
100
|
+
# of dynamic routing, since garbage pollutes cache. Thus the matching.
|
101
|
+
#
|
102
|
+
# Sub-example 3a
|
103
|
+
#
|
104
|
+
# The field matches the template.
|
105
|
+
#
|
106
|
+
# annotation:
|
107
|
+
#
|
108
|
+
# option (google.api.routing) = {
|
109
|
+
# // Take the `table_name`, if it's well-formed (with project-based
|
110
|
+
# // syntax).
|
111
|
+
# routing_parameters {
|
112
|
+
# field: "table_name"
|
113
|
+
# path_template: "{table_name=projects/*/instances/*/**}"
|
114
|
+
# }
|
115
|
+
# };
|
116
|
+
#
|
117
|
+
# result:
|
118
|
+
#
|
119
|
+
# x-goog-request-params:
|
120
|
+
# table_name=projects/proj_foo/instances/instance_bar/table/table_baz
|
121
|
+
#
|
122
|
+
# Sub-example 3b
|
123
|
+
#
|
124
|
+
# The field does not match the template.
|
125
|
+
#
|
126
|
+
# annotation:
|
127
|
+
#
|
128
|
+
# option (google.api.routing) = {
|
129
|
+
# // Take the `table_name`, if it's well-formed (with region-based
|
130
|
+
# // syntax).
|
131
|
+
# routing_parameters {
|
132
|
+
# field: "table_name"
|
133
|
+
# path_template: "{table_name=regions/*/zones/*/**}"
|
134
|
+
# }
|
135
|
+
# };
|
136
|
+
#
|
137
|
+
# result:
|
138
|
+
#
|
139
|
+
# <no routing header will be sent>
|
140
|
+
#
|
141
|
+
# Sub-example 3c
|
142
|
+
#
|
143
|
+
# Multiple alternative conflictingly named path templates are
|
144
|
+
# specified. The one that matches is used to construct the header.
|
145
|
+
#
|
146
|
+
# annotation:
|
147
|
+
#
|
148
|
+
# option (google.api.routing) = {
|
149
|
+
# // Take the `table_name`, if it's well-formed, whether
|
150
|
+
# // using the region- or projects-based syntax.
|
151
|
+
#
|
152
|
+
# routing_parameters {
|
153
|
+
# field: "table_name"
|
154
|
+
# path_template: "{table_name=regions/*/zones/*/**}"
|
155
|
+
# }
|
156
|
+
# routing_parameters {
|
157
|
+
# field: "table_name"
|
158
|
+
# path_template: "{table_name=projects/*/instances/*/**}"
|
159
|
+
# }
|
160
|
+
# };
|
161
|
+
#
|
162
|
+
# result:
|
163
|
+
#
|
164
|
+
# x-goog-request-params:
|
165
|
+
# table_name=projects/proj_foo/instances/instance_bar/table/table_baz
|
166
|
+
#
|
167
|
+
# Example 4
|
168
|
+
#
|
169
|
+
# Extracting a single routing header key-value pair by matching a
|
170
|
+
# template syntax on (a part of) a single request field.
|
171
|
+
#
|
172
|
+
# annotation:
|
173
|
+
#
|
174
|
+
# option (google.api.routing) = {
|
175
|
+
# // Take just the project id from the `table_name` field.
|
176
|
+
# routing_parameters {
|
177
|
+
# field: "table_name"
|
178
|
+
# path_template: "{routing_id=projects/*}/**"
|
179
|
+
# }
|
180
|
+
# };
|
181
|
+
#
|
182
|
+
# result:
|
183
|
+
#
|
184
|
+
# x-goog-request-params: routing_id=projects/proj_foo
|
185
|
+
#
|
186
|
+
# Example 5
|
187
|
+
#
|
188
|
+
# Extracting a single routing header key-value pair by matching
|
189
|
+
# several conflictingly named path templates on (parts of) a single request
|
190
|
+
# field. The last template to match "wins" the conflict.
|
191
|
+
#
|
192
|
+
# annotation:
|
193
|
+
#
|
194
|
+
# option (google.api.routing) = {
|
195
|
+
# // If the `table_name` does not have instances information,
|
196
|
+
# // take just the project id for routing.
|
197
|
+
# // Otherwise take project + instance.
|
198
|
+
#
|
199
|
+
# routing_parameters {
|
200
|
+
# field: "table_name"
|
201
|
+
# path_template: "{routing_id=projects/*}/**"
|
202
|
+
# }
|
203
|
+
# routing_parameters {
|
204
|
+
# field: "table_name"
|
205
|
+
# path_template: "{routing_id=projects/*/instances/*}/**"
|
206
|
+
# }
|
207
|
+
# };
|
208
|
+
#
|
209
|
+
# result:
|
210
|
+
#
|
211
|
+
# x-goog-request-params:
|
212
|
+
# routing_id=projects/proj_foo/instances/instance_bar
|
213
|
+
#
|
214
|
+
# Example 6
|
215
|
+
#
|
216
|
+
# Extracting multiple routing header key-value pairs by matching
|
217
|
+
# several non-conflicting path templates on (parts of) a single request field.
|
218
|
+
#
|
219
|
+
# Sub-example 6a
|
220
|
+
#
|
221
|
+
# Make the templates strict, so that if the `table_name` does not
|
222
|
+
# have an instance information, nothing is sent.
|
223
|
+
#
|
224
|
+
# annotation:
|
225
|
+
#
|
226
|
+
# option (google.api.routing) = {
|
227
|
+
# // The routing code needs two keys instead of one composite
|
228
|
+
# // but works only for the tables with the "project-instance" name
|
229
|
+
# // syntax.
|
230
|
+
#
|
231
|
+
# routing_parameters {
|
232
|
+
# field: "table_name"
|
233
|
+
# path_template: "{project_id=projects/*}/instances/*/**"
|
234
|
+
# }
|
235
|
+
# routing_parameters {
|
236
|
+
# field: "table_name"
|
237
|
+
# path_template: "projects/*/{instance_id=instances/*}/**"
|
238
|
+
# }
|
239
|
+
# };
|
240
|
+
#
|
241
|
+
# result:
|
242
|
+
#
|
243
|
+
# x-goog-request-params:
|
244
|
+
# project_id=projects/proj_foo&instance_id=instances/instance_bar
|
245
|
+
#
|
246
|
+
# Sub-example 6b
|
247
|
+
#
|
248
|
+
# Make the templates loose, so that if the `table_name` does not
|
249
|
+
# have an instance information, just the project id part is sent.
|
250
|
+
#
|
251
|
+
# annotation:
|
252
|
+
#
|
253
|
+
# option (google.api.routing) = {
|
254
|
+
# // The routing code wants two keys instead of one composite
|
255
|
+
# // but will work with just the `project_id` for tables without
|
256
|
+
# // an instance in the `table_name`.
|
257
|
+
#
|
258
|
+
# routing_parameters {
|
259
|
+
# field: "table_name"
|
260
|
+
# path_template: "{project_id=projects/*}/**"
|
261
|
+
# }
|
262
|
+
# routing_parameters {
|
263
|
+
# field: "table_name"
|
264
|
+
# path_template: "projects/*/{instance_id=instances/*}/**"
|
265
|
+
# }
|
266
|
+
# };
|
267
|
+
#
|
268
|
+
# result (is the same as 6a for our example message because it has the instance
|
269
|
+
# information):
|
270
|
+
#
|
271
|
+
# x-goog-request-params:
|
272
|
+
# project_id=projects/proj_foo&instance_id=instances/instance_bar
|
273
|
+
#
|
274
|
+
# Example 7
|
275
|
+
#
|
276
|
+
# Extracting multiple routing header key-value pairs by matching
|
277
|
+
# several path templates on multiple request fields.
|
278
|
+
#
|
279
|
+
# NB: note that here there is no way to specify sending nothing if one of the
|
280
|
+
# fields does not match its template. E.g. if the `table_name` is in the wrong
|
281
|
+
# format, the `project_id` will not be sent, but the `routing_id` will be.
|
282
|
+
# The backend routing code has to be aware of that and be prepared to not
|
283
|
+
# receive a full complement of keys if it expects multiple.
|
284
|
+
#
|
285
|
+
# annotation:
|
286
|
+
#
|
287
|
+
# option (google.api.routing) = {
|
288
|
+
# // The routing needs both `project_id` and `routing_id`
|
289
|
+
# // (from the `app_profile_id` field) for routing.
|
290
|
+
#
|
291
|
+
# routing_parameters {
|
292
|
+
# field: "table_name"
|
293
|
+
# path_template: "{project_id=projects/*}/**"
|
294
|
+
# }
|
295
|
+
# routing_parameters {
|
296
|
+
# field: "app_profile_id"
|
297
|
+
# path_template: "{routing_id=**}"
|
298
|
+
# }
|
299
|
+
# };
|
300
|
+
#
|
301
|
+
# result:
|
302
|
+
#
|
303
|
+
# x-goog-request-params:
|
304
|
+
# project_id=projects/proj_foo&routing_id=profiles/prof_qux
|
305
|
+
#
|
306
|
+
# Example 8
|
307
|
+
#
|
308
|
+
# Extracting a single routing header key-value pair by matching
|
309
|
+
# several conflictingly named path templates on several request fields. The
|
310
|
+
# last template to match "wins" the conflict.
|
311
|
+
#
|
312
|
+
# annotation:
|
313
|
+
#
|
314
|
+
# option (google.api.routing) = {
|
315
|
+
# // The `routing_id` can be a project id or a region id depending on
|
316
|
+
# // the table name format, but only if the `app_profile_id` is not set.
|
317
|
+
# // If `app_profile_id` is set it should be used instead.
|
318
|
+
#
|
319
|
+
# routing_parameters {
|
320
|
+
# field: "table_name"
|
321
|
+
# path_template: "{routing_id=projects/*}/**"
|
322
|
+
# }
|
323
|
+
# routing_parameters {
|
324
|
+
# field: "table_name"
|
325
|
+
# path_template: "{routing_id=regions/*}/**"
|
326
|
+
# }
|
327
|
+
# routing_parameters {
|
328
|
+
# field: "app_profile_id"
|
329
|
+
# path_template: "{routing_id=**}"
|
330
|
+
# }
|
331
|
+
# };
|
332
|
+
#
|
333
|
+
# result:
|
334
|
+
#
|
335
|
+
# x-goog-request-params: routing_id=profiles/prof_qux
|
336
|
+
#
|
337
|
+
# Example 9
|
338
|
+
#
|
339
|
+
# Bringing it all together.
|
340
|
+
#
|
341
|
+
# annotation:
|
342
|
+
#
|
343
|
+
# option (google.api.routing) = {
|
344
|
+
# // For routing both `table_location` and a `routing_id` are needed.
|
345
|
+
# //
|
346
|
+
# // table_location can be either an instance id or a region+zone id.
|
347
|
+
# //
|
348
|
+
# // For `routing_id`, take the value of `app_profile_id`
|
349
|
+
# // - If it's in the format `profiles/<profile_id>`, send
|
350
|
+
# // just the `<profile_id>` part.
|
351
|
+
# // - If it's any other literal, send it as is.
|
352
|
+
# // If the `app_profile_id` is empty, and the `table_name` starts with
|
353
|
+
# // the project_id, send that instead.
|
354
|
+
#
|
355
|
+
# routing_parameters {
|
356
|
+
# field: "table_name"
|
357
|
+
# path_template: "projects/*/{table_location=instances/*}/tables/*"
|
358
|
+
# }
|
359
|
+
# routing_parameters {
|
360
|
+
# field: "table_name"
|
361
|
+
# path_template: "{table_location=regions/*/zones/*}/tables/*"
|
362
|
+
# }
|
363
|
+
# routing_parameters {
|
364
|
+
# field: "table_name"
|
365
|
+
# path_template: "{routing_id=projects/*}/**"
|
366
|
+
# }
|
367
|
+
# routing_parameters {
|
368
|
+
# field: "app_profile_id"
|
369
|
+
# path_template: "{routing_id=**}"
|
370
|
+
# }
|
371
|
+
# routing_parameters {
|
372
|
+
# field: "app_profile_id"
|
373
|
+
# path_template: "profiles/{routing_id=*}"
|
374
|
+
# }
|
375
|
+
# };
|
376
|
+
#
|
377
|
+
# result:
|
378
|
+
#
|
379
|
+
# x-goog-request-params:
|
380
|
+
# table_location=instances/instance_bar&routing_id=prof_qux
|
381
|
+
# @!attribute [rw] routing_parameters
|
382
|
+
# @return [::Array<::Google::Api::RoutingParameter>]
|
383
|
+
# A collection of Routing Parameter specifications.
|
384
|
+
# **NOTE:** If multiple Routing Parameters describe the same key
|
385
|
+
# (via the `path_template` field or via the `field` field when
|
386
|
+
# `path_template` is not provided), "last one wins" rule
|
387
|
+
# determines which Parameter gets used.
|
388
|
+
# See the examples for more details.
|
389
|
+
class RoutingRule
|
390
|
+
include ::Google::Protobuf::MessageExts
|
391
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
392
|
+
end
|
393
|
+
|
394
|
+
# A projection from an input message to the GRPC or REST header.
|
395
|
+
# @!attribute [rw] field
|
396
|
+
# @return [::String]
|
397
|
+
# A request field to extract the header key-value pair from.
|
398
|
+
# @!attribute [rw] path_template
|
399
|
+
# @return [::String]
|
400
|
+
# A pattern matching the key-value field. Optional.
|
401
|
+
# If not specified, the whole field specified in the `field` field will be
|
402
|
+
# taken as value, and its name used as key. If specified, it MUST contain
|
403
|
+
# exactly one named segment (along with any number of unnamed segments) The
|
404
|
+
# pattern will be matched over the field specified in the `field` field, then
|
405
|
+
# if the match is successful:
|
406
|
+
# - the name of the single named segment will be used as a header name,
|
407
|
+
# - the match value of the segment will be used as a header value;
|
408
|
+
# if the match is NOT successful, nothing will be sent.
|
409
|
+
#
|
410
|
+
# Example:
|
411
|
+
#
|
412
|
+
# -- This is a field in the request message
|
413
|
+
# | that the header value will be extracted from.
|
414
|
+
# |
|
415
|
+
# | -- This is the key name in the
|
416
|
+
# | | routing header.
|
417
|
+
# V |
|
418
|
+
# field: "table_name" v
|
419
|
+
# path_template: "projects/*/{table_location=instances/*}/tables/*"
|
420
|
+
# ^ ^
|
421
|
+
# | |
|
422
|
+
# In the {} brackets is the pattern that -- |
|
423
|
+
# specifies what to extract from the |
|
424
|
+
# field as a value to be sent. |
|
425
|
+
# |
|
426
|
+
# The string in the field must match the whole pattern --
|
427
|
+
# before brackets, inside brackets, after brackets.
|
428
|
+
#
|
429
|
+
# When looking at this specific example, we can see that:
|
430
|
+
# - A key-value pair with the key `table_location`
|
431
|
+
# and the value matching `instances/*` should be added
|
432
|
+
# to the x-goog-request-params routing header.
|
433
|
+
# - The value is extracted from the request message's `table_name` field
|
434
|
+
# if it matches the full pattern specified:
|
435
|
+
# `projects/*/instances/*/tables/*`.
|
436
|
+
#
|
437
|
+
# **NB:** If the `path_template` field is not provided, the key name is
|
438
|
+
# equal to the field name, and the whole field should be sent as a value.
|
439
|
+
# This makes the pattern for the field and the value functionally equivalent
|
440
|
+
# to `**`, and the configuration
|
441
|
+
#
|
442
|
+
# {
|
443
|
+
# field: "table_name"
|
444
|
+
# }
|
445
|
+
#
|
446
|
+
# is a functionally equivalent shorthand to:
|
447
|
+
#
|
448
|
+
# {
|
449
|
+
# field: "table_name"
|
450
|
+
# path_template: "{table_name=**}"
|
451
|
+
# }
|
452
|
+
#
|
453
|
+
# See Example 1 for more details.
|
454
|
+
class RoutingParameter
|
455
|
+
include ::Google::Protobuf::MessageExts
|
456
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
457
|
+
end
|
458
|
+
end
|
459
|
+
end
|
@@ -33,14 +33,15 @@ module Google
|
|
33
33
|
# "default" application profile will be used.
|
34
34
|
# @!attribute [rw] rows
|
35
35
|
# @return [::Google::Cloud::Bigtable::V2::RowSet]
|
36
|
-
# The row keys and/or ranges to read. If not specified, reads
|
36
|
+
# The row keys and/or ranges to read sequentially. If not specified, reads
|
37
|
+
# from all rows.
|
37
38
|
# @!attribute [rw] filter
|
38
39
|
# @return [::Google::Cloud::Bigtable::V2::RowFilter]
|
39
40
|
# The filter to apply to the contents of the specified row(s). If unset,
|
40
41
|
# reads the entirety of each row.
|
41
42
|
# @!attribute [rw] rows_limit
|
42
43
|
# @return [::Integer]
|
43
|
-
# The read will
|
44
|
+
# The read will stop after committing to N rows' worth of results. The
|
44
45
|
# default (zero) is to return all results.
|
45
46
|
class ReadRowsRequest
|
46
47
|
include ::Google::Protobuf::MessageExts
|
@@ -209,7 +209,7 @@ module Google
|
|
209
209
|
# RowFilter.Chain and RowFilter.Interleave documentation.
|
210
210
|
#
|
211
211
|
# The total serialized size of a RowFilter message must not
|
212
|
-
# exceed
|
212
|
+
# exceed 20480 bytes, and RowFilters may not be nested within each other
|
213
213
|
# (in Chains or Interleaves) to a depth of more than 20.
|
214
214
|
# @!attribute [rw] chain
|
215
215
|
# @return [::Google::Cloud::Bigtable::V2::RowFilter::Chain]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-bigtable-v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.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: 2022-
|
11
|
+
date: 2022-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -183,6 +183,7 @@ files:
|
|
183
183
|
- proto_docs/README.md
|
184
184
|
- proto_docs/google/api/field_behavior.rb
|
185
185
|
- proto_docs/google/api/resource.rb
|
186
|
+
- proto_docs/google/api/routing.rb
|
186
187
|
- proto_docs/google/bigtable/v2/bigtable.rb
|
187
188
|
- proto_docs/google/bigtable/v2/data.rb
|
188
189
|
- proto_docs/google/protobuf/any.rb
|
@@ -207,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
208
|
- !ruby/object:Gem::Version
|
208
209
|
version: '0'
|
209
210
|
requirements: []
|
210
|
-
rubygems_version: 3.3.
|
211
|
+
rubygems_version: 3.3.5
|
211
212
|
signing_key:
|
212
213
|
specification_version: 4
|
213
214
|
summary: API Client library for the Cloud Bigtable V2 API
|