-
Notifications
You must be signed in to change notification settings - Fork 461
Expand file tree
/
Copy pathTable.php
More file actions
721 lines (675 loc) · 31.5 KB
/
Table.php
File metadata and controls
721 lines (675 loc) · 31.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/bigtable/admin/v2/table.proto
namespace Google\Cloud\Bigtable\Admin\V2;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* A collection of user data indexed by row, column, and timestamp.
* Each table is served using the resources of its parent cluster.
*
* Generated from protobuf message <code>google.bigtable.admin.v2.Table</code>
*/
class Table extends \Google\Protobuf\Internal\Message
{
/**
* The unique name of the table. Values are of the form
* `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
* Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
*
* Generated from protobuf field <code>string name = 1;</code>
*/
protected $name = '';
/**
* Output only. Map from cluster ID to per-cluster table state.
* If it could not be determined whether or not the table has data in a
* particular cluster (for example, if its zone is unavailable), then
* there will be an entry for the cluster with UNKNOWN `replication_status`.
* Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
*
* Generated from protobuf field <code>map<string, .google.bigtable.admin.v2.Table.ClusterState> cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
private $cluster_states;
/**
* The column families configured for this table, mapped by column family ID.
* Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
*
* Generated from protobuf field <code>map<string, .google.bigtable.admin.v2.ColumnFamily> column_families = 3;</code>
*/
private $column_families;
/**
* Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored
* in this table. Timestamps not matching the granularity will be rejected. If
* unspecified at creation time, the value will be set to `MILLIS`. Views:
* `SCHEMA_VIEW`, `FULL`.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.Table.TimestampGranularity granularity = 4 [(.google.api.field_behavior) = IMMUTABLE];</code>
*/
protected $granularity = 0;
/**
* Output only. If this table was restored from another data source (e.g. a
* backup), this field will be populated with information about the restore.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $restore_info = null;
/**
* If specified, enable the change stream on this table.
* Otherwise, the change stream is disabled and the change stream is not
* retained.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8;</code>
*/
protected $change_stream_config = null;
/**
* Set to true to make the table protected against data loss. i.e. deleting
* the following resources through Admin APIs are prohibited:
* * The table.
* * The column families in the table.
* * The instance containing the table.
* Note one can still delete the data stored in the table through Data APIs.
*
* Generated from protobuf field <code>bool deletion_protection = 9;</code>
*/
protected $deletion_protection = false;
/**
* Rules to specify what data is stored in each storage tier.
* Different tiers store data differently, providing different trade-offs
* between cost and performance. Different parts of a table can be stored
* separately on different tiers.
* If a config is specified, tiered storage is enabled for this table.
* Otherwise, tiered storage is disabled.
* Only SSD instances can configure tiered storage.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14;</code>
*/
protected $tiered_storage_config = null;
/**
* The row key schema for this table. The schema is used to decode the raw row
* key bytes into a structured format. The order of field declarations in this
* schema is important, as it reflects how the raw row key bytes are
* structured. Currently, this only affects how the key is read via a
* GoogleSQL query from the ExecuteQuery API.
* For a SQL query, the _key column is still read as raw bytes. But queries
* can reference the key fields by name, which will be decoded from _key using
* provided type and encoding. Queries that reference key fields will fail if
* they encounter an invalid row key.
* For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
* following schema:
* {
* fields {
* field_name: "id"
* type { string { encoding: utf8_bytes {} } }
* }
* fields {
* field_name: "date"
* type { string { encoding: utf8_bytes {} } }
* }
* fields {
* field_name: "product_code"
* type { int64 { encoding: big_endian_bytes {} } }
* }
* encoding { delimited_bytes { delimiter: "#" } }
* }
* The decoded key parts would be:
* id = "some_id", date = "2024-04-30", product_code = 1245427
* The query "SELECT _key, product_code FROM table" will return two columns:
* /------------------------------------------------------\
* | _key | product_code |
* | --------------------------------------|--------------|
* | "some_id#2024-04-30#\x00\x13\x00\xf3" | 1245427 |
* \------------------------------------------------------/
* The schema has the following invariants:
* (1) The decoded field values are order-preserved. For read, the field
* values will be decoded in sorted mode from the raw bytes.
* (2) Every field in the schema must specify a non-empty name.
* (3) Every field must specify a type with an associated encoding. The type
* is limited to scalar types only: Array, Map, Aggregate, and Struct are not
* allowed.
* (4) The field names must not collide with existing column family
* names and reserved keywords "_key" and "_timestamp".
* The following update operations are allowed for row_key_schema:
* - Update from an empty schema to a new schema.
* - Remove the existing schema. This operation requires setting the
* `ignore_warnings` flag to `true`, since it might be a backward
* incompatible change. Without the flag, the update request will fail with
* an INVALID_ARGUMENT error.
* Any other row key schema update operation (e.g. update existing schema
* columns names or types) is currently unsupported.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.Type.Struct row_key_schema = 15;</code>
*/
protected $row_key_schema = null;
protected $automated_backup_config;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* The unique name of the table. Values are of the form
* `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
* Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
* @type array|\Google\Protobuf\Internal\MapField $cluster_states
* Output only. Map from cluster ID to per-cluster table state.
* If it could not be determined whether or not the table has data in a
* particular cluster (for example, if its zone is unavailable), then
* there will be an entry for the cluster with UNKNOWN `replication_status`.
* Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
* @type array|\Google\Protobuf\Internal\MapField $column_families
* The column families configured for this table, mapped by column family ID.
* Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
* @type int $granularity
* Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored
* in this table. Timestamps not matching the granularity will be rejected. If
* unspecified at creation time, the value will be set to `MILLIS`. Views:
* `SCHEMA_VIEW`, `FULL`.
* @type \Google\Cloud\Bigtable\Admin\V2\RestoreInfo $restore_info
* Output only. If this table was restored from another data source (e.g. a
* backup), this field will be populated with information about the restore.
* @type \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig $change_stream_config
* If specified, enable the change stream on this table.
* Otherwise, the change stream is disabled and the change stream is not
* retained.
* @type bool $deletion_protection
* Set to true to make the table protected against data loss. i.e. deleting
* the following resources through Admin APIs are prohibited:
* * The table.
* * The column families in the table.
* * The instance containing the table.
* Note one can still delete the data stored in the table through Data APIs.
* @type \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy $automated_backup_policy
* If specified, automated backups are enabled for this table.
* Otherwise, automated backups are disabled.
* @type \Google\Cloud\Bigtable\Admin\V2\TieredStorageConfig $tiered_storage_config
* Rules to specify what data is stored in each storage tier.
* Different tiers store data differently, providing different trade-offs
* between cost and performance. Different parts of a table can be stored
* separately on different tiers.
* If a config is specified, tiered storage is enabled for this table.
* Otherwise, tiered storage is disabled.
* Only SSD instances can configure tiered storage.
* @type \Google\Cloud\Bigtable\Admin\V2\Type\Struct $row_key_schema
* The row key schema for this table. The schema is used to decode the raw row
* key bytes into a structured format. The order of field declarations in this
* schema is important, as it reflects how the raw row key bytes are
* structured. Currently, this only affects how the key is read via a
* GoogleSQL query from the ExecuteQuery API.
* For a SQL query, the _key column is still read as raw bytes. But queries
* can reference the key fields by name, which will be decoded from _key using
* provided type and encoding. Queries that reference key fields will fail if
* they encounter an invalid row key.
* For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
* following schema:
* {
* fields {
* field_name: "id"
* type { string { encoding: utf8_bytes {} } }
* }
* fields {
* field_name: "date"
* type { string { encoding: utf8_bytes {} } }
* }
* fields {
* field_name: "product_code"
* type { int64 { encoding: big_endian_bytes {} } }
* }
* encoding { delimited_bytes { delimiter: "#" } }
* }
* The decoded key parts would be:
* id = "some_id", date = "2024-04-30", product_code = 1245427
* The query "SELECT _key, product_code FROM table" will return two columns:
* /------------------------------------------------------\
* | _key | product_code |
* | --------------------------------------|--------------|
* | "some_id#2024-04-30#\x00\x13\x00\xf3" | 1245427 |
* \------------------------------------------------------/
* The schema has the following invariants:
* (1) The decoded field values are order-preserved. For read, the field
* values will be decoded in sorted mode from the raw bytes.
* (2) Every field in the schema must specify a non-empty name.
* (3) Every field must specify a type with an associated encoding. The type
* is limited to scalar types only: Array, Map, Aggregate, and Struct are not
* allowed.
* (4) The field names must not collide with existing column family
* names and reserved keywords "_key" and "_timestamp".
* The following update operations are allowed for row_key_schema:
* - Update from an empty schema to a new schema.
* - Remove the existing schema. This operation requires setting the
* `ignore_warnings` flag to `true`, since it might be a backward
* incompatible change. Without the flag, the update request will fail with
* an INVALID_ARGUMENT error.
* Any other row key schema update operation (e.g. update existing schema
* columns names or types) is currently unsupported.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce();
parent::__construct($data);
}
/**
* The unique name of the table. Values are of the form
* `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
* Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
*
* Generated from protobuf field <code>string name = 1;</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The unique name of the table. Values are of the form
* `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
* Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
*
* Generated from protobuf field <code>string name = 1;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Output only. Map from cluster ID to per-cluster table state.
* If it could not be determined whether or not the table has data in a
* particular cluster (for example, if its zone is unavailable), then
* there will be an entry for the cluster with UNKNOWN `replication_status`.
* Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
*
* Generated from protobuf field <code>map<string, .google.bigtable.admin.v2.Table.ClusterState> cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getClusterStates()
{
return $this->cluster_states;
}
/**
* Output only. Map from cluster ID to per-cluster table state.
* If it could not be determined whether or not the table has data in a
* particular cluster (for example, if its zone is unavailable), then
* there will be an entry for the cluster with UNKNOWN `replication_status`.
* Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
*
* Generated from protobuf field <code>map<string, .google.bigtable.admin.v2.Table.ClusterState> cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setClusterStates($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Table\ClusterState::class);
$this->cluster_states = $arr;
return $this;
}
/**
* The column families configured for this table, mapped by column family ID.
* Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
*
* Generated from protobuf field <code>map<string, .google.bigtable.admin.v2.ColumnFamily> column_families = 3;</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getColumnFamilies()
{
return $this->column_families;
}
/**
* The column families configured for this table, mapped by column family ID.
* Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
*
* Generated from protobuf field <code>map<string, .google.bigtable.admin.v2.ColumnFamily> column_families = 3;</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setColumnFamilies($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\ColumnFamily::class);
$this->column_families = $arr;
return $this;
}
/**
* Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored
* in this table. Timestamps not matching the granularity will be rejected. If
* unspecified at creation time, the value will be set to `MILLIS`. Views:
* `SCHEMA_VIEW`, `FULL`.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.Table.TimestampGranularity granularity = 4 [(.google.api.field_behavior) = IMMUTABLE];</code>
* @return int
*/
public function getGranularity()
{
return $this->granularity;
}
/**
* Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored
* in this table. Timestamps not matching the granularity will be rejected. If
* unspecified at creation time, the value will be set to `MILLIS`. Views:
* `SCHEMA_VIEW`, `FULL`.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.Table.TimestampGranularity granularity = 4 [(.google.api.field_behavior) = IMMUTABLE];</code>
* @param int $var
* @return $this
*/
public function setGranularity($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table\TimestampGranularity::class);
$this->granularity = $var;
return $this;
}
/**
* Output only. If this table was restored from another data source (e.g. a
* backup), this field will be populated with information about the restore.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return \Google\Cloud\Bigtable\Admin\V2\RestoreInfo|null
*/
public function getRestoreInfo()
{
return $this->restore_info;
}
public function hasRestoreInfo()
{
return isset($this->restore_info);
}
public function clearRestoreInfo()
{
unset($this->restore_info);
}
/**
* Output only. If this table was restored from another data source (e.g. a
* backup), this field will be populated with information about the restore.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param \Google\Cloud\Bigtable\Admin\V2\RestoreInfo $var
* @return $this
*/
public function setRestoreInfo($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\RestoreInfo::class);
$this->restore_info = $var;
return $this;
}
/**
* If specified, enable the change stream on this table.
* Otherwise, the change stream is disabled and the change stream is not
* retained.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8;</code>
* @return \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig|null
*/
public function getChangeStreamConfig()
{
return $this->change_stream_config;
}
public function hasChangeStreamConfig()
{
return isset($this->change_stream_config);
}
public function clearChangeStreamConfig()
{
unset($this->change_stream_config);
}
/**
* If specified, enable the change stream on this table.
* Otherwise, the change stream is disabled and the change stream is not
* retained.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8;</code>
* @param \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig $var
* @return $this
*/
public function setChangeStreamConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig::class);
$this->change_stream_config = $var;
return $this;
}
/**
* Set to true to make the table protected against data loss. i.e. deleting
* the following resources through Admin APIs are prohibited:
* * The table.
* * The column families in the table.
* * The instance containing the table.
* Note one can still delete the data stored in the table through Data APIs.
*
* Generated from protobuf field <code>bool deletion_protection = 9;</code>
* @return bool
*/
public function getDeletionProtection()
{
return $this->deletion_protection;
}
/**
* Set to true to make the table protected against data loss. i.e. deleting
* the following resources through Admin APIs are prohibited:
* * The table.
* * The column families in the table.
* * The instance containing the table.
* Note one can still delete the data stored in the table through Data APIs.
*
* Generated from protobuf field <code>bool deletion_protection = 9;</code>
* @param bool $var
* @return $this
*/
public function setDeletionProtection($var)
{
GPBUtil::checkBool($var);
$this->deletion_protection = $var;
return $this;
}
/**
* If specified, automated backups are enabled for this table.
* Otherwise, automated backups are disabled.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.Table.AutomatedBackupPolicy automated_backup_policy = 13;</code>
* @return \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy|null
*/
public function getAutomatedBackupPolicy()
{
return $this->readOneof(13);
}
public function hasAutomatedBackupPolicy()
{
return $this->hasOneof(13);
}
/**
* If specified, automated backups are enabled for this table.
* Otherwise, automated backups are disabled.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.Table.AutomatedBackupPolicy automated_backup_policy = 13;</code>
* @param \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy $var
* @return $this
*/
public function setAutomatedBackupPolicy($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy::class);
$this->writeOneof(13, $var);
return $this;
}
/**
* Rules to specify what data is stored in each storage tier.
* Different tiers store data differently, providing different trade-offs
* between cost and performance. Different parts of a table can be stored
* separately on different tiers.
* If a config is specified, tiered storage is enabled for this table.
* Otherwise, tiered storage is disabled.
* Only SSD instances can configure tiered storage.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14;</code>
* @return \Google\Cloud\Bigtable\Admin\V2\TieredStorageConfig|null
*/
public function getTieredStorageConfig()
{
return $this->tiered_storage_config;
}
public function hasTieredStorageConfig()
{
return isset($this->tiered_storage_config);
}
public function clearTieredStorageConfig()
{
unset($this->tiered_storage_config);
}
/**
* Rules to specify what data is stored in each storage tier.
* Different tiers store data differently, providing different trade-offs
* between cost and performance. Different parts of a table can be stored
* separately on different tiers.
* If a config is specified, tiered storage is enabled for this table.
* Otherwise, tiered storage is disabled.
* Only SSD instances can configure tiered storage.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14;</code>
* @param \Google\Cloud\Bigtable\Admin\V2\TieredStorageConfig $var
* @return $this
*/
public function setTieredStorageConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\TieredStorageConfig::class);
$this->tiered_storage_config = $var;
return $this;
}
/**
* The row key schema for this table. The schema is used to decode the raw row
* key bytes into a structured format. The order of field declarations in this
* schema is important, as it reflects how the raw row key bytes are
* structured. Currently, this only affects how the key is read via a
* GoogleSQL query from the ExecuteQuery API.
* For a SQL query, the _key column is still read as raw bytes. But queries
* can reference the key fields by name, which will be decoded from _key using
* provided type and encoding. Queries that reference key fields will fail if
* they encounter an invalid row key.
* For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
* following schema:
* {
* fields {
* field_name: "id"
* type { string { encoding: utf8_bytes {} } }
* }
* fields {
* field_name: "date"
* type { string { encoding: utf8_bytes {} } }
* }
* fields {
* field_name: "product_code"
* type { int64 { encoding: big_endian_bytes {} } }
* }
* encoding { delimited_bytes { delimiter: "#" } }
* }
* The decoded key parts would be:
* id = "some_id", date = "2024-04-30", product_code = 1245427
* The query "SELECT _key, product_code FROM table" will return two columns:
* /------------------------------------------------------\
* | _key | product_code |
* | --------------------------------------|--------------|
* | "some_id#2024-04-30#\x00\x13\x00\xf3" | 1245427 |
* \------------------------------------------------------/
* The schema has the following invariants:
* (1) The decoded field values are order-preserved. For read, the field
* values will be decoded in sorted mode from the raw bytes.
* (2) Every field in the schema must specify a non-empty name.
* (3) Every field must specify a type with an associated encoding. The type
* is limited to scalar types only: Array, Map, Aggregate, and Struct are not
* allowed.
* (4) The field names must not collide with existing column family
* names and reserved keywords "_key" and "_timestamp".
* The following update operations are allowed for row_key_schema:
* - Update from an empty schema to a new schema.
* - Remove the existing schema. This operation requires setting the
* `ignore_warnings` flag to `true`, since it might be a backward
* incompatible change. Without the flag, the update request will fail with
* an INVALID_ARGUMENT error.
* Any other row key schema update operation (e.g. update existing schema
* columns names or types) is currently unsupported.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.Type.Struct row_key_schema = 15;</code>
* @return \Google\Cloud\Bigtable\Admin\V2\Type\Struct|null
*/
public function getRowKeySchema()
{
return $this->row_key_schema;
}
public function hasRowKeySchema()
{
return isset($this->row_key_schema);
}
public function clearRowKeySchema()
{
unset($this->row_key_schema);
}
/**
* The row key schema for this table. The schema is used to decode the raw row
* key bytes into a structured format. The order of field declarations in this
* schema is important, as it reflects how the raw row key bytes are
* structured. Currently, this only affects how the key is read via a
* GoogleSQL query from the ExecuteQuery API.
* For a SQL query, the _key column is still read as raw bytes. But queries
* can reference the key fields by name, which will be decoded from _key using
* provided type and encoding. Queries that reference key fields will fail if
* they encounter an invalid row key.
* For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
* following schema:
* {
* fields {
* field_name: "id"
* type { string { encoding: utf8_bytes {} } }
* }
* fields {
* field_name: "date"
* type { string { encoding: utf8_bytes {} } }
* }
* fields {
* field_name: "product_code"
* type { int64 { encoding: big_endian_bytes {} } }
* }
* encoding { delimited_bytes { delimiter: "#" } }
* }
* The decoded key parts would be:
* id = "some_id", date = "2024-04-30", product_code = 1245427
* The query "SELECT _key, product_code FROM table" will return two columns:
* /------------------------------------------------------\
* | _key | product_code |
* | --------------------------------------|--------------|
* | "some_id#2024-04-30#\x00\x13\x00\xf3" | 1245427 |
* \------------------------------------------------------/
* The schema has the following invariants:
* (1) The decoded field values are order-preserved. For read, the field
* values will be decoded in sorted mode from the raw bytes.
* (2) Every field in the schema must specify a non-empty name.
* (3) Every field must specify a type with an associated encoding. The type
* is limited to scalar types only: Array, Map, Aggregate, and Struct are not
* allowed.
* (4) The field names must not collide with existing column family
* names and reserved keywords "_key" and "_timestamp".
* The following update operations are allowed for row_key_schema:
* - Update from an empty schema to a new schema.
* - Remove the existing schema. This operation requires setting the
* `ignore_warnings` flag to `true`, since it might be a backward
* incompatible change. Without the flag, the update request will fail with
* an INVALID_ARGUMENT error.
* Any other row key schema update operation (e.g. update existing schema
* columns names or types) is currently unsupported.
*
* Generated from protobuf field <code>.google.bigtable.admin.v2.Type.Struct row_key_schema = 15;</code>
* @param \Google\Cloud\Bigtable\Admin\V2\Type\Struct $var
* @return $this
*/
public function setRowKeySchema($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Struct::class);
$this->row_key_schema = $var;
return $this;
}
/**
* @return string
*/
public function getAutomatedBackupConfig()
{
return $this->whichOneof("automated_backup_config");
}
}