google-cloud-sql-v1beta4 0.1.1 → 0.2.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.
@@ -210,7 +210,7 @@ module Google
210
210
  # @param options [::Gapic::CallOptions, ::Hash]
211
211
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
212
212
  #
213
- # @overload delete(host: nil, instance: nil, name: nil, project: nil)
213
+ # @overload delete(host: nil, instance: nil, name: nil, project: nil, location: nil)
214
214
  # Pass arguments to `delete` via keyword arguments. Note that at
215
215
  # least one keyword argument is required. To specify no parameters, or to keep all
216
216
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -223,6 +223,8 @@ module Google
223
223
  # Name of the user in the instance.
224
224
  # @param project [::String]
225
225
  # Project ID of the project that contains the instance.
226
+ # @param location [::String]
227
+ # Optional. Region of the Cloud SQL instance.
226
228
  #
227
229
  # @yield [response, operation] Access the result along with the RPC operation
228
230
  # @yieldparam response [::Google::Cloud::Sql::V1beta4::Operation]
@@ -304,7 +306,7 @@ module Google
304
306
  # @param options [::Gapic::CallOptions, ::Hash]
305
307
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
306
308
  #
307
- # @overload get(instance: nil, name: nil, project: nil, host: nil)
309
+ # @overload get(instance: nil, name: nil, project: nil, host: nil, location: nil)
308
310
  # Pass arguments to `get` via keyword arguments. Note that at
309
311
  # least one keyword argument is required. To specify no parameters, or to keep all
310
312
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -317,6 +319,8 @@ module Google
317
319
  # Project ID of the project that contains the instance.
318
320
  # @param host [::String]
319
321
  # Host of a user of the instance.
322
+ # @param location [::String]
323
+ # Optional. Region of the Cloud SQL instance.
320
324
  #
321
325
  # @yield [response, operation] Access the result along with the RPC operation
322
326
  # @yieldparam response [::Google::Cloud::Sql::V1beta4::User]
@@ -401,7 +405,7 @@ module Google
401
405
  # @param options [::Gapic::CallOptions, ::Hash]
402
406
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
403
407
  #
404
- # @overload insert(instance: nil, project: nil, body: nil)
408
+ # @overload insert(instance: nil, project: nil, body: nil, location: nil)
405
409
  # Pass arguments to `insert` via keyword arguments. Note that at
406
410
  # least one keyword argument is required. To specify no parameters, or to keep all
407
411
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -411,6 +415,8 @@ module Google
411
415
  # @param project [::String]
412
416
  # Project ID of the project that contains the instance.
413
417
  # @param body [::Google::Cloud::Sql::V1beta4::User, ::Hash]
418
+ # @param location [::String]
419
+ # Optional. Region of the Cloud SQL instance.
414
420
  #
415
421
  # @yield [response, operation] Access the result along with the RPC operation
416
422
  # @yieldparam response [::Google::Cloud::Sql::V1beta4::Operation]
@@ -492,7 +498,7 @@ module Google
492
498
  # @param options [::Gapic::CallOptions, ::Hash]
493
499
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
494
500
  #
495
- # @overload list(instance: nil, project: nil)
501
+ # @overload list(instance: nil, project: nil, location: nil)
496
502
  # Pass arguments to `list` via keyword arguments. Note that at
497
503
  # least one keyword argument is required. To specify no parameters, or to keep all
498
504
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -501,6 +507,8 @@ module Google
501
507
  # Database instance ID. This does not include the project ID.
502
508
  # @param project [::String]
503
509
  # Project ID of the project that contains the instance.
510
+ # @param location [::String]
511
+ # Optional. Region of the Cloud SQL instance.
504
512
  #
505
513
  # @yield [response, operation] Access the result along with the RPC operation
506
514
  # @yieldparam response [::Google::Cloud::Sql::V1beta4::UsersListResponse]
@@ -582,7 +590,7 @@ module Google
582
590
  # @param options [::Gapic::CallOptions, ::Hash]
583
591
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
584
592
  #
585
- # @overload update(host: nil, instance: nil, name: nil, project: nil, database_roles: nil, revoke_existing_roles: nil, server_roles: nil, revoke_existing_server_roles: nil, body: nil)
593
+ # @overload update(host: nil, instance: nil, name: nil, project: nil, database_roles: nil, revoke_existing_roles: nil, server_roles: nil, revoke_existing_server_roles: nil, body: nil, location: nil)
586
594
  # Pass arguments to `update` via keyword arguments. Note that at
587
595
  # least one keyword argument is required. To specify no parameters, or to keep all
588
596
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -611,6 +619,8 @@ module Google
611
619
  # in the `server_roles` field. If `false` or unset, the server roles
612
620
  # specified in `server_roles` are added to the user's existing server roles.
613
621
  # @param body [::Google::Cloud::Sql::V1beta4::User, ::Hash]
622
+ # @param location [::String]
623
+ # Optional. Region of the Cloud SQL instance.
614
624
  #
615
625
  # @yield [response, operation] Access the result along with the RPC operation
616
626
  # @yieldparam response [::Google::Cloud::Sql::V1beta4::Operation]
@@ -203,7 +203,7 @@ module Google
203
203
  # @param options [::Gapic::CallOptions, ::Hash]
204
204
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
205
205
  #
206
- # @overload delete(host: nil, instance: nil, name: nil, project: nil)
206
+ # @overload delete(host: nil, instance: nil, name: nil, project: nil, location: nil)
207
207
  # Pass arguments to `delete` via keyword arguments. Note that at
208
208
  # least one keyword argument is required. To specify no parameters, or to keep all
209
209
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -216,6 +216,8 @@ module Google
216
216
  # Name of the user in the instance.
217
217
  # @param project [::String]
218
218
  # Project ID of the project that contains the instance.
219
+ # @param location [::String]
220
+ # Optional. Region of the Cloud SQL instance.
219
221
  # @yield [result, operation] Access the result along with the TransportOperation object
220
222
  # @yieldparam result [::Google::Cloud::Sql::V1beta4::Operation]
221
223
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -287,7 +289,7 @@ module Google
287
289
  # @param options [::Gapic::CallOptions, ::Hash]
288
290
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
289
291
  #
290
- # @overload get(instance: nil, name: nil, project: nil, host: nil)
292
+ # @overload get(instance: nil, name: nil, project: nil, host: nil, location: nil)
291
293
  # Pass arguments to `get` via keyword arguments. Note that at
292
294
  # least one keyword argument is required. To specify no parameters, or to keep all
293
295
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -300,6 +302,8 @@ module Google
300
302
  # Project ID of the project that contains the instance.
301
303
  # @param host [::String]
302
304
  # Host of a user of the instance.
305
+ # @param location [::String]
306
+ # Optional. Region of the Cloud SQL instance.
303
307
  # @yield [result, operation] Access the result along with the TransportOperation object
304
308
  # @yieldparam result [::Google::Cloud::Sql::V1beta4::User]
305
309
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -371,7 +375,7 @@ module Google
371
375
  # @param options [::Gapic::CallOptions, ::Hash]
372
376
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
373
377
  #
374
- # @overload insert(instance: nil, project: nil, body: nil)
378
+ # @overload insert(instance: nil, project: nil, body: nil, location: nil)
375
379
  # Pass arguments to `insert` via keyword arguments. Note that at
376
380
  # least one keyword argument is required. To specify no parameters, or to keep all
377
381
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -381,6 +385,8 @@ module Google
381
385
  # @param project [::String]
382
386
  # Project ID of the project that contains the instance.
383
387
  # @param body [::Google::Cloud::Sql::V1beta4::User, ::Hash]
388
+ # @param location [::String]
389
+ # Optional. Region of the Cloud SQL instance.
384
390
  # @yield [result, operation] Access the result along with the TransportOperation object
385
391
  # @yieldparam result [::Google::Cloud::Sql::V1beta4::Operation]
386
392
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -452,7 +458,7 @@ module Google
452
458
  # @param options [::Gapic::CallOptions, ::Hash]
453
459
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
454
460
  #
455
- # @overload list(instance: nil, project: nil)
461
+ # @overload list(instance: nil, project: nil, location: nil)
456
462
  # Pass arguments to `list` via keyword arguments. Note that at
457
463
  # least one keyword argument is required. To specify no parameters, or to keep all
458
464
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -461,6 +467,8 @@ module Google
461
467
  # Database instance ID. This does not include the project ID.
462
468
  # @param project [::String]
463
469
  # Project ID of the project that contains the instance.
470
+ # @param location [::String]
471
+ # Optional. Region of the Cloud SQL instance.
464
472
  # @yield [result, operation] Access the result along with the TransportOperation object
465
473
  # @yieldparam result [::Google::Cloud::Sql::V1beta4::UsersListResponse]
466
474
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -532,7 +540,7 @@ module Google
532
540
  # @param options [::Gapic::CallOptions, ::Hash]
533
541
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
534
542
  #
535
- # @overload update(host: nil, instance: nil, name: nil, project: nil, database_roles: nil, revoke_existing_roles: nil, server_roles: nil, revoke_existing_server_roles: nil, body: nil)
543
+ # @overload update(host: nil, instance: nil, name: nil, project: nil, database_roles: nil, revoke_existing_roles: nil, server_roles: nil, revoke_existing_server_roles: nil, body: nil, location: nil)
536
544
  # Pass arguments to `update` via keyword arguments. Note that at
537
545
  # least one keyword argument is required. To specify no parameters, or to keep all
538
546
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -561,6 +569,8 @@ module Google
561
569
  # in the `server_roles` field. If `false` or unset, the server roles
562
570
  # specified in `server_roles` are added to the user's existing server roles.
563
571
  # @param body [::Google::Cloud::Sql::V1beta4::User, ::Hash]
572
+ # @param location [::String]
573
+ # Optional. Region of the Cloud SQL instance.
564
574
  # @yield [result, operation] Access the result along with the TransportOperation object
565
575
  # @yieldparam result [::Google::Cloud::Sql::V1beta4::Operation]
566
576
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Sql
23
23
  module V1beta4
24
- VERSION = "0.1.1"
24
+ VERSION = "0.2.0"
25
25
  end
26
26
  end
27
27
  end
@@ -0,0 +1,463 @@
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
+
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. The order of
53
+ # the key-value pairs is undefined, the order of the `routing_parameters` in
54
+ # the `RoutingRule` only matters for the evaluation order of the path
55
+ # templates when `field` is the same. See the examples below for more details.
56
+ #
57
+ # Every key and value in the routing header must be percent-encoded,
58
+ # and joined together in the following format: `key1=value1&key2=value2`.
59
+ # The examples below skip the percent-encoding for readability.
60
+ #
61
+ # Example 1
62
+ #
63
+ # Extracting a field from the request to put into the routing header
64
+ # unchanged, with the key equal to the field name.
65
+ #
66
+ # annotation:
67
+ #
68
+ # option (google.api.routing) = {
69
+ # // Take the `app_profile_id`.
70
+ # routing_parameters {
71
+ # field: "app_profile_id"
72
+ # }
73
+ # };
74
+ #
75
+ # result:
76
+ #
77
+ # x-goog-request-params: app_profile_id=profiles/prof_qux
78
+ #
79
+ # Example 2
80
+ #
81
+ # Extracting a field from the request to put into the routing header
82
+ # unchanged, with the key different from the field name.
83
+ #
84
+ # annotation:
85
+ #
86
+ # option (google.api.routing) = {
87
+ # // Take the `app_profile_id`, but name it `routing_id` in the header.
88
+ # routing_parameters {
89
+ # field: "app_profile_id"
90
+ # path_template: "{routing_id=**}"
91
+ # }
92
+ # };
93
+ #
94
+ # result:
95
+ #
96
+ # x-goog-request-params: routing_id=profiles/prof_qux
97
+ #
98
+ # Example 3
99
+ #
100
+ # Extracting a field from the request to put into the routing
101
+ # header, while matching a path template syntax on the field's value.
102
+ #
103
+ # NB: it is more useful to send nothing than to send garbage for the purpose
104
+ # of dynamic routing, since garbage pollutes cache. Thus the matching.
105
+ #
106
+ # Sub-example 3a
107
+ #
108
+ # The field matches the template.
109
+ #
110
+ # annotation:
111
+ #
112
+ # option (google.api.routing) = {
113
+ # // Take the `table_name`, if it's well-formed (with project-based
114
+ # // syntax).
115
+ # routing_parameters {
116
+ # field: "table_name"
117
+ # path_template: "{table_name=projects/*/instances/*/**}"
118
+ # }
119
+ # };
120
+ #
121
+ # result:
122
+ #
123
+ # x-goog-request-params:
124
+ # table_name=projects/proj_foo/instances/instance_bar/table/table_baz
125
+ #
126
+ # Sub-example 3b
127
+ #
128
+ # The field does not match the template.
129
+ #
130
+ # annotation:
131
+ #
132
+ # option (google.api.routing) = {
133
+ # // Take the `table_name`, if it's well-formed (with region-based
134
+ # // syntax).
135
+ # routing_parameters {
136
+ # field: "table_name"
137
+ # path_template: "{table_name=regions/*/zones/*/**}"
138
+ # }
139
+ # };
140
+ #
141
+ # result:
142
+ #
143
+ # <no routing header will be sent>
144
+ #
145
+ # Sub-example 3c
146
+ #
147
+ # Multiple alternative conflictingly named path templates are
148
+ # specified. The one that matches is used to construct the header.
149
+ #
150
+ # annotation:
151
+ #
152
+ # option (google.api.routing) = {
153
+ # // Take the `table_name`, if it's well-formed, whether
154
+ # // using the region- or projects-based syntax.
155
+ #
156
+ # routing_parameters {
157
+ # field: "table_name"
158
+ # path_template: "{table_name=regions/*/zones/*/**}"
159
+ # }
160
+ # routing_parameters {
161
+ # field: "table_name"
162
+ # path_template: "{table_name=projects/*/instances/*/**}"
163
+ # }
164
+ # };
165
+ #
166
+ # result:
167
+ #
168
+ # x-goog-request-params:
169
+ # table_name=projects/proj_foo/instances/instance_bar/table/table_baz
170
+ #
171
+ # Example 4
172
+ #
173
+ # Extracting a single routing header key-value pair by matching a
174
+ # template syntax on (a part of) a single request field.
175
+ #
176
+ # annotation:
177
+ #
178
+ # option (google.api.routing) = {
179
+ # // Take just the project id from the `table_name` field.
180
+ # routing_parameters {
181
+ # field: "table_name"
182
+ # path_template: "{routing_id=projects/*}/**"
183
+ # }
184
+ # };
185
+ #
186
+ # result:
187
+ #
188
+ # x-goog-request-params: routing_id=projects/proj_foo
189
+ #
190
+ # Example 5
191
+ #
192
+ # Extracting a single routing header key-value pair by matching
193
+ # several conflictingly named path templates on (parts of) a single request
194
+ # field. The last template to match "wins" the conflict.
195
+ #
196
+ # annotation:
197
+ #
198
+ # option (google.api.routing) = {
199
+ # // If the `table_name` does not have instances information,
200
+ # // take just the project id for routing.
201
+ # // Otherwise take project + instance.
202
+ #
203
+ # routing_parameters {
204
+ # field: "table_name"
205
+ # path_template: "{routing_id=projects/*}/**"
206
+ # }
207
+ # routing_parameters {
208
+ # field: "table_name"
209
+ # path_template: "{routing_id=projects/*/instances/*}/**"
210
+ # }
211
+ # };
212
+ #
213
+ # result:
214
+ #
215
+ # x-goog-request-params:
216
+ # routing_id=projects/proj_foo/instances/instance_bar
217
+ #
218
+ # Example 6
219
+ #
220
+ # Extracting multiple routing header key-value pairs by matching
221
+ # several non-conflicting path templates on (parts of) a single request field.
222
+ #
223
+ # Sub-example 6a
224
+ #
225
+ # Make the templates strict, so that if the `table_name` does not
226
+ # have an instance information, nothing is sent.
227
+ #
228
+ # annotation:
229
+ #
230
+ # option (google.api.routing) = {
231
+ # // The routing code needs two keys instead of one composite
232
+ # // but works only for the tables with the "project-instance" name
233
+ # // syntax.
234
+ #
235
+ # routing_parameters {
236
+ # field: "table_name"
237
+ # path_template: "{project_id=projects/*}/instances/*/**"
238
+ # }
239
+ # routing_parameters {
240
+ # field: "table_name"
241
+ # path_template: "projects/*/{instance_id=instances/*}/**"
242
+ # }
243
+ # };
244
+ #
245
+ # result:
246
+ #
247
+ # x-goog-request-params:
248
+ # project_id=projects/proj_foo&instance_id=instances/instance_bar
249
+ #
250
+ # Sub-example 6b
251
+ #
252
+ # Make the templates loose, so that if the `table_name` does not
253
+ # have an instance information, just the project id part is sent.
254
+ #
255
+ # annotation:
256
+ #
257
+ # option (google.api.routing) = {
258
+ # // The routing code wants two keys instead of one composite
259
+ # // but will work with just the `project_id` for tables without
260
+ # // an instance in the `table_name`.
261
+ #
262
+ # routing_parameters {
263
+ # field: "table_name"
264
+ # path_template: "{project_id=projects/*}/**"
265
+ # }
266
+ # routing_parameters {
267
+ # field: "table_name"
268
+ # path_template: "projects/*/{instance_id=instances/*}/**"
269
+ # }
270
+ # };
271
+ #
272
+ # result (is the same as 6a for our example message because it has the instance
273
+ # information):
274
+ #
275
+ # x-goog-request-params:
276
+ # project_id=projects/proj_foo&instance_id=instances/instance_bar
277
+ #
278
+ # Example 7
279
+ #
280
+ # Extracting multiple routing header key-value pairs by matching
281
+ # several path templates on multiple request fields.
282
+ #
283
+ # NB: note that here there is no way to specify sending nothing if one of the
284
+ # fields does not match its template. E.g. if the `table_name` is in the wrong
285
+ # format, the `project_id` will not be sent, but the `routing_id` will be.
286
+ # The backend routing code has to be aware of that and be prepared to not
287
+ # receive a full complement of keys if it expects multiple.
288
+ #
289
+ # annotation:
290
+ #
291
+ # option (google.api.routing) = {
292
+ # // The routing needs both `project_id` and `routing_id`
293
+ # // (from the `app_profile_id` field) for routing.
294
+ #
295
+ # routing_parameters {
296
+ # field: "table_name"
297
+ # path_template: "{project_id=projects/*}/**"
298
+ # }
299
+ # routing_parameters {
300
+ # field: "app_profile_id"
301
+ # path_template: "{routing_id=**}"
302
+ # }
303
+ # };
304
+ #
305
+ # result:
306
+ #
307
+ # x-goog-request-params:
308
+ # project_id=projects/proj_foo&routing_id=profiles/prof_qux
309
+ #
310
+ # Example 8
311
+ #
312
+ # Extracting a single routing header key-value pair by matching
313
+ # several conflictingly named path templates on several request fields. The
314
+ # last template to match "wins" the conflict.
315
+ #
316
+ # annotation:
317
+ #
318
+ # option (google.api.routing) = {
319
+ # // The `routing_id` can be a project id or a region id depending on
320
+ # // the table name format, but only if the `app_profile_id` is not set.
321
+ # // If `app_profile_id` is set it should be used instead.
322
+ #
323
+ # routing_parameters {
324
+ # field: "table_name"
325
+ # path_template: "{routing_id=projects/*}/**"
326
+ # }
327
+ # routing_parameters {
328
+ # field: "table_name"
329
+ # path_template: "{routing_id=regions/*}/**"
330
+ # }
331
+ # routing_parameters {
332
+ # field: "app_profile_id"
333
+ # path_template: "{routing_id=**}"
334
+ # }
335
+ # };
336
+ #
337
+ # result:
338
+ #
339
+ # x-goog-request-params: routing_id=profiles/prof_qux
340
+ #
341
+ # Example 9
342
+ #
343
+ # Bringing it all together.
344
+ #
345
+ # annotation:
346
+ #
347
+ # option (google.api.routing) = {
348
+ # // For routing both `table_location` and a `routing_id` are needed.
349
+ # //
350
+ # // table_location can be either an instance id or a region+zone id.
351
+ # //
352
+ # // For `routing_id`, take the value of `app_profile_id`
353
+ # // - If it's in the format `profiles/<profile_id>`, send
354
+ # // just the `<profile_id>` part.
355
+ # // - If it's any other literal, send it as is.
356
+ # // If the `app_profile_id` is empty, and the `table_name` starts with
357
+ # // the project_id, send that instead.
358
+ #
359
+ # routing_parameters {
360
+ # field: "table_name"
361
+ # path_template: "projects/*/{table_location=instances/*}/tables/*"
362
+ # }
363
+ # routing_parameters {
364
+ # field: "table_name"
365
+ # path_template: "{table_location=regions/*/zones/*}/tables/*"
366
+ # }
367
+ # routing_parameters {
368
+ # field: "table_name"
369
+ # path_template: "{routing_id=projects/*}/**"
370
+ # }
371
+ # routing_parameters {
372
+ # field: "app_profile_id"
373
+ # path_template: "{routing_id=**}"
374
+ # }
375
+ # routing_parameters {
376
+ # field: "app_profile_id"
377
+ # path_template: "profiles/{routing_id=*}"
378
+ # }
379
+ # };
380
+ #
381
+ # result:
382
+ #
383
+ # x-goog-request-params:
384
+ # table_location=instances/instance_bar&routing_id=prof_qux
385
+ # @!attribute [rw] routing_parameters
386
+ # @return [::Array<::Google::Api::RoutingParameter>]
387
+ # A collection of Routing Parameter specifications.
388
+ # **NOTE:** If multiple Routing Parameters describe the same key
389
+ # (via the `path_template` field or via the `field` field when
390
+ # `path_template` is not provided), "last one wins" rule
391
+ # determines which Parameter gets used.
392
+ # See the examples for more details.
393
+ class RoutingRule
394
+ include ::Google::Protobuf::MessageExts
395
+ extend ::Google::Protobuf::MessageExts::ClassMethods
396
+ end
397
+
398
+ # A projection from an input message to the GRPC or REST header.
399
+ # @!attribute [rw] field
400
+ # @return [::String]
401
+ # A request field to extract the header key-value pair from.
402
+ # @!attribute [rw] path_template
403
+ # @return [::String]
404
+ # A pattern matching the key-value field. Optional.
405
+ # If not specified, the whole field specified in the `field` field will be
406
+ # taken as value, and its name used as key. If specified, it MUST contain
407
+ # exactly one named segment (along with any number of unnamed segments) The
408
+ # pattern will be matched over the field specified in the `field` field, then
409
+ # if the match is successful:
410
+ # - the name of the single named segment will be used as a header name,
411
+ # - the match value of the segment will be used as a header value;
412
+ # if the match is NOT successful, nothing will be sent.
413
+ #
414
+ # Example:
415
+ #
416
+ # -- This is a field in the request message
417
+ # | that the header value will be extracted from.
418
+ # |
419
+ # | -- This is the key name in the
420
+ # | | routing header.
421
+ # V |
422
+ # field: "table_name" v
423
+ # path_template: "projects/*/{table_location=instances/*}/tables/*"
424
+ # ^ ^
425
+ # | |
426
+ # In the {} brackets is the pattern that -- |
427
+ # specifies what to extract from the |
428
+ # field as a value to be sent. |
429
+ # |
430
+ # The string in the field must match the whole pattern --
431
+ # before brackets, inside brackets, after brackets.
432
+ #
433
+ # When looking at this specific example, we can see that:
434
+ # - A key-value pair with the key `table_location`
435
+ # and the value matching `instances/*` should be added
436
+ # to the x-goog-request-params routing header.
437
+ # - The value is extracted from the request message's `table_name` field
438
+ # if it matches the full pattern specified:
439
+ # `projects/*/instances/*/tables/*`.
440
+ #
441
+ # **NB:** If the `path_template` field is not provided, the key name is
442
+ # equal to the field name, and the whole field should be sent as a value.
443
+ # This makes the pattern for the field and the value functionally equivalent
444
+ # to `**`, and the configuration
445
+ #
446
+ # {
447
+ # field: "table_name"
448
+ # }
449
+ #
450
+ # is a functionally equivalent shorthand to:
451
+ #
452
+ # {
453
+ # field: "table_name"
454
+ # path_template: "{table_name=**}"
455
+ # }
456
+ #
457
+ # See Example 1 for more details.
458
+ class RoutingParameter
459
+ include ::Google::Protobuf::MessageExts
460
+ extend ::Google::Protobuf::MessageExts::ClassMethods
461
+ end
462
+ end
463
+ end