xref: /aosp_15_r20/external/googleapis/google/cloud/bigquery/biglake/v1alpha1/metastore.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.bigquery.biglake.v1alpha1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/protobuf/empty.proto";
24import "google/protobuf/field_mask.proto";
25import "google/protobuf/timestamp.proto";
26
27option go_package = "cloud.google.com/go/bigquery/biglake/apiv1alpha1/biglakepb;biglakepb";
28option java_multiple_files = true;
29option java_outer_classname = "MetastoreProto";
30option java_package = "com.google.cloud.bigquery.biglake.v1alpha1";
31
32// BigLake Metastore is a serverless, highly available, multi-tenant runtime
33// metastore for Google Cloud Data Analytics products.
34//
35// The BigLake Metastore API defines the following resource model:
36//
37// * A collection of Google Cloud projects: `/projects/*`
38// * Each project has a collection of available locations: `/locations/*`
39// * Each location has a collection of catalogs: `/catalogs/*`
40// * Each catalog has a collection of databases: `/databases/*`
41// * Each database has a collection of tables: `/tables/*`
42service MetastoreService {
43  option (google.api.default_host) = "biglake.googleapis.com";
44  option (google.api.oauth_scopes) =
45      "https://www.googleapis.com/auth/bigquery,"
46      "https://www.googleapis.com/auth/cloud-platform";
47
48  // Creates a new catalog.
49  rpc CreateCatalog(CreateCatalogRequest) returns (Catalog) {
50    option (google.api.http) = {
51      post: "/v1alpha1/{parent=projects/*/locations/*}/catalogs"
52      body: "catalog"
53    };
54    option (google.api.method_signature) = "parent,catalog,catalog_id";
55  }
56
57  // Deletes an existing catalog specified by the catalog ID.
58  rpc DeleteCatalog(DeleteCatalogRequest) returns (Catalog) {
59    option (google.api.http) = {
60      delete: "/v1alpha1/{name=projects/*/locations/*/catalogs/*}"
61    };
62    option (google.api.method_signature) = "name";
63  }
64
65  // Gets the catalog specified by the resource name.
66  rpc GetCatalog(GetCatalogRequest) returns (Catalog) {
67    option (google.api.http) = {
68      get: "/v1alpha1/{name=projects/*/locations/*/catalogs/*}"
69    };
70    option (google.api.method_signature) = "name";
71  }
72
73  // List all catalogs in a specified project.
74  rpc ListCatalogs(ListCatalogsRequest) returns (ListCatalogsResponse) {
75    option (google.api.http) = {
76      get: "/v1alpha1/{parent=projects/*/locations/*}/catalogs"
77    };
78    option (google.api.method_signature) = "parent";
79  }
80
81  // Creates a new database.
82  rpc CreateDatabase(CreateDatabaseRequest) returns (Database) {
83    option (google.api.http) = {
84      post: "/v1alpha1/{parent=projects/*/locations/*/catalogs/*}/databases"
85      body: "database"
86    };
87    option (google.api.method_signature) = "parent,database,database_id";
88  }
89
90  // Deletes an existing database specified by the database ID.
91  rpc DeleteDatabase(DeleteDatabaseRequest) returns (Database) {
92    option (google.api.http) = {
93      delete: "/v1alpha1/{name=projects/*/locations/*/catalogs/*/databases/*}"
94    };
95    option (google.api.method_signature) = "name";
96  }
97
98  // Updates an existing database specified by the database ID.
99  rpc UpdateDatabase(UpdateDatabaseRequest) returns (Database) {
100    option (google.api.http) = {
101      patch: "/v1alpha1/{database.name=projects/*/locations/*/catalogs/*/databases/*}"
102      body: "database"
103    };
104    option (google.api.method_signature) = "database,update_mask";
105  }
106
107  // Gets the database specified by the resource name.
108  rpc GetDatabase(GetDatabaseRequest) returns (Database) {
109    option (google.api.http) = {
110      get: "/v1alpha1/{name=projects/*/locations/*/catalogs/*/databases/*}"
111    };
112    option (google.api.method_signature) = "name";
113  }
114
115  // List all databases in a specified catalog.
116  rpc ListDatabases(ListDatabasesRequest) returns (ListDatabasesResponse) {
117    option (google.api.http) = {
118      get: "/v1alpha1/{parent=projects/*/locations/*/catalogs/*}/databases"
119    };
120    option (google.api.method_signature) = "parent";
121  }
122
123  // Creates a new table.
124  rpc CreateTable(CreateTableRequest) returns (Table) {
125    option (google.api.http) = {
126      post: "/v1alpha1/{parent=projects/*/locations/*/catalogs/*/databases/*}/tables"
127      body: "table"
128    };
129    option (google.api.method_signature) = "parent,table,table_id";
130  }
131
132  // Deletes an existing table specified by the table ID.
133  rpc DeleteTable(DeleteTableRequest) returns (Table) {
134    option (google.api.http) = {
135      delete: "/v1alpha1/{name=projects/*/locations/*/catalogs/*/databases/*/tables/*}"
136    };
137    option (google.api.method_signature) = "name";
138  }
139
140  // Updates an existing table specified by the table ID.
141  rpc UpdateTable(UpdateTableRequest) returns (Table) {
142    option (google.api.http) = {
143      patch: "/v1alpha1/{table.name=projects/*/locations/*/catalogs/*/databases/*/tables/*}"
144      body: "table"
145    };
146    option (google.api.method_signature) = "table,update_mask";
147  }
148
149  // Renames an existing table specified by the table ID.
150  rpc RenameTable(RenameTableRequest) returns (Table) {
151    option (google.api.http) = {
152      post: "/v1alpha1/{name=projects/*/locations/*/catalogs/*/databases/*/tables/*}:rename"
153      body: "*"
154    };
155    option (google.api.method_signature) = "name,new_name";
156  }
157
158  // Gets the table specified by the resource name.
159  rpc GetTable(GetTableRequest) returns (Table) {
160    option (google.api.http) = {
161      get: "/v1alpha1/{name=projects/*/locations/*/catalogs/*/databases/*/tables/*}"
162    };
163    option (google.api.method_signature) = "name";
164  }
165
166  // List all tables in a specified database.
167  rpc ListTables(ListTablesRequest) returns (ListTablesResponse) {
168    option (google.api.http) = {
169      get: "/v1alpha1/{parent=projects/*/locations/*/catalogs/*/databases/*}/tables"
170    };
171    option (google.api.method_signature) = "parent";
172  }
173
174  // Creates a new lock.
175  rpc CreateLock(CreateLockRequest) returns (Lock) {
176    option (google.api.http) = {
177      post: "/v1alpha1/{parent=projects/*/locations/*/catalogs/*/databases/*}/locks"
178      body: "lock"
179    };
180    option (google.api.method_signature) = "parent,lock";
181  }
182
183  // Deletes an existing lock specified by the lock ID.
184  rpc DeleteLock(DeleteLockRequest) returns (google.protobuf.Empty) {
185    option (google.api.http) = {
186      delete: "/v1alpha1/{name=projects/*/locations/*/catalogs/*/databases/*/locks/*}"
187    };
188    option (google.api.method_signature) = "name";
189  }
190
191  // Checks the state of a lock specified by the lock ID.
192  rpc CheckLock(CheckLockRequest) returns (Lock) {
193    option (google.api.http) = {
194      post: "/v1alpha1/{name=projects/*/locations/*/catalogs/*/databases/*/locks/*}:check"
195      body: "*"
196    };
197    option (google.api.method_signature) = "name";
198  }
199
200  // List all locks in a specified database.
201  rpc ListLocks(ListLocksRequest) returns (ListLocksResponse) {
202    option (google.api.http) = {
203      get: "/v1alpha1/{parent=projects/*/locations/*/catalogs/*/databases/*}/locks"
204    };
205    option (google.api.method_signature) = "parent";
206  }
207}
208
209// View on Table. Represents which fields will be populated for calls that
210// return Table objects.
211enum TableView {
212  // Default value. The API will default to the BASIC view.
213  TABLE_VIEW_UNSPECIFIED = 0;
214
215  // Include only table names.
216  // This is the default value.
217  BASIC = 1;
218
219  // Include everything.
220  FULL = 2;
221}
222
223// Catalog is the container of databases.
224message Catalog {
225  option (google.api.resource) = {
226    type: "biglake.googleapis.com/Catalog"
227    pattern: "projects/{project}/locations/{location}/catalogs/{catalog}"
228  };
229
230  // Output only. The resource name.
231  // Format:
232  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}
233  string name = 1 [
234    (google.api.field_behavior) = OUTPUT_ONLY,
235    (google.api.resource_reference) = { type: "biglake.googleapis.com/Catalog" }
236  ];
237
238  // Output only. The creation time of the catalog.
239  google.protobuf.Timestamp create_time = 2
240      [(google.api.field_behavior) = OUTPUT_ONLY];
241
242  // Output only. The last modification time of the catalog.
243  google.protobuf.Timestamp update_time = 3
244      [(google.api.field_behavior) = OUTPUT_ONLY];
245
246  // Output only. The deletion time of the catalog. Only set after the catalog
247  // is deleted.
248  google.protobuf.Timestamp delete_time = 4
249      [(google.api.field_behavior) = OUTPUT_ONLY];
250
251  // Output only. The time when this catalog is considered expired. Only set
252  // after the catalog is deleted.
253  google.protobuf.Timestamp expire_time = 5
254      [(google.api.field_behavior) = OUTPUT_ONLY];
255}
256
257// Database is the container of tables.
258message Database {
259  option (google.api.resource) = {
260    type: "biglake.googleapis.com/Database"
261    pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/databases/{database}"
262  };
263
264  // The database type.
265  enum Type {
266    // The type is not specified.
267    TYPE_UNSPECIFIED = 0;
268
269    // Represents a database storing tables compatible with Hive Metastore
270    // tables.
271    HIVE = 1;
272  }
273
274  // Options specified for the database type.
275  oneof options {
276    // Options of a Hive database.
277    HiveDatabaseOptions hive_options = 7;
278  }
279
280  // Output only. The resource name.
281  // Format:
282  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}
283  string name = 1 [
284    (google.api.field_behavior) = OUTPUT_ONLY,
285    (google.api.resource_reference) = {
286      type: "biglake.googleapis.com/Database"
287    }
288  ];
289
290  // Output only. The creation time of the database.
291  google.protobuf.Timestamp create_time = 2
292      [(google.api.field_behavior) = OUTPUT_ONLY];
293
294  // Output only. The last modification time of the database.
295  google.protobuf.Timestamp update_time = 3
296      [(google.api.field_behavior) = OUTPUT_ONLY];
297
298  // Output only. The deletion time of the database. Only set after the database
299  // is deleted.
300  google.protobuf.Timestamp delete_time = 4
301      [(google.api.field_behavior) = OUTPUT_ONLY];
302
303  // Output only. The time when this database is considered expired. Only set
304  // after the database is deleted.
305  google.protobuf.Timestamp expire_time = 5
306      [(google.api.field_behavior) = OUTPUT_ONLY];
307
308  // The database type.
309  Type type = 6;
310}
311
312// Represents a table.
313message Table {
314  option (google.api.resource) = {
315    type: "biglake.googleapis.com/Table"
316    pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/databases/{database}/tables/{table}"
317  };
318
319  // The table type.
320  enum Type {
321    // The type is not specified.
322    TYPE_UNSPECIFIED = 0;
323
324    // Represents a table compatible with Hive Metastore tables.
325    HIVE = 1;
326  }
327
328  // Options specified for the table type.
329  oneof options {
330    // Options of a Hive table.
331    HiveTableOptions hive_options = 7;
332  }
333
334  // Output only. The resource name.
335  // Format:
336  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id}
337  string name = 1 [
338    (google.api.field_behavior) = OUTPUT_ONLY,
339    (google.api.resource_reference) = { type: "biglake.googleapis.com/Table" }
340  ];
341
342  // Output only. The creation time of the table.
343  google.protobuf.Timestamp create_time = 2
344      [(google.api.field_behavior) = OUTPUT_ONLY];
345
346  // Output only. The last modification time of the table.
347  google.protobuf.Timestamp update_time = 3
348      [(google.api.field_behavior) = OUTPUT_ONLY];
349
350  // Output only. The deletion time of the table. Only set after the table is
351  // deleted.
352  google.protobuf.Timestamp delete_time = 4
353      [(google.api.field_behavior) = OUTPUT_ONLY];
354
355  // Output only. The time when this table is considered expired. Only set after
356  // the table is deleted.
357  google.protobuf.Timestamp expire_time = 5
358      [(google.api.field_behavior) = OUTPUT_ONLY];
359
360  // The table type.
361  Type type = 6;
362
363  // The checksum of a table object computed by the server based on the value of
364  // other fields. It may be sent on update requests to ensure the client has an
365  // up-to-date value before proceeding. It is only checked for update table
366  // operations.
367  string etag = 8;
368}
369
370// Represents a lock.
371message Lock {
372  option (google.api.resource) = {
373    type: "biglake.googleapis.com/Lock"
374    pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/databases/{database}/locks/{lock}"
375  };
376
377  // The lock type.
378  enum Type {
379    // The type is not specified.
380    TYPE_UNSPECIFIED = 0;
381
382    // An exclusive lock prevents another lock from being created on the same
383    // resource.
384    EXCLUSIVE = 1;
385  }
386
387  // The lock state.
388  enum State {
389    // The state is not specified.
390    STATE_UNSPECIFIED = 0;
391
392    // Waiting to acquire the lock.
393    WAITING = 1;
394
395    // The lock has been acquired.
396    ACQUIRED = 2;
397  }
398
399  // The resource that the lock will be created on.
400  oneof resources {
401    // The table ID (not fully qualified name) in the same database that the
402    // lock will be created on. The table must exist.
403    string table_id = 5;
404  }
405
406  // Output only. The resource name.
407  // Format:
408  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/locks/{lock_id}
409  string name = 1 [
410    (google.api.field_behavior) = OUTPUT_ONLY,
411    (google.api.resource_reference) = { type: "biglake.googleapis.com/Lock" }
412  ];
413
414  // Output only. The creation time of the lock.
415  google.protobuf.Timestamp create_time = 2
416      [(google.api.field_behavior) = OUTPUT_ONLY];
417
418  // The lock type.
419  Type type = 3;
420
421  // Output only. The lock state.
422  State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
423}
424
425// Request message for the CreateCatalog method.
426message CreateCatalogRequest {
427  // Required. The parent resource where this catalog will be created.
428  // Format: projects/{project_id_or_number}/locations/{location_id}
429  string parent = 1 [
430    (google.api.field_behavior) = REQUIRED,
431    (google.api.resource_reference) = {
432      type: "locations.googleapis.com/Location"
433    }
434  ];
435
436  // Required. The catalog to create.
437  // The `name` field does not need to be provided.
438  Catalog catalog = 2 [(google.api.field_behavior) = REQUIRED];
439
440  // Required. The ID to use for the catalog, which will become the final
441  // component of the catalog's resource name.
442  string catalog_id = 3 [(google.api.field_behavior) = REQUIRED];
443}
444
445// Request message for the DeleteCatalog method.
446message DeleteCatalogRequest {
447  // Required. The name of the catalog to delete.
448  // Format:
449  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}
450  string name = 1 [
451    (google.api.field_behavior) = REQUIRED,
452    (google.api.resource_reference) = { type: "biglake.googleapis.com/Catalog" }
453  ];
454}
455
456// Request message for the GetCatalog method.
457message GetCatalogRequest {
458  // Required. The name of the catalog to retrieve.
459  // Format:
460  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}
461  string name = 1 [
462    (google.api.field_behavior) = REQUIRED,
463    (google.api.resource_reference) = { type: "biglake.googleapis.com/Catalog" }
464  ];
465}
466
467// Request message for the ListCatalogs method.
468message ListCatalogsRequest {
469  // Required. The parent, which owns this collection of catalogs.
470  // Format: projects/{project_id_or_number}/locations/{location_id}
471  string parent = 1 [
472    (google.api.field_behavior) = REQUIRED,
473    (google.api.resource_reference) = {
474      type: "locations.googleapis.com/Location"
475    }
476  ];
477
478  // The maximum number of catalogs to return. The service may return fewer than
479  // this value.
480  // If unspecified, at most 50 catalogs will be returned.
481  // The maximum value is 1000; values above 1000 will be coerced to 1000.
482  int32 page_size = 2;
483
484  // A page token, received from a previous `ListCatalogs` call.
485  // Provide this to retrieve the subsequent page.
486  //
487  // When paginating, all other parameters provided to `ListCatalogs` must match
488  // the call that provided the page token.
489  string page_token = 3;
490}
491
492// Response message for the ListCatalogs method.
493message ListCatalogsResponse {
494  // The catalogs from the specified project.
495  repeated Catalog catalogs = 1;
496
497  // A token, which can be sent as `page_token` to retrieve the next page.
498  // If this field is omitted, there are no subsequent pages.
499  string next_page_token = 2;
500}
501
502// Request message for the CreateDatabase method.
503message CreateDatabaseRequest {
504  // Required. The parent resource where this database will be created.
505  // Format:
506  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}
507  string parent = 1 [
508    (google.api.field_behavior) = REQUIRED,
509    (google.api.resource_reference) = { type: "biglake.googleapis.com/Catalog" }
510  ];
511
512  // Required. The database to create.
513  // The `name` field does not need to be provided.
514  Database database = 2 [(google.api.field_behavior) = REQUIRED];
515
516  // Required. The ID to use for the database, which will become the final
517  // component of the database's resource name.
518  string database_id = 3 [(google.api.field_behavior) = REQUIRED];
519}
520
521// Request message for the DeleteDatabase method.
522message DeleteDatabaseRequest {
523  // Required. The name of the database to delete.
524  // Format:
525  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}
526  string name = 1 [
527    (google.api.field_behavior) = REQUIRED,
528    (google.api.resource_reference) = {
529      type: "biglake.googleapis.com/Database"
530    }
531  ];
532}
533
534// Request message for the UpdateDatabase method.
535message UpdateDatabaseRequest {
536  // Required. The database to update.
537  //
538  // The database's `name` field is used to identify the database to update.
539  // Format:
540  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}
541  Database database = 1 [(google.api.field_behavior) = REQUIRED];
542
543  // The list of fields to update.
544  //
545  // For the `FieldMask` definition, see
546  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
547  // If not set, defaults to all of the fields that are allowed to update.
548  google.protobuf.FieldMask update_mask = 2;
549}
550
551// Request message for the GetDatabase method.
552message GetDatabaseRequest {
553  // Required. The name of the database to retrieve.
554  // Format:
555  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}
556  string name = 1 [
557    (google.api.field_behavior) = REQUIRED,
558    (google.api.resource_reference) = {
559      type: "biglake.googleapis.com/Database"
560    }
561  ];
562}
563
564// Request message for the ListDatabases method.
565message ListDatabasesRequest {
566  // Required. The parent, which owns this collection of databases.
567  // Format:
568  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}
569  string parent = 1 [
570    (google.api.field_behavior) = REQUIRED,
571    (google.api.resource_reference) = { type: "biglake.googleapis.com/Catalog" }
572  ];
573
574  // The maximum number of databases to return. The service may return fewer
575  // than this value.
576  // If unspecified, at most 50 databases will be returned.
577  // The maximum value is 1000; values above 1000 will be coerced to 1000.
578  int32 page_size = 2;
579
580  // A page token, received from a previous `ListDatabases` call.
581  // Provide this to retrieve the subsequent page.
582  //
583  // When paginating, all other parameters provided to `ListDatabases` must
584  // match the call that provided the page token.
585  string page_token = 3;
586}
587
588// Response message for the ListDatabases method.
589message ListDatabasesResponse {
590  // The databases from the specified catalog.
591  repeated Database databases = 1;
592
593  // A token, which can be sent as `page_token` to retrieve the next page.
594  // If this field is omitted, there are no subsequent pages.
595  string next_page_token = 2;
596}
597
598// Request message for the CreateTable method.
599message CreateTableRequest {
600  // Required. The parent resource where this table will be created.
601  // Format:
602  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}
603  string parent = 1 [
604    (google.api.field_behavior) = REQUIRED,
605    (google.api.resource_reference) = {
606      type: "biglake.googleapis.com/Database"
607    }
608  ];
609
610  // Required. The table to create. The `name` field does not need to be
611  // provided for the table creation.
612  Table table = 2 [(google.api.field_behavior) = REQUIRED];
613
614  // Required. The ID to use for the table, which will become the final
615  // component of the table's resource name.
616  string table_id = 3 [(google.api.field_behavior) = REQUIRED];
617}
618
619// Request message for the DeleteTable method.
620message DeleteTableRequest {
621  // Required. The name of the table to delete.
622  // Format:
623  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id}
624  string name = 1 [
625    (google.api.field_behavior) = REQUIRED,
626    (google.api.resource_reference) = { type: "biglake.googleapis.com/Table" }
627  ];
628}
629
630// Request message for the UpdateTable method.
631message UpdateTableRequest {
632  // Required. The table to update.
633  //
634  // The table's `name` field is used to identify the table to update.
635  // Format:
636  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id}
637  Table table = 1 [(google.api.field_behavior) = REQUIRED];
638
639  // The list of fields to update.
640  //
641  // For the `FieldMask` definition, see
642  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
643  // If not set, defaults to all of the fields that are allowed to update.
644  google.protobuf.FieldMask update_mask = 2;
645}
646
647// Request message for the RenameTable method in MetastoreService
648message RenameTableRequest {
649  // Required. The table's `name` field is used to identify the table to rename.
650  // Format:
651  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id}
652  string name = 1 [
653    (google.api.field_behavior) = REQUIRED,
654    (google.api.resource_reference) = { type: "biglake.googleapis.com/Table" }
655  ];
656
657  // Required. The new `name` for the specified table, must be in the same
658  // database. Format:
659  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id}
660  string new_name = 2 [
661    (google.api.field_behavior) = REQUIRED,
662    (google.api.resource_reference) = { type: "biglake.googleapis.com/Table" }
663  ];
664}
665
666// Request message for the GetTable method.
667message GetTableRequest {
668  // Required. The name of the table to retrieve.
669  // Format:
670  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id}
671  string name = 1 [
672    (google.api.field_behavior) = REQUIRED,
673    (google.api.resource_reference) = { type: "biglake.googleapis.com/Table" }
674  ];
675}
676
677// Request message for the ListTables method.
678message ListTablesRequest {
679  // Required. The parent, which owns this collection of tables.
680  // Format:
681  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}
682  string parent = 1 [
683    (google.api.field_behavior) = REQUIRED,
684    (google.api.resource_reference) = {
685      type: "biglake.googleapis.com/Database"
686    }
687  ];
688
689  // The maximum number of tables to return. The service may return fewer than
690  // this value.
691  // If unspecified, at most 50 tables will be returned.
692  // The maximum value is 1000; values above 1000 will be coerced to 1000.
693  int32 page_size = 2;
694
695  // A page token, received from a previous `ListTables` call.
696  // Provide this to retrieve the subsequent page.
697  //
698  // When paginating, all other parameters provided to `ListTables` must match
699  // the call that provided the page token.
700  string page_token = 3;
701
702  // The view for the returned tables.
703  TableView view = 4;
704}
705
706// Response message for the ListTables method.
707message ListTablesResponse {
708  // The tables from the specified database.
709  repeated Table tables = 1;
710
711  // A token, which can be sent as `page_token` to retrieve the next page.
712  // If this field is omitted, there are no subsequent pages.
713  string next_page_token = 2;
714}
715
716// Request message for the CreateLock method.
717message CreateLockRequest {
718  // Required. The parent resource where this lock will be created.
719  // Format:
720  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}
721  string parent = 1 [
722    (google.api.field_behavior) = REQUIRED,
723    (google.api.resource_reference) = {
724      type: "biglake.googleapis.com/Database"
725    }
726  ];
727
728  // Required. The lock to create. The `name` field does not need to be provided
729  // for the lock creation.
730  Lock lock = 2 [(google.api.field_behavior) = REQUIRED];
731}
732
733// Request message for the DeleteLock method.
734message DeleteLockRequest {
735  // Required. The name of the lock to delete.
736  // Format:
737  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/locks/{lock_id}
738  string name = 1 [
739    (google.api.field_behavior) = REQUIRED,
740    (google.api.resource_reference) = { type: "biglake.googleapis.com/Lock" }
741  ];
742}
743
744// Request message for the CheckLock method.
745message CheckLockRequest {
746  // Required. The name of the lock to check.
747  // Format:
748  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/locks/{lock_id}
749  string name = 1 [
750    (google.api.field_behavior) = REQUIRED,
751    (google.api.resource_reference) = { type: "biglake.googleapis.com/Lock" }
752  ];
753}
754
755// Request message for the ListLocks method.
756message ListLocksRequest {
757  // Required. The parent, which owns this collection of locks.
758  // Format:
759  // projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}
760  string parent = 1 [
761    (google.api.field_behavior) = REQUIRED,
762    (google.api.resource_reference) = {
763      type: "biglake.googleapis.com/Database"
764    }
765  ];
766
767  // The maximum number of locks to return. The service may return fewer than
768  // this value.
769  // If unspecified, at most 50 locks will be returned.
770  // The maximum value is 1000; values above 1000 will be coerced to 1000.
771  int32 page_size = 2;
772
773  // A page token, received from a previous `ListLocks` call.
774  // Provide this to retrieve the subsequent page.
775  //
776  // When paginating, all other parameters provided to `ListLocks` must match
777  // the call that provided the page token.
778  string page_token = 3;
779}
780
781// Response message for the ListLocks method.
782message ListLocksResponse {
783  // The locks from the specified database.
784  repeated Lock locks = 1;
785
786  // A token, which can be sent as `page_token` to retrieve the next page.
787  // If this field is omitted, there are no subsequent pages.
788  string next_page_token = 2;
789}
790
791// Options of a Hive database.
792message HiveDatabaseOptions {
793  // Cloud Storage folder URI where the database data is stored, starting with
794  // "gs://".
795  string location_uri = 1;
796
797  // Stores user supplied Hive database parameters.
798  map<string, string> parameters = 2;
799}
800
801// Options of a Hive table.
802message HiveTableOptions {
803  // Serializer and deserializer information.
804  message SerDeInfo {
805    // The fully qualified Java class name of the serialization library.
806    string serialization_lib = 1;
807  }
808
809  // Stores physical storage information of the data.
810  message StorageDescriptor {
811    // Cloud Storage folder URI where the table data is stored, starting with
812    // "gs://".
813    string location_uri = 1;
814
815    // The fully qualified Java class name of the input format.
816    string input_format = 2;
817
818    // The fully qualified Java class name of the output format.
819    string output_format = 3;
820
821    // Serializer and deserializer information.
822    SerDeInfo serde_info = 4;
823  }
824
825  // Stores user supplied Hive table parameters.
826  map<string, string> parameters = 1;
827
828  // Hive table type. For example, MANAGED_TABLE, EXTERNAL_TABLE.
829  string table_type = 2;
830
831  // Stores physical storage information of the data.
832  StorageDescriptor storage_descriptor = 3;
833}
834