Skip to content

Commit 46ce5b8

Browse files
committed
src test and protos copied over
1 parent e8a5ab8 commit 46ce5b8

14 files changed

+15143
-13722
lines changed

protos/google/bigtable/admin/v2/bigtable_instance_admin.proto

-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ message CreateInstanceRequest {
309309
// cluster ID, e.g., just `mycluster` rather than
310310
// `projects/myproject/instances/myinstance/clusters/mycluster`.
311311
// Fields marked `OutputOnly` must be left blank.
312-
// Currently, at most four clusters can be specified.
313312
map<string, Cluster> clusters = 4 [(google.api.field_behavior) = REQUIRED];
314313
}
315314

protos/google/bigtable/admin/v2/bigtable_table_admin.proto

+201-57
Large diffs are not rendered by default.

protos/google/bigtable/admin/v2/instance.proto

+47-31
Original file line numberDiff line numberDiff line change
@@ -82,30 +82,33 @@ message Instance {
8282
// to avoid confusion.
8383
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
8484

85-
// (`OutputOnly`)
86-
// The current state of the instance.
87-
State state = 3;
85+
// Output only. The current state of the instance.
86+
State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
8887

89-
// The type of the instance. Defaults to `PRODUCTION`.
90-
Type type = 4;
88+
// Required. The type of the instance. Defaults to `PRODUCTION`.
89+
Type type = 4 [(google.api.field_behavior) = REQUIRED];
9190

92-
// Labels are a flexible and lightweight mechanism for organizing cloud
93-
// resources into groups that reflect a customer's organizational needs and
94-
// deployment strategies. They can be used to filter resources and aggregate
95-
// metrics.
91+
// Required. Labels are a flexible and lightweight mechanism for organizing
92+
// cloud resources into groups that reflect a customer's organizational needs
93+
// and deployment strategies. They can be used to filter resources and
94+
// aggregate metrics.
9695
//
9796
// * Label keys must be between 1 and 63 characters long and must conform to
9897
// the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
9998
// * Label values must be between 0 and 63 characters long and must conform to
10099
// the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
101100
// * No more than 64 labels can be associated with a given resource.
102101
// * Keys and values must both be under 128 bytes.
103-
map<string, string> labels = 5;
102+
map<string, string> labels = 5 [(google.api.field_behavior) = REQUIRED];
103+
104+
// Output only. A server-assigned timestamp representing when this Instance
105+
// was created. For instances created before this field was added (August
106+
// 2021), this value is `seconds: 0, nanos: 1`.
107+
google.protobuf.Timestamp create_time = 7
108+
[(google.api.field_behavior) = OUTPUT_ONLY];
104109

105-
// Output only. A server-assigned timestamp representing when this Instance was created.
106-
// For instances created before this field was added (August 2021), this value
107-
// is `seconds: 0, nanos: 1`.
108-
google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
110+
// Output only. Reserved for future use.
111+
optional bool satisfies_pzs = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
109112
}
110113

111114
// The Autoscaling targets for a Cluster. These determine the recommended nodes.
@@ -115,6 +118,14 @@ message AutoscalingTargets {
115118
// 100 (total utilization), and is limited between 10 and 80, otherwise it
116119
// will return INVALID_ARGUMENT error.
117120
int32 cpu_utilization_percent = 2;
121+
122+
// The storage utilization that the Autoscaler should be trying to achieve.
123+
// This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD
124+
// cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster,
125+
// otherwise it will return INVALID_ARGUMENT error. If this value is set to 0,
126+
// it will be treated as if it were set to the default value: 2560 for SSD,
127+
// 8192 for HDD.
128+
int32 storage_utilization_gib_per_node = 3;
118129
}
119130

120131
// Limits for the number of nodes a Cluster can autoscale up/down to.
@@ -163,10 +174,12 @@ message Cluster {
163174
// Autoscaling config for a cluster.
164175
message ClusterAutoscalingConfig {
165176
// Required. Autoscaling limits for this cluster.
166-
AutoscalingLimits autoscaling_limits = 1 [(google.api.field_behavior) = REQUIRED];
177+
AutoscalingLimits autoscaling_limits = 1
178+
[(google.api.field_behavior) = REQUIRED];
167179

168180
// Required. Autoscaling targets for this cluster.
169-
AutoscalingTargets autoscaling_targets = 2 [(google.api.field_behavior) = REQUIRED];
181+
AutoscalingTargets autoscaling_targets = 2
182+
[(google.api.field_behavior) = REQUIRED];
170183
}
171184

172185
// Configuration for a cluster.
@@ -185,20 +198,19 @@ message Cluster {
185198
// `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
186199
// 2) Only regional keys can be used and the region of the CMEK key must
187200
// match the region of the cluster.
188-
// 3) All clusters within an instance must use the same CMEK key.
189201
// Values are of the form
190202
// `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
191203
string kms_key_name = 1 [(google.api.resource_reference) = {
192-
type: "cloudkms.googleapis.com/CryptoKey"
193-
}];
204+
type: "cloudkms.googleapis.com/CryptoKey"
205+
}];
194206
}
195207

196208
// The unique name of the cluster. Values are of the form
197209
// `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`.
198210
string name = 1;
199211

200-
// Immutable. The location where this cluster's nodes and storage reside. For best
201-
// performance, clients should be located as close as possible to this
212+
// Immutable. The location where this cluster's nodes and storage reside. For
213+
// best performance, clients should be located as close as possible to this
202214
// cluster. Currently only zones are supported, so values should be of the
203215
// form `projects/{project}/locations/{zone}`.
204216
string location = 2 [
@@ -222,10 +234,12 @@ message Cluster {
222234

223235
// Immutable. The type of storage used by this cluster to serve its
224236
// parent instance's tables, unless explicitly overridden.
225-
StorageType default_storage_type = 5 [(google.api.field_behavior) = IMMUTABLE];
237+
StorageType default_storage_type = 5
238+
[(google.api.field_behavior) = IMMUTABLE];
226239

227240
// Immutable. The encryption configuration for CMEK-protected clusters.
228-
EncryptionConfig encryption_config = 6 [(google.api.field_behavior) = IMMUTABLE];
241+
EncryptionConfig encryption_config = 6
242+
[(google.api.field_behavior) = IMMUTABLE];
229243
}
230244

231245
// A configuration object describing how Cloud Bigtable should treat traffic
@@ -306,24 +320,26 @@ message HotTablet {
306320
// Name of the table that contains the tablet. Values are of the form
307321
// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
308322
string table_name = 2 [(google.api.resource_reference) = {
309-
type: "bigtableadmin.googleapis.com/Table"
310-
}];
323+
type: "bigtableadmin.googleapis.com/Table"
324+
}];
311325

312326
// Output only. The start time of the hot tablet.
313-
google.protobuf.Timestamp start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
327+
google.protobuf.Timestamp start_time = 3
328+
[(google.api.field_behavior) = OUTPUT_ONLY];
314329

315330
// Output only. The end time of the hot tablet.
316-
google.protobuf.Timestamp end_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
331+
google.protobuf.Timestamp end_time = 4
332+
[(google.api.field_behavior) = OUTPUT_ONLY];
317333

318334
// Tablet Start Key (inclusive).
319335
string start_key = 5;
320336

321337
// Tablet End Key (inclusive).
322338
string end_key = 6;
323339

324-
// Output only. The average CPU usage spent by a node on this tablet over the start_time to
325-
// end_time time range. The percentage is the amount of CPU used by the node
326-
// to serve the tablet, from 0% (tablet was not interacted with) to 100% (the
327-
// node spent all cycles serving the hot tablet).
340+
// Output only. The average CPU usage spent by a node on this tablet over the
341+
// start_time to end_time time range. The percentage is the amount of CPU used
342+
// by the node to serve the tablet, from 0% (tablet was not interacted with)
343+
// to 100% (the node spent all cycles serving the hot tablet).
328344
float node_cpu_usage_percent = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
329345
}

protos/google/bigtable/admin/v2/table.proto

+49-35
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ option (google.api.resource_definition) = {
3434
pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}"
3535
};
3636

37-
3837
// Information about a table restore.
3938
message RestoreInfo {
4039
// The type of the restore source.
@@ -88,14 +87,16 @@ message Table {
8887
}
8988

9089
// Output only. The state of replication for the table in this cluster.
91-
ReplicationState replication_state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
90+
ReplicationState replication_state = 1
91+
[(google.api.field_behavior) = OUTPUT_ONLY];
9292

9393
// Output only. The encryption information for the table in this cluster.
9494
// If the encryption key protecting this resource is customer managed, then
9595
// its version can be rotated in Cloud Key Management Service (Cloud KMS).
9696
// The primary version of the key and its status will be reflected here when
9797
// changes propagate from Cloud KMS.
98-
repeated EncryptionInfo encryption_info = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
98+
repeated EncryptionInfo encryption_info = 2
99+
[(google.api.field_behavior) = OUTPUT_ONLY];
99100
}
100101

101102
// Possible timestamp granularities to use when keeping multiple versions
@@ -141,20 +142,22 @@ message Table {
141142
// particular cluster (for example, if its zone is unavailable), then
142143
// there will be an entry for the cluster with UNKNOWN `replication_status`.
143144
// Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
144-
map<string, ClusterState> cluster_states = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
145+
map<string, ClusterState> cluster_states = 2
146+
[(google.api.field_behavior) = OUTPUT_ONLY];
145147

146148
// The column families configured for this table, mapped by column family ID.
147149
// Views: `SCHEMA_VIEW`, `FULL`
148150
map<string, ColumnFamily> column_families = 3;
149151

150-
// Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored in this
151-
// table. Timestamps not matching the granularity will be rejected.
152-
// If unspecified at creation time, the value will be set to `MILLIS`.
153-
// Views: `SCHEMA_VIEW`, `FULL`.
154-
TimestampGranularity granularity = 4 [(google.api.field_behavior) = IMMUTABLE];
152+
// Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored
153+
// in this table. Timestamps not matching the granularity will be rejected. If
154+
// unspecified at creation time, the value will be set to `MILLIS`. Views:
155+
// `SCHEMA_VIEW`, `FULL`.
156+
TimestampGranularity granularity = 4
157+
[(google.api.field_behavior) = IMMUTABLE];
155158

156-
// Output only. If this table was restored from another data source (e.g. a backup), this
157-
// field will be populated with information about the restore.
159+
// Output only. If this table was restored from another data source (e.g. a
160+
// backup), this field will be populated with information about the restore.
158161
RestoreInfo restore_info = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
159162
}
160163

@@ -227,14 +230,17 @@ message EncryptionInfo {
227230
}
228231

229232
// Output only. The type of encryption used to protect this resource.
230-
EncryptionType encryption_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
233+
EncryptionType encryption_type = 3
234+
[(google.api.field_behavior) = OUTPUT_ONLY];
231235

232-
// Output only. The status of encrypt/decrypt calls on underlying data for this resource.
233-
// Regardless of status, the existing data is always encrypted at rest.
234-
google.rpc.Status encryption_status = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
236+
// Output only. The status of encrypt/decrypt calls on underlying data for
237+
// this resource. Regardless of status, the existing data is always encrypted
238+
// at rest.
239+
google.rpc.Status encryption_status = 4
240+
[(google.api.field_behavior) = OUTPUT_ONLY];
235241

236-
// Output only. The version of the Cloud KMS key specified in the parent cluster that is
237-
// in use for the data underlying this table.
242+
// Output only. The version of the Cloud KMS key specified in the parent
243+
// cluster that is in use for the data underlying this table.
238244
string kms_key_version = 2 [
239245
(google.api.field_behavior) = OUTPUT_ONLY,
240246
(google.api.resource_reference) = {
@@ -270,32 +276,33 @@ message Snapshot {
270276
CREATING = 2;
271277
}
272278

273-
// Output only. The unique name of the snapshot.
279+
// The unique name of the snapshot.
274280
// Values are of the form
275281
// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
276282
string name = 1;
277283

278284
// Output only. The source table at the time the snapshot was taken.
279-
Table source_table = 2;
285+
Table source_table = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
280286

281287
// Output only. The size of the data in the source table at the time the
282288
// snapshot was taken. In some cases, this value may be computed
283289
// asynchronously via a background process and a placeholder of 0 will be used
284290
// in the meantime.
285-
int64 data_size_bytes = 3;
291+
int64 data_size_bytes = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
286292

287293
// Output only. The time when the snapshot is created.
288-
google.protobuf.Timestamp create_time = 4;
294+
google.protobuf.Timestamp create_time = 4
295+
[(google.api.field_behavior) = OUTPUT_ONLY];
289296

290-
// Output only. The time when the snapshot will be deleted. The maximum amount
291-
// of time a snapshot can stay active is 365 days. If 'ttl' is not specified,
297+
// The time when the snapshot will be deleted. The maximum amount of time a
298+
// snapshot can stay active is 365 days. If 'ttl' is not specified,
292299
// the default maximum of 365 days will be used.
293300
google.protobuf.Timestamp delete_time = 5;
294301

295302
// Output only. The current state of the snapshot.
296-
State state = 6;
303+
State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
297304

298-
// Output only. Description of the snapshot.
305+
// Description of the snapshot.
299306
string description = 7;
300307
}
301308

@@ -331,8 +338,8 @@ message Backup {
331338
// `projects/{project}/instances/{instance}/clusters/{cluster}`.
332339
string name = 1;
333340

334-
// Required. Immutable. Name of the table from which this backup was created. This needs
335-
// to be in the same instance as the backup. Values are of the form
341+
// Required. Immutable. Name of the table from which this backup was created.
342+
// This needs to be in the same instance as the backup. Values are of the form
336343
// `projects/{project}/instances/{instance}/tables/{source_table}`.
337344
string source_table = 2 [
338345
(google.api.field_behavior) = IMMUTABLE,
@@ -344,17 +351,21 @@ message Backup {
344351
// from the time the request is received. Once the `expire_time`
345352
// has passed, Cloud Bigtable will delete the backup and free the
346353
// resources used by the backup.
347-
google.protobuf.Timestamp expire_time = 3 [(google.api.field_behavior) = REQUIRED];
354+
google.protobuf.Timestamp expire_time = 3
355+
[(google.api.field_behavior) = REQUIRED];
348356

349357
// Output only. `start_time` is the time that the backup was started
350358
// (i.e. approximately the time the
351-
// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] request is received). The
352-
// row data in this backup will be no older than this timestamp.
353-
google.protobuf.Timestamp start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
359+
// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]
360+
// request is received). The row data in this backup will be no older than
361+
// this timestamp.
362+
google.protobuf.Timestamp start_time = 4
363+
[(google.api.field_behavior) = OUTPUT_ONLY];
354364

355365
// Output only. `end_time` is the time that the backup was finished. The row
356366
// data in the backup will be no newer than this timestamp.
357-
google.protobuf.Timestamp end_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
367+
google.protobuf.Timestamp end_time = 5
368+
[(google.api.field_behavior) = OUTPUT_ONLY];
358369

359370
// Output only. Size of the backup in bytes.
360371
int64 size_bytes = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -363,7 +374,8 @@ message Backup {
363374
State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
364375

365376
// Output only. The encryption information for the backup.
366-
EncryptionInfo encryption_info = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
377+
EncryptionInfo encryption_info = 9
378+
[(google.api.field_behavior) = OUTPUT_ONLY];
367379
}
368380

369381
// Information about a backup.
@@ -373,11 +385,13 @@ message BackupInfo {
373385

374386
// Output only. The time that the backup was started. Row data in the backup
375387
// will be no older than this timestamp.
376-
google.protobuf.Timestamp start_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
388+
google.protobuf.Timestamp start_time = 2
389+
[(google.api.field_behavior) = OUTPUT_ONLY];
377390

378391
// Output only. This time that the backup was finished. Row data in the
379392
// backup will be no newer than this timestamp.
380-
google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
393+
google.protobuf.Timestamp end_time = 3
394+
[(google.api.field_behavior) = OUTPUT_ONLY];
381395

382396
// Output only. Name of the table the backup was created from.
383397
string source_table = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

0 commit comments

Comments
 (0)