xref: /aosp_15_r20/external/googleapis/google/cloud/metastore/v1beta/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.metastore.v1beta;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/longrunning/operations.proto";
24import "google/protobuf/empty.proto";
25import "google/protobuf/field_mask.proto";
26import "google/protobuf/timestamp.proto";
27import "google/protobuf/wrappers.proto";
28import "google/type/dayofweek.proto";
29
30option go_package = "cloud.google.com/go/metastore/apiv1beta/metastorepb;metastorepb";
31option java_multiple_files = true;
32option java_outer_classname = "MetastoreProto";
33option java_package = "com.google.cloud.metastore.v1beta";
34option php_namespace = "Google\\Cloud\\Metastore\\V1beta";
35option (google.api.resource_definition) = {
36  type: "compute.googleapis.com/Network"
37  pattern: "projects/{project}/global/networks/{network}"
38};
39option (google.api.resource_definition) = {
40  type: "compute.googleapis.com/Subnetwork"
41  pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}"
42};
43option (google.api.resource_definition) = {
44  type: "dataplex.googleapis.com/Lake"
45  pattern: "projects/{project}/locations/{location}/lakes/{lake}"
46};
47
48// Configures and manages metastore services.
49// Metastore services are fully managed, highly available, autoscaled,
50// autohealing, OSS-native deployments of technical metadata management
51// software. Each metastore service exposes a network endpoint through which
52// metadata queries are served. Metadata queries can originate from a variety
53// of sources, including Apache Hive, Apache Presto, and Apache Spark.
54//
55// The Dataproc Metastore API defines the following resource model:
56//
57// * The service works with a collection of Google Cloud projects, named:
58// `/projects/*`
59// * Each project has a collection of available locations, named: `/locations/*`
60//   (a location must refer to a Google Cloud `region`)
61// * Each location has a collection of services, named: `/services/*`
62// * Dataproc Metastore services are resources with names of the form:
63//
64//   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
65service DataprocMetastore {
66  option (google.api.default_host) = "metastore.googleapis.com";
67  option (google.api.oauth_scopes) =
68      "https://www.googleapis.com/auth/cloud-platform";
69
70  // Lists services in a project and location.
71  rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
72    option (google.api.http) = {
73      get: "/v1beta/{parent=projects/*/locations/*}/services"
74    };
75    option (google.api.method_signature) = "parent";
76  }
77
78  // Gets the details of a single service.
79  rpc GetService(GetServiceRequest) returns (Service) {
80    option (google.api.http) = {
81      get: "/v1beta/{name=projects/*/locations/*/services/*}"
82    };
83    option (google.api.method_signature) = "name";
84  }
85
86  // Creates a metastore service in a project and location.
87  rpc CreateService(CreateServiceRequest)
88      returns (google.longrunning.Operation) {
89    option (google.api.http) = {
90      post: "/v1beta/{parent=projects/*/locations/*}/services"
91      body: "service"
92    };
93    option (google.api.method_signature) = "parent,service,service_id";
94    option (google.longrunning.operation_info) = {
95      response_type: "Service"
96      metadata_type: "google.cloud.metastore.v1beta.OperationMetadata"
97    };
98  }
99
100  // Updates the parameters of a single service.
101  rpc UpdateService(UpdateServiceRequest)
102      returns (google.longrunning.Operation) {
103    option (google.api.http) = {
104      patch: "/v1beta/{service.name=projects/*/locations/*/services/*}"
105      body: "service"
106    };
107    option (google.api.method_signature) = "service,update_mask";
108    option (google.longrunning.operation_info) = {
109      response_type: "Service"
110      metadata_type: "google.cloud.metastore.v1beta.OperationMetadata"
111    };
112  }
113
114  // Deletes a single service.
115  rpc DeleteService(DeleteServiceRequest)
116      returns (google.longrunning.Operation) {
117    option (google.api.http) = {
118      delete: "/v1beta/{name=projects/*/locations/*/services/*}"
119    };
120    option (google.api.method_signature) = "name";
121    option (google.longrunning.operation_info) = {
122      response_type: "google.protobuf.Empty"
123      metadata_type: "google.cloud.metastore.v1beta.OperationMetadata"
124    };
125  }
126
127  // Lists imports in a service.
128  rpc ListMetadataImports(ListMetadataImportsRequest)
129      returns (ListMetadataImportsResponse) {
130    option (google.api.http) = {
131      get: "/v1beta/{parent=projects/*/locations/*/services/*}/metadataImports"
132    };
133    option (google.api.method_signature) = "parent";
134  }
135
136  // Gets details of a single import.
137  rpc GetMetadataImport(GetMetadataImportRequest) returns (MetadataImport) {
138    option (google.api.http) = {
139      get: "/v1beta/{name=projects/*/locations/*/services/*/metadataImports/*}"
140    };
141    option (google.api.method_signature) = "name";
142  }
143
144  // Creates a new MetadataImport in a given project and location.
145  rpc CreateMetadataImport(CreateMetadataImportRequest)
146      returns (google.longrunning.Operation) {
147    option (google.api.http) = {
148      post: "/v1beta/{parent=projects/*/locations/*/services/*}/metadataImports"
149      body: "metadata_import"
150    };
151    option (google.api.method_signature) =
152        "parent,metadata_import,metadata_import_id";
153    option (google.longrunning.operation_info) = {
154      response_type: "MetadataImport"
155      metadata_type: "google.cloud.metastore.v1beta.OperationMetadata"
156    };
157  }
158
159  // Updates a single import.
160  // Only the description field of MetadataImport is supported to be updated.
161  rpc UpdateMetadataImport(UpdateMetadataImportRequest)
162      returns (google.longrunning.Operation) {
163    option (google.api.http) = {
164      patch: "/v1beta/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}"
165      body: "metadata_import"
166    };
167    option (google.api.method_signature) = "metadata_import,update_mask";
168    option (google.longrunning.operation_info) = {
169      response_type: "MetadataImport"
170      metadata_type: "google.cloud.metastore.v1beta.OperationMetadata"
171    };
172  }
173
174  // Exports metadata from a service.
175  rpc ExportMetadata(ExportMetadataRequest)
176      returns (google.longrunning.Operation) {
177    option (google.api.http) = {
178      post: "/v1beta/{service=projects/*/locations/*/services/*}:exportMetadata"
179      body: "*"
180    };
181    option (google.longrunning.operation_info) = {
182      response_type: "MetadataExport"
183      metadata_type: "google.cloud.metastore.v1beta.OperationMetadata"
184    };
185  }
186
187  // Restores a service from a backup.
188  rpc RestoreService(RestoreServiceRequest)
189      returns (google.longrunning.Operation) {
190    option (google.api.http) = {
191      post: "/v1beta/{service=projects/*/locations/*/services/*}:restore"
192      body: "*"
193    };
194    option (google.api.method_signature) = "service,backup";
195    option (google.longrunning.operation_info) = {
196      response_type: "Restore"
197      metadata_type: "google.cloud.metastore.v1beta.OperationMetadata"
198    };
199  }
200
201  // Lists backups in a service.
202  rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) {
203    option (google.api.http) = {
204      get: "/v1beta/{parent=projects/*/locations/*/services/*}/backups"
205    };
206    option (google.api.method_signature) = "parent";
207  }
208
209  // Gets details of a single backup.
210  rpc GetBackup(GetBackupRequest) returns (Backup) {
211    option (google.api.http) = {
212      get: "/v1beta/{name=projects/*/locations/*/services/*/backups/*}"
213    };
214    option (google.api.method_signature) = "name";
215  }
216
217  // Creates a new backup in a given project and location.
218  rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) {
219    option (google.api.http) = {
220      post: "/v1beta/{parent=projects/*/locations/*/services/*}/backups"
221      body: "backup"
222    };
223    option (google.api.method_signature) = "parent,backup,backup_id";
224    option (google.longrunning.operation_info) = {
225      response_type: "Backup"
226      metadata_type: "google.cloud.metastore.v1beta.OperationMetadata"
227    };
228  }
229
230  // Deletes a single backup.
231  rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) {
232    option (google.api.http) = {
233      delete: "/v1beta/{name=projects/*/locations/*/services/*/backups/*}"
234    };
235    option (google.api.method_signature) = "name";
236    option (google.longrunning.operation_info) = {
237      response_type: "google.protobuf.Empty"
238      metadata_type: "google.cloud.metastore.v1beta.OperationMetadata"
239    };
240  }
241
242  // Removes the attached IAM policies for a resource
243  rpc RemoveIamPolicy(RemoveIamPolicyRequest)
244      returns (RemoveIamPolicyResponse) {
245    option (google.api.http) = {
246      post: "/v1beta/{resource=projects/*/locations/*/services/*/**}:removeIamPolicy"
247      body: "*"
248    };
249  }
250
251  // Query DPMS metadata.
252  rpc QueryMetadata(QueryMetadataRequest)
253      returns (google.longrunning.Operation) {
254    option (google.api.http) = {
255      post: "/v1beta/{service=projects/*/locations/*/services/*}:queryMetadata"
256      body: "*"
257    };
258    option (google.longrunning.operation_info) = {
259      response_type: "QueryMetadataResponse"
260      metadata_type: "google.cloud.metastore.v1beta.OperationMetadata"
261    };
262  }
263
264  // Move a table to another database.
265  rpc MoveTableToDatabase(MoveTableToDatabaseRequest)
266      returns (google.longrunning.Operation) {
267    option (google.api.http) = {
268      post: "/v1beta/{service=projects/*/locations/*/services/*}:moveTableToDatabase"
269      body: "*"
270    };
271    option (google.longrunning.operation_info) = {
272      response_type: "MoveTableToDatabaseResponse"
273      metadata_type: "google.cloud.metastore.v1beta.OperationMetadata"
274    };
275  }
276
277  // Alter metadata resource location. The metadata resource can be a database,
278  // table, or partition. This functionality only updates the parent directory
279  // for the respective metadata resource and does not transfer any existing
280  // data to the new location.
281  rpc AlterMetadataResourceLocation(AlterMetadataResourceLocationRequest)
282      returns (google.longrunning.Operation) {
283    option (google.api.http) = {
284      post: "/v1beta/{service=projects/*/locations/*/services/*}:alterLocation"
285      body: "*"
286    };
287    option (google.longrunning.operation_info) = {
288      response_type: "AlterMetadataResourceLocationResponse"
289      metadata_type: "google.cloud.metastore.v1beta.OperationMetadata"
290    };
291  }
292}
293
294// A managed metastore service that serves metadata queries.
295message Service {
296  option (google.api.resource) = {
297    type: "metastore.googleapis.com/Service"
298    pattern: "projects/{project}/locations/{location}/services/{service}"
299  };
300
301  // The current state of the metastore service.
302  enum State {
303    // The state of the metastore service is unknown.
304    STATE_UNSPECIFIED = 0;
305
306    // The metastore service is in the process of being created.
307    CREATING = 1;
308
309    // The metastore service is running and ready to serve queries.
310    ACTIVE = 2;
311
312    // The metastore service is entering suspension. Its query-serving
313    // availability may cease unexpectedly.
314    SUSPENDING = 3;
315
316    // The metastore service is suspended and unable to serve queries.
317    SUSPENDED = 4;
318
319    // The metastore service is being updated. It remains usable but cannot
320    // accept additional update requests or be deleted at this time.
321    UPDATING = 5;
322
323    // The metastore service is undergoing deletion. It cannot be used.
324    DELETING = 6;
325
326    // The metastore service has encountered an error and cannot be used. The
327    // metastore service should be deleted.
328    ERROR = 7;
329  }
330
331  // Available service tiers.
332  enum Tier {
333    // The tier is not set.
334    TIER_UNSPECIFIED = 0;
335
336    // The developer tier provides limited scalability and no fault tolerance.
337    // Good for low-cost proof-of-concept.
338    DEVELOPER = 1;
339
340    // The enterprise tier provides multi-zone high availability, and sufficient
341    // scalability for enterprise-level Dataproc Metastore workloads.
342    ENTERPRISE = 3;
343  }
344
345  // Release channels bundle features of varying levels of stability. Newer
346  // features may be introduced initially into less stable release channels and
347  // can be automatically promoted into more stable release channels.
348  enum ReleaseChannel {
349    // Release channel is not specified.
350    RELEASE_CHANNEL_UNSPECIFIED = 0;
351
352    // The `CANARY` release channel contains the newest features, which may be
353    // unstable and subject to unresolved issues with no known workarounds.
354    // Services using the `CANARY` release channel are not subject to any SLAs.
355    CANARY = 1;
356
357    // The `STABLE` release channel contains features that are considered stable
358    // and have been validated for production use.
359    STABLE = 2;
360  }
361
362  // The backend database type for the metastore service.
363  enum DatabaseType {
364    // The DATABASE_TYPE is not set.
365    DATABASE_TYPE_UNSPECIFIED = 0;
366
367    // MySQL is used to persist the metastore data.
368    MYSQL = 1;
369
370    // Spanner is used to persist the metastore data.
371    SPANNER = 2;
372  }
373
374  // Configuration properties specific to the underlying metastore service
375  // technology (the software that serves metastore queries).
376  oneof metastore_config {
377    // Configuration information specific to running Hive metastore
378    // software as the metastore service.
379    HiveMetastoreConfig hive_metastore_config = 5;
380  }
381
382  // Immutable. The relative resource name of the metastore service, in the
383  // following format:
384  //
385  // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
386  string name = 1 [(google.api.field_behavior) = IMMUTABLE];
387
388  // Output only. The time when the metastore service was created.
389  google.protobuf.Timestamp create_time = 2
390      [(google.api.field_behavior) = OUTPUT_ONLY];
391
392  // Output only. The time when the metastore service was last updated.
393  google.protobuf.Timestamp update_time = 3
394      [(google.api.field_behavior) = OUTPUT_ONLY];
395
396  // User-defined labels for the metastore service.
397  map<string, string> labels = 4;
398
399  // Immutable. The relative resource name of the VPC network on which the
400  // instance can be accessed. It is specified in the following form:
401  //
402  // `projects/{project_number}/global/networks/{network_id}`.
403  string network = 7 [
404    (google.api.field_behavior) = IMMUTABLE,
405    (google.api.resource_reference) = { type: "compute.googleapis.com/Network" }
406  ];
407
408  // Output only. The URI of the endpoint used to access the metastore service.
409  string endpoint_uri = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
410
411  // The TCP port at which the metastore service is reached. Default: 9083.
412  int32 port = 9;
413
414  // Output only. The current state of the metastore service.
415  State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
416
417  // Output only. Additional information about the current state of the
418  // metastore service, if available.
419  string state_message = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
420
421  // Output only. A Cloud Storage URI (starting with `gs://`) that specifies
422  // where artifacts related to the metastore service are stored.
423  string artifact_gcs_uri = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
424
425  // The tier of the service.
426  Tier tier = 13;
427
428  // The setting that defines how metastore metadata should be integrated with
429  // external services and systems.
430  MetadataIntegration metadata_integration = 14;
431
432  // The one hour maintenance window of the metastore service. This specifies
433  // when the service can be restarted for maintenance purposes in UTC time.
434  // Maintenance window is not needed for services with the SPANNER
435  // database type.
436  MaintenanceWindow maintenance_window = 15;
437
438  // Output only. The globally unique resource identifier of the metastore
439  // service.
440  string uid = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
441
442  // Output only. The metadata management activities of the metastore service.
443  MetadataManagementActivity metadata_management_activity = 17
444      [(google.api.field_behavior) = OUTPUT_ONLY];
445
446  // Immutable. The release channel of the service.
447  // If unspecified, defaults to `STABLE`.
448  ReleaseChannel release_channel = 19 [(google.api.field_behavior) = IMMUTABLE];
449
450  // Immutable. Information used to configure the Dataproc Metastore service to
451  // encrypt customer data at rest. Cannot be updated.
452  EncryptionConfig encryption_config = 20
453      [(google.api.field_behavior) = IMMUTABLE];
454
455  // The configuration specifying the network settings for the
456  // Dataproc Metastore service.
457  NetworkConfig network_config = 21;
458
459  // Immutable. The database type that the Metastore service stores its data.
460  DatabaseType database_type = 22 [(google.api.field_behavior) = IMMUTABLE];
461
462  // The configuration specifying telemetry settings for the Dataproc Metastore
463  // service. If unspecified defaults to `JSON`.
464  TelemetryConfig telemetry_config = 23;
465
466  // Scaling configuration of the metastore service.
467  ScalingConfig scaling_config = 24;
468}
469
470// Specifies how metastore metadata should be integrated with external services.
471message MetadataIntegration {
472  // The integration config for the Data Catalog service.
473  DataCatalogConfig data_catalog_config = 1;
474
475  // The integration config for the Dataplex service.
476  DataplexConfig dataplex_config = 2;
477}
478
479// Specifies how metastore metadata should be integrated with the Data Catalog
480// service.
481message DataCatalogConfig {
482  // Defines whether the metastore metadata should be synced to Data Catalog.
483  // The default value is to disable syncing metastore metadata to Data Catalog.
484  bool enabled = 2;
485}
486
487// Specifies how metastore metadata should be integrated with the Dataplex
488// service.
489message DataplexConfig {
490  // A reference to the Lake resources that this metastore service is attached
491  // to. The key is the lake resource name. Example:
492  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
493  map<string, Lake> lake_resources = 1;
494}
495
496// Represents a Lake resource
497message Lake {
498  // The Lake resource name.
499  // Example:
500  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
501  string name = 1 [
502    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" }
503  ];
504}
505
506// Maintenance window. This specifies when Dataproc Metastore
507// may perform system maintenance operation to the service.
508message MaintenanceWindow {
509  // The hour of day (0-23) when the window starts.
510  google.protobuf.Int32Value hour_of_day = 1;
511
512  // The day of week, when the window starts.
513  google.type.DayOfWeek day_of_week = 2;
514}
515
516// Specifies configuration information specific to running Hive metastore
517// software as the metastore service.
518message HiveMetastoreConfig {
519  // Protocols available for serving the metastore service endpoint.
520  enum EndpointProtocol {
521    // The protocol is not set.
522    ENDPOINT_PROTOCOL_UNSPECIFIED = 0;
523
524    // Use the legacy Apache Thrift protocol for the metastore service endpoint.
525    THRIFT = 1;
526
527    // Use the modernized gRPC protocol for the metastore service endpoint.
528    GRPC = 2;
529  }
530
531  // Immutable. The Hive metastore schema version.
532  string version = 1 [(google.api.field_behavior) = IMMUTABLE];
533
534  // A mapping of Hive metastore configuration key-value pairs to apply to the
535  // Hive metastore (configured in `hive-site.xml`). The mappings
536  // override system defaults (some keys cannot be overridden). These
537  // overrides are also applied to auxiliary versions and can be further
538  // customized in the auxiliary version's `AuxiliaryVersionConfig`.
539  map<string, string> config_overrides = 2;
540
541  // Information used to configure the Hive metastore service as a service
542  // principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
543  // method and specify this field's path
544  // (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
545  // while omitting this field from the request's `service`.
546  KerberosConfig kerberos_config = 3;
547
548  // The protocol to use for the metastore service endpoint. If unspecified,
549  // defaults to `THRIFT`.
550  EndpointProtocol endpoint_protocol = 4;
551
552  // A mapping of Hive metastore version to the auxiliary version
553  // configuration. When specified, a secondary Hive metastore service is
554  // created along with the primary service. All auxiliary versions must be less
555  // than the service's primary version. The key is the auxiliary service name
556  // and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
557  // means that the first character must be a lowercase letter, and all the
558  // following characters must be hyphens, lowercase letters, or digits, except
559  // the last character, which cannot be a hyphen.
560  map<string, AuxiliaryVersionConfig> auxiliary_versions = 5;
561}
562
563// Configuration information for a Kerberos principal.
564message KerberosConfig {
565  // A Kerberos keytab file that can be used to authenticate a service principal
566  // with a Kerberos Key Distribution Center (KDC).
567  Secret keytab = 1;
568
569  // A Kerberos principal that exists in the both the keytab the KDC
570  // to authenticate as. A typical principal is of the form
571  // `primary/instance@REALM`, but there is no exact format.
572  string principal = 2;
573
574  // A Cloud Storage URI that specifies the path to a
575  // krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
576  // although the file does not need to be named krb5.conf explicitly.
577  string krb5_config_gcs_uri = 3;
578}
579
580// A securely stored value.
581message Secret {
582  oneof value {
583    // The relative resource name of a Secret Manager secret version, in the
584    // following form:
585    //
586    // `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
587    string cloud_secret = 2;
588  }
589}
590
591// Encryption settings for the service.
592message EncryptionConfig {
593  // The fully qualified customer provided Cloud KMS key name to use for
594  // customer data encryption, in the following form:
595  //
596  // `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
597  string kms_key = 1;
598}
599
600// Configuration information for the auxiliary service versions.
601message AuxiliaryVersionConfig {
602  // The Hive metastore version of the auxiliary service. It must be less
603  // than the primary Hive metastore service's version.
604  string version = 1;
605
606  // A mapping of Hive metastore configuration key-value pairs to apply to the
607  // auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
608  // the primary version's overrides. If keys are present in both the auxiliary
609  // version's overrides and the primary version's overrides, the value from
610  // the auxiliary version's overrides takes precedence.
611  map<string, string> config_overrides = 2;
612
613  // Output only. The network configuration contains the endpoint URI(s) of the
614  // auxiliary Hive metastore service.
615  NetworkConfig network_config = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
616}
617
618// Network configuration for the Dataproc Metastore service.
619//
620// Next available ID: 4
621message NetworkConfig {
622  // Contains information of the customer's network configurations.
623  //
624  // Next available ID: 5
625  message Consumer {
626    oneof vpc_resource {
627      // Immutable. The subnetwork of the customer project from which an IP
628      // address is reserved and used as the Dataproc Metastore service's
629      // endpoint. It is accessible to hosts in the subnet and to all
630      // hosts in a subnet in the same region and same network. There must
631      // be at least one IP address available in the subnet's primary range. The
632      // subnet is specified in the following form:
633      //
634      // `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
635      string subnetwork = 1 [
636        (google.api.field_behavior) = IMMUTABLE,
637        (google.api.resource_reference) = {
638          type: "compute.googleapis.com/Subnetwork"
639        }
640      ];
641    }
642
643    // Output only. The URI of the endpoint used to access the metastore
644    // service.
645    string endpoint_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
646
647    // Output only. The location of the endpoint URI. Format:
648    // `projects/{project}/locations/{location}`.
649    string endpoint_location = 4 [
650      (google.api.field_behavior) = OUTPUT_ONLY,
651      (google.api.resource_reference) = {
652        type: "locations.googleapis.com/Location"
653      }
654    ];
655  }
656
657  // Immutable. The consumer-side network configuration for the Dataproc
658  // Metastore instance.
659  repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE];
660
661  // Enables custom routes to be imported and exported for the Dataproc
662  // Metastore service's peered VPC network.
663  bool custom_routes_enabled = 2;
664}
665
666// Telemetry Configuration for the Dataproc Metastore service.
667message TelemetryConfig {
668  enum LogFormat {
669    // The LOG_FORMAT is not set.
670    LOG_FORMAT_UNSPECIFIED = 0;
671
672    // Logging output uses the legacy `textPayload` format.
673    LEGACY = 1;
674
675    // Logging output uses the `jsonPayload` format.
676    JSON = 2;
677  }
678
679  // The output format of the Dataproc Metastore service's logs.
680  LogFormat log_format = 1;
681}
682
683// The metadata management activities of the metastore service.
684message MetadataManagementActivity {
685  // Output only. The latest metadata exports of the metastore service.
686  repeated MetadataExport metadata_exports = 1
687      [(google.api.field_behavior) = OUTPUT_ONLY];
688
689  // Output only. The latest restores of the metastore service.
690  repeated Restore restores = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
691}
692
693// A metastore resource that imports metadata.
694message MetadataImport {
695  option (google.api.resource) = {
696    type: "metastore.googleapis.com/MetadataImport"
697    pattern: "projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}"
698  };
699
700  // A specification of the location of and metadata about a database dump from
701  // a relational database management system.
702  message DatabaseDump {
703    // The type of the database.
704    enum DatabaseType {
705      // The type of the source database is unknown.
706      DATABASE_TYPE_UNSPECIFIED = 0;
707
708      // The type of the source database is MySQL.
709      MYSQL = 1;
710    }
711
712    // The type of the database.
713    DatabaseType database_type = 1 [deprecated = true];
714
715    // A Cloud Storage object or folder URI that specifies the source from which
716    // to import metadata. It must begin with `gs://`.
717    string gcs_uri = 2;
718
719    // The name of the source database.
720    string source_database = 3 [deprecated = true];
721
722    // Optional. The type of the database dump. If unspecified, defaults to
723    // `MYSQL`.
724    DatabaseDumpSpec.Type type = 4 [(google.api.field_behavior) = OPTIONAL];
725  }
726
727  // The current state of the metadata import.
728  enum State {
729    // The state of the metadata import is unknown.
730    STATE_UNSPECIFIED = 0;
731
732    // The metadata import is running.
733    RUNNING = 1;
734
735    // The metadata import completed successfully.
736    SUCCEEDED = 2;
737
738    // The metadata import is being updated.
739    UPDATING = 3;
740
741    // The metadata import failed, and attempted metadata changes were rolled
742    // back.
743    FAILED = 4;
744  }
745
746  // The metadata to be imported.
747  oneof metadata {
748    // Immutable. A database dump from a pre-existing metastore's database.
749    DatabaseDump database_dump = 6 [(google.api.field_behavior) = IMMUTABLE];
750  }
751
752  // Immutable. The relative resource name of the metadata import, of the form:
753  //
754  // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
755  string name = 1 [(google.api.field_behavior) = IMMUTABLE];
756
757  // The description of the metadata import.
758  string description = 2;
759
760  // Output only. The time when the metadata import was started.
761  google.protobuf.Timestamp create_time = 3
762      [(google.api.field_behavior) = OUTPUT_ONLY];
763
764  // Output only. The time when the metadata import was last updated.
765  google.protobuf.Timestamp update_time = 4
766      [(google.api.field_behavior) = OUTPUT_ONLY];
767
768  // Output only. The time when the metadata import finished.
769  google.protobuf.Timestamp end_time = 7
770      [(google.api.field_behavior) = OUTPUT_ONLY];
771
772  // Output only. The current state of the metadata import.
773  State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
774}
775
776// The details of a metadata export operation.
777message MetadataExport {
778  // The current state of the metadata export.
779  enum State {
780    // The state of the metadata export is unknown.
781    STATE_UNSPECIFIED = 0;
782
783    // The metadata export is running.
784    RUNNING = 1;
785
786    // The metadata export completed successfully.
787    SUCCEEDED = 2;
788
789    // The metadata export failed.
790    FAILED = 3;
791
792    // The metadata export is cancelled.
793    CANCELLED = 4;
794  }
795
796  oneof destination {
797    // Output only. A Cloud Storage URI of a folder that metadata are exported
798    // to, in the form of
799    // `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
800    // `<export_folder>` is automatically generated.
801    string destination_gcs_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
802  }
803
804  // Output only. The time when the export started.
805  google.protobuf.Timestamp start_time = 1
806      [(google.api.field_behavior) = OUTPUT_ONLY];
807
808  // Output only. The time when the export ended.
809  google.protobuf.Timestamp end_time = 2
810      [(google.api.field_behavior) = OUTPUT_ONLY];
811
812  // Output only. The current state of the export.
813  State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
814
815  // Output only. The type of the database dump.
816  DatabaseDumpSpec.Type database_dump_type = 5
817      [(google.api.field_behavior) = OUTPUT_ONLY];
818}
819
820// The details of a backup resource.
821message Backup {
822  option (google.api.resource) = {
823    type: "metastore.googleapis.com/Backup"
824    pattern: "projects/{project}/locations/{location}/services/{service}/backups/{backup}"
825  };
826
827  // The current state of the backup.
828  enum State {
829    // The state of the backup is unknown.
830    STATE_UNSPECIFIED = 0;
831
832    // The backup is being created.
833    CREATING = 1;
834
835    // The backup is being deleted.
836    DELETING = 2;
837
838    // The backup is active and ready to use.
839    ACTIVE = 3;
840
841    // The backup failed.
842    FAILED = 4;
843
844    // The backup is being restored.
845    RESTORING = 5;
846  }
847
848  // Immutable. The relative resource name of the backup, in the following form:
849  //
850  // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
851  string name = 1 [(google.api.field_behavior) = IMMUTABLE];
852
853  // Output only. The time when the backup was started.
854  google.protobuf.Timestamp create_time = 2
855      [(google.api.field_behavior) = OUTPUT_ONLY];
856
857  // Output only. The time when the backup finished creating.
858  google.protobuf.Timestamp end_time = 3
859      [(google.api.field_behavior) = OUTPUT_ONLY];
860
861  // Output only. The current state of the backup.
862  State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
863
864  // Output only. The revision of the service at the time of backup.
865  Service service_revision = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
866
867  // The description of the backup.
868  string description = 6;
869
870  // Output only. Services that are restoring from the backup.
871  repeated string restoring_services = 7
872      [(google.api.field_behavior) = OUTPUT_ONLY];
873}
874
875// The details of a metadata restore operation.
876message Restore {
877  // The current state of the restore.
878  enum State {
879    // The state of the metadata restore is unknown.
880    STATE_UNSPECIFIED = 0;
881
882    // The metadata restore is running.
883    RUNNING = 1;
884
885    // The metadata restore completed successfully.
886    SUCCEEDED = 2;
887
888    // The metadata restore failed.
889    FAILED = 3;
890
891    // The metadata restore is cancelled.
892    CANCELLED = 4;
893  }
894
895  // The type of restore. If unspecified, defaults to `METADATA_ONLY`.
896  enum RestoreType {
897    // The restore type is unknown.
898    RESTORE_TYPE_UNSPECIFIED = 0;
899
900    // The service's metadata and configuration are restored.
901    FULL = 1;
902
903    // Only the service's metadata is restored.
904    METADATA_ONLY = 2;
905  }
906
907  // Output only. The time when the restore started.
908  google.protobuf.Timestamp start_time = 1
909      [(google.api.field_behavior) = OUTPUT_ONLY];
910
911  // Output only. The time when the restore ended.
912  google.protobuf.Timestamp end_time = 2
913      [(google.api.field_behavior) = OUTPUT_ONLY];
914
915  // Output only. The current state of the restore.
916  State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
917
918  // Output only. The relative resource name of the metastore service backup to
919  // restore from, in the following form:
920  //
921  // `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
922  string backup = 4 [
923    (google.api.field_behavior) = OUTPUT_ONLY,
924    (google.api.resource_reference) = {
925      type: "metastore.googleapis.com/Backup"
926    }
927  ];
928
929  // Output only. The type of restore.
930  RestoreType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
931
932  // Output only. The restore details containing the revision of the service to
933  // be restored to, in format of JSON.
934  string details = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
935}
936
937// Represents the scaling configuration of a metastore service.
938message ScalingConfig {
939  // Metastore instance sizes.
940  enum InstanceSize {
941    // Unspecified instance size
942    INSTANCE_SIZE_UNSPECIFIED = 0;
943
944    // Extra small instance size, maps to a scaling factor of 0.1.
945    EXTRA_SMALL = 1;
946
947    // Small instance size, maps to a scaling factor of 0.5.
948    SMALL = 2;
949
950    // Medium instance size, maps to a scaling factor of 1.0.
951    MEDIUM = 3;
952
953    // Large instance size, maps to a scaling factor of 3.0.
954    LARGE = 4;
955
956    // Extra large instance size, maps to a scaling factor of 6.0.
957    EXTRA_LARGE = 5;
958  }
959
960  // Represents either a predetermined instance size or a numeric
961  // scaling factor.
962  oneof scaling_model {
963    // An enum of readable instance sizes, with each instance size mapping to a
964    // float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
965    InstanceSize instance_size = 1;
966
967    // Scaling factor, increments of 0.1 for values less than 1.0, and
968    // increments of 1.0 for values greater than 1.0.
969    float scaling_factor = 2;
970  }
971}
972
973// Request message for
974// [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices].
975message ListServicesRequest {
976  // Required. The relative resource name of the location of metastore services
977  // to list, in the following form:
978  //
979  // `projects/{project_number}/locations/{location_id}`.
980  string parent = 1 [
981    (google.api.field_behavior) = REQUIRED,
982    (google.api.resource_reference) = {
983      child_type: "metastore.googleapis.com/Service"
984    }
985  ];
986
987  // Optional. The maximum number of services to return. The response may
988  // contain less than the maximum number. If unspecified, no more than 500
989  // services are returned. The maximum value is 1000; values above 1000 are
990  // changed to 1000.
991  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
992
993  // Optional. A page token, received from a previous
994  // [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
995  // call. Provide this token to retrieve the subsequent page.
996  //
997  // To retrieve the first page, supply an empty page token.
998  //
999  // When paginating, other parameters provided to
1000  // [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
1001  // must match the call that provided the page token.
1002  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
1003
1004  // Optional. The filter to apply to list results.
1005  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
1006
1007  // Optional. Specify the ordering of results as described in [Sorting
1008  // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
1009  // If not specified, the results will be sorted in the default order.
1010  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
1011}
1012
1013// Response message for
1014// [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices].
1015message ListServicesResponse {
1016  // The services in the specified location.
1017  repeated Service services = 1;
1018
1019  // A token that can be sent as `page_token` to retrieve the next page. If this
1020  // field is omitted, there are no subsequent pages.
1021  string next_page_token = 2;
1022
1023  // Locations that could not be reached.
1024  repeated string unreachable = 3;
1025}
1026
1027// Request message for
1028// [DataprocMetastore.GetService][google.cloud.metastore.v1beta.DataprocMetastore.GetService].
1029message GetServiceRequest {
1030  // Required. The relative resource name of the metastore service to retrieve,
1031  // in the following form:
1032  //
1033  // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
1034  string name = 1 [
1035    (google.api.field_behavior) = REQUIRED,
1036    (google.api.resource_reference) = {
1037      type: "metastore.googleapis.com/Service"
1038    }
1039  ];
1040}
1041
1042// Request message for
1043// [DataprocMetastore.CreateService][google.cloud.metastore.v1beta.DataprocMetastore.CreateService].
1044message CreateServiceRequest {
1045  // Required. The relative resource name of the location in which to create a
1046  // metastore service, in the following form:
1047  //
1048  // `projects/{project_number}/locations/{location_id}`.
1049  string parent = 1 [
1050    (google.api.field_behavior) = REQUIRED,
1051    (google.api.resource_reference) = {
1052      child_type: "metastore.googleapis.com/Service"
1053    }
1054  ];
1055
1056  // Required. The ID of the metastore service, which is used as the final
1057  // component of the metastore service's name.
1058  //
1059  // This value must be between 2 and 63 characters long inclusive, begin with a
1060  // letter, end with a letter or number, and consist of alpha-numeric
1061  // ASCII characters or hyphens.
1062  string service_id = 2 [(google.api.field_behavior) = REQUIRED];
1063
1064  // Required. The Metastore service to create. The `name` field is
1065  // ignored. The ID of the created metastore service must be provided in
1066  // the request's `service_id` field.
1067  Service service = 3 [(google.api.field_behavior) = REQUIRED];
1068
1069  // Optional. A request ID. Specify a unique request ID to allow the server to
1070  // ignore the request if it has completed. The server will ignore subsequent
1071  // requests that provide a duplicate request ID for at least 60 minutes after
1072  // the first request.
1073  //
1074  // For example, if an initial request times out, followed by another request
1075  // with the same request ID, the server ignores the second request to prevent
1076  // the creation of duplicate commitments.
1077  //
1078  // The request ID must be a valid
1079  // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
1080  // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1081  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
1082}
1083
1084// Request message for
1085// [DataprocMetastore.UpdateService][google.cloud.metastore.v1beta.DataprocMetastore.UpdateService].
1086message UpdateServiceRequest {
1087  // Required. A field mask used to specify the fields to be overwritten in the
1088  // metastore service resource by the update.
1089  // Fields specified in the `update_mask` are relative to the resource (not
1090  // to the full request). A field is overwritten if it is in the mask.
1091  google.protobuf.FieldMask update_mask = 1
1092      [(google.api.field_behavior) = REQUIRED];
1093
1094  // Required. The metastore service to update. The server only merges fields
1095  // in the service if they are specified in `update_mask`.
1096  //
1097  // The metastore service's `name` field is used to identify the metastore
1098  // service to be updated.
1099  Service service = 2 [(google.api.field_behavior) = REQUIRED];
1100
1101  // Optional. A request ID. Specify a unique request ID to allow the server to
1102  // ignore the request if it has completed. The server will ignore subsequent
1103  // requests that provide a duplicate request ID for at least 60 minutes after
1104  // the first request.
1105  //
1106  // For example, if an initial request times out, followed by another request
1107  // with the same request ID, the server ignores the second request to prevent
1108  // the creation of duplicate commitments.
1109  //
1110  // The request ID must be a valid
1111  // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
1112  // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1113  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
1114}
1115
1116// Request message for
1117// [DataprocMetastore.DeleteService][google.cloud.metastore.v1beta.DataprocMetastore.DeleteService].
1118message DeleteServiceRequest {
1119  // Required. The relative resource name of the metastore service to delete, in
1120  // the following form:
1121  //
1122  // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
1123  string name = 1 [
1124    (google.api.field_behavior) = REQUIRED,
1125    (google.api.resource_reference) = {
1126      type: "metastore.googleapis.com/Service"
1127    }
1128  ];
1129
1130  // Optional. A request ID. Specify a unique request ID to allow the server to
1131  // ignore the request if it has completed. The server will ignore subsequent
1132  // requests that provide a duplicate request ID for at least 60 minutes after
1133  // the first request.
1134  //
1135  // For example, if an initial request times out, followed by another request
1136  // with the same request ID, the server ignores the second request to prevent
1137  // the creation of duplicate commitments.
1138  //
1139  // The request ID must be a valid
1140  // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
1141  // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1142  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1143}
1144
1145// Request message for
1146// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports].
1147message ListMetadataImportsRequest {
1148  // Required. The relative resource name of the service whose metadata imports
1149  // to list, in the following form:
1150  //
1151  // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
1152  string parent = 1 [
1153    (google.api.field_behavior) = REQUIRED,
1154    (google.api.resource_reference) = {
1155      child_type: "metastore.googleapis.com/MetadataImport"
1156    }
1157  ];
1158
1159  // Optional. The maximum number of imports to return. The response may contain
1160  // less than the maximum number. If unspecified, no more than 500 imports are
1161  // returned. The maximum value is 1000; values above 1000 are changed to 1000.
1162  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
1163
1164  // Optional. A page token, received from a previous
1165  // [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
1166  // call. Provide this token to retrieve the subsequent page.
1167  //
1168  // To retrieve the first page, supply an empty page token.
1169  //
1170  // When paginating, other parameters provided to
1171  // [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
1172  // must match the call that provided the page token.
1173  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
1174
1175  // Optional. The filter to apply to list results.
1176  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
1177
1178  // Optional. Specify the ordering of results as described in [Sorting
1179  // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
1180  // If not specified, the results will be sorted in the default order.
1181  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
1182}
1183
1184// Response message for
1185// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports].
1186message ListMetadataImportsResponse {
1187  // The imports in the specified service.
1188  repeated MetadataImport metadata_imports = 1;
1189
1190  // A token that can be sent as `page_token` to retrieve the next page. If this
1191  // field is omitted, there are no subsequent pages.
1192  string next_page_token = 2;
1193
1194  // Locations that could not be reached.
1195  repeated string unreachable = 3;
1196}
1197
1198// Request message for
1199// [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.GetMetadataImport].
1200message GetMetadataImportRequest {
1201  // Required. The relative resource name of the metadata import to retrieve, in
1202  // the following form:
1203  //
1204  // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
1205  string name = 1 [
1206    (google.api.field_behavior) = REQUIRED,
1207    (google.api.resource_reference) = {
1208      type: "metastore.googleapis.com/MetadataImport"
1209    }
1210  ];
1211}
1212
1213// Request message for
1214// [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.CreateMetadataImport].
1215message CreateMetadataImportRequest {
1216  // Required. The relative resource name of the service in which to create a
1217  // metastore import, in the following form:
1218  //
1219  // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
1220  string parent = 1 [
1221    (google.api.field_behavior) = REQUIRED,
1222    (google.api.resource_reference) = {
1223      child_type: "metastore.googleapis.com/MetadataImport"
1224    }
1225  ];
1226
1227  // Required. The ID of the metadata import, which is used as the final
1228  // component of the metadata import's name.
1229  //
1230  // This value must be between 1 and 64 characters long, begin with a letter,
1231  // end with a letter or number, and consist of alpha-numeric ASCII characters
1232  // or hyphens.
1233  string metadata_import_id = 2 [(google.api.field_behavior) = REQUIRED];
1234
1235  // Required. The metadata import to create. The `name` field is ignored. The
1236  // ID of the created metadata import must be provided in the request's
1237  // `metadata_import_id` field.
1238  MetadataImport metadata_import = 3 [(google.api.field_behavior) = REQUIRED];
1239
1240  // Optional. A request ID. Specify a unique request ID to allow the server to
1241  // ignore the request if it has completed. The server will ignore subsequent
1242  // requests that provide a duplicate request ID for at least 60 minutes after
1243  // the first request.
1244  //
1245  // For example, if an initial request times out, followed by another request
1246  // with the same request ID, the server ignores the second request to prevent
1247  // the creation of duplicate commitments.
1248  //
1249  // The request ID must be a valid
1250  // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
1251  // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1252  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
1253}
1254
1255// Request message for
1256// [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.UpdateMetadataImport].
1257message UpdateMetadataImportRequest {
1258  // Required. A field mask used to specify the fields to be overwritten in the
1259  // metadata import resource by the update.
1260  // Fields specified in the `update_mask` are relative to the resource (not
1261  // to the full request). A field is overwritten if it is in the mask.
1262  google.protobuf.FieldMask update_mask = 1
1263      [(google.api.field_behavior) = REQUIRED];
1264
1265  // Required. The metadata import to update. The server only merges fields
1266  // in the import if they are specified in `update_mask`.
1267  //
1268  // The metadata import's `name` field is used to identify the metastore
1269  // import to be updated.
1270  MetadataImport metadata_import = 2 [(google.api.field_behavior) = REQUIRED];
1271
1272  // Optional. A request ID. Specify a unique request ID to allow the server to
1273  // ignore the request if it has completed. The server will ignore subsequent
1274  // requests that provide a duplicate request ID for at least 60 minutes after
1275  // the first request.
1276  //
1277  // For example, if an initial request times out, followed by another request
1278  // with the same request ID, the server ignores the second request to prevent
1279  // the creation of duplicate commitments.
1280  //
1281  // The request ID must be a valid
1282  // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
1283  // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1284  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
1285}
1286
1287// Request message for
1288// [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups].
1289message ListBackupsRequest {
1290  // Required. The relative resource name of the service whose backups to
1291  // list, in the following form:
1292  //
1293  // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
1294  string parent = 1 [
1295    (google.api.field_behavior) = REQUIRED,
1296    (google.api.resource_reference) = {
1297      child_type: "metastore.googleapis.com/Backup"
1298    }
1299  ];
1300
1301  // Optional. The maximum number of backups to return. The response may contain
1302  // less than the maximum number. If unspecified, no more than 500 backups are
1303  // returned. The maximum value is 1000; values above 1000 are changed to 1000.
1304  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
1305
1306  // Optional. A page token, received from a previous
1307  // [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
1308  // call. Provide this token to retrieve the subsequent page.
1309  //
1310  // To retrieve the first page, supply an empty page token.
1311  //
1312  // When paginating, other parameters provided to
1313  // [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
1314  // must match the call that provided the page token.
1315  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
1316
1317  // Optional. The filter to apply to list results.
1318  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
1319
1320  // Optional. Specify the ordering of results as described in [Sorting
1321  // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
1322  // If not specified, the results will be sorted in the default order.
1323  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
1324}
1325
1326// Response message for
1327// [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups].
1328message ListBackupsResponse {
1329  // The backups of the specified service.
1330  repeated Backup backups = 1;
1331
1332  // A token that can be sent as `page_token` to retrieve the next page. If this
1333  // field is omitted, there are no subsequent pages.
1334  string next_page_token = 2;
1335
1336  // Locations that could not be reached.
1337  repeated string unreachable = 3;
1338}
1339
1340// Request message for
1341// [DataprocMetastore.GetBackup][google.cloud.metastore.v1beta.DataprocMetastore.GetBackup].
1342message GetBackupRequest {
1343  // Required. The relative resource name of the backup to retrieve, in the
1344  // following form:
1345  //
1346  // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
1347  string name = 1 [
1348    (google.api.field_behavior) = REQUIRED,
1349    (google.api.resource_reference) = {
1350      type: "metastore.googleapis.com/Backup"
1351    }
1352  ];
1353}
1354
1355// Request message for
1356// [DataprocMetastore.CreateBackup][google.cloud.metastore.v1beta.DataprocMetastore.CreateBackup].
1357message CreateBackupRequest {
1358  // Required. The relative resource name of the service in which to create a
1359  // backup of the following form:
1360  //
1361  // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
1362  string parent = 1 [
1363    (google.api.field_behavior) = REQUIRED,
1364    (google.api.resource_reference) = {
1365      child_type: "metastore.googleapis.com/Backup"
1366    }
1367  ];
1368
1369  // Required. The ID of the backup, which is used as the final component of the
1370  // backup's name.
1371  //
1372  // This value must be between 1 and 64 characters long, begin with a letter,
1373  // end with a letter or number, and consist of alpha-numeric ASCII characters
1374  // or hyphens.
1375  string backup_id = 2 [(google.api.field_behavior) = REQUIRED];
1376
1377  // Required. The backup to create. The `name` field is ignored. The ID of the
1378  // created backup must be provided in the request's `backup_id` field.
1379  Backup backup = 3 [(google.api.field_behavior) = REQUIRED];
1380
1381  // Optional. A request ID. Specify a unique request ID to allow the server to
1382  // ignore the request if it has completed. The server will ignore subsequent
1383  // requests that provide a duplicate request ID for at least 60 minutes after
1384  // the first request.
1385  //
1386  // For example, if an initial request times out, followed by another request
1387  // with the same request ID, the server ignores the second request to prevent
1388  // the creation of duplicate commitments.
1389  //
1390  // The request ID must be a valid
1391  // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
1392  // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1393  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
1394}
1395
1396// Request message for
1397// [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1beta.DataprocMetastore.DeleteBackup].
1398message DeleteBackupRequest {
1399  // Required. The relative resource name of the backup to delete, in the
1400  // following form:
1401  //
1402  // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
1403  string name = 1 [
1404    (google.api.field_behavior) = REQUIRED,
1405    (google.api.resource_reference) = {
1406      type: "metastore.googleapis.com/Backup"
1407    }
1408  ];
1409
1410  // Optional. A request ID. Specify a unique request ID to allow the server to
1411  // ignore the request if it has completed. The server will ignore subsequent
1412  // requests that provide a duplicate request ID for at least 60 minutes after
1413  // the first request.
1414  //
1415  // For example, if an initial request times out, followed by another request
1416  // with the same request ID, the server ignores the second request to prevent
1417  // the creation of duplicate commitments.
1418  //
1419  // The request ID must be a valid
1420  // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
1421  // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1422  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1423}
1424
1425// Request message for
1426// [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1beta.DataprocMetastore.ExportMetadata].
1427message ExportMetadataRequest {
1428  // Required. Destination that metadata is exported to.
1429  oneof destination {
1430    // A Cloud Storage URI of a folder, in the format
1431    // `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
1432    // `<export_folder>` containing exported files will be created below it.
1433    string destination_gcs_folder = 2;
1434  }
1435
1436  // Required. The relative resource name of the metastore service to run
1437  // export, in the following form:
1438  //
1439  // `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1440  string service = 1 [
1441    (google.api.field_behavior) = REQUIRED,
1442    (google.api.resource_reference) = {
1443      type: "metastore.googleapis.com/Service"
1444    }
1445  ];
1446
1447  // Optional. A request ID. Specify a unique request ID to allow the server to
1448  // ignore the request if it has completed. The server will ignore subsequent
1449  // requests that provide a duplicate request ID for at least 60 minutes after
1450  // the first request.
1451  //
1452  // For example, if an initial request times out, followed by another request
1453  // with the same request ID, the server ignores the second request to prevent
1454  // the creation of duplicate commitments.
1455  //
1456  // The request ID must be a valid
1457  // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
1458  // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1459  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
1460
1461  // Optional. The type of the database dump. If unspecified, defaults to
1462  // `MYSQL`.
1463  DatabaseDumpSpec.Type database_dump_type = 4
1464      [(google.api.field_behavior) = OPTIONAL];
1465}
1466
1467// Request message for [DataprocMetastore.Restore][].
1468message RestoreServiceRequest {
1469  // Required. The relative resource name of the metastore service to run
1470  // restore, in the following form:
1471  //
1472  // `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1473  string service = 1 [
1474    (google.api.field_behavior) = REQUIRED,
1475    (google.api.resource_reference) = {
1476      type: "metastore.googleapis.com/Service"
1477    }
1478  ];
1479
1480  // Required. The relative resource name of the metastore service backup to
1481  // restore from, in the following form:
1482  //
1483  // `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
1484  string backup = 2 [
1485    (google.api.field_behavior) = REQUIRED,
1486    (google.api.resource_reference) = {
1487      type: "metastore.googleapis.com/Backup"
1488    }
1489  ];
1490
1491  // Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
1492  Restore.RestoreType restore_type = 3 [(google.api.field_behavior) = OPTIONAL];
1493
1494  // Optional. A request ID. Specify a unique request ID to allow the server to
1495  // ignore the request if it has completed. The server will ignore subsequent
1496  // requests that provide a duplicate request ID for at least 60 minutes after
1497  // the first request.
1498  //
1499  // For example, if an initial request times out, followed by another request
1500  // with the same request ID, the server ignores the second request to prevent
1501  // the creation of duplicate commitments.
1502  //
1503  // The request ID must be a valid
1504  // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
1505  // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1506  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
1507}
1508
1509// Represents the metadata of a long-running operation.
1510message OperationMetadata {
1511  // Output only. The time the operation was created.
1512  google.protobuf.Timestamp create_time = 1
1513      [(google.api.field_behavior) = OUTPUT_ONLY];
1514
1515  // Output only. The time the operation finished running.
1516  google.protobuf.Timestamp end_time = 2
1517      [(google.api.field_behavior) = OUTPUT_ONLY];
1518
1519  // Output only. Server-defined resource path for the target of the operation.
1520  string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
1521
1522  // Output only. Name of the verb executed by the operation.
1523  string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
1524
1525  // Output only. Human-readable status of the operation, if any.
1526  string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
1527
1528  // Output only. Identifies whether the caller has requested cancellation
1529  // of the operation. Operations that have successfully been cancelled
1530  // have [Operation.error][] value with a
1531  // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
1532  // `Code.CANCELLED`.
1533  bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
1534
1535  // Output only. API version used to start the operation.
1536  string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
1537}
1538
1539// Metadata about the service in a location.
1540message LocationMetadata {
1541  // A specification of a supported version of the Hive Metastore software.
1542  message HiveMetastoreVersion {
1543    // The semantic version of the Hive Metastore software.
1544    string version = 1;
1545
1546    // Whether `version` will be chosen by the server if a metastore service is
1547    // created with a `HiveMetastoreConfig` that omits the `version`.
1548    bool is_default = 2;
1549  }
1550
1551  // The versions of Hive Metastore that can be used when creating a new
1552  // metastore service in this location. The server guarantees that exactly one
1553  // `HiveMetastoreVersion` in the list will set `is_default`.
1554  repeated HiveMetastoreVersion supported_hive_metastore_versions = 1;
1555}
1556
1557// The specification of database dump to import from or export to.
1558message DatabaseDumpSpec {
1559  // The type of the database dump.
1560  enum Type {
1561    // The type of the database dump is unknown.
1562    TYPE_UNSPECIFIED = 0;
1563
1564    // Database dump is a MySQL dump file.
1565    MYSQL = 1;
1566
1567    // Database dump contains Avro files.
1568    AVRO = 2;
1569  }
1570}
1571
1572// Request message for
1573// [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy].
1574message RemoveIamPolicyRequest {
1575  // Required. The relative resource name of the dataplane resource to remove
1576  // IAM policy, in the following form:
1577  //
1578  // `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
1579  // or
1580  // `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
1581  string resource = 1 [
1582    (google.api.field_behavior) = REQUIRED,
1583    (google.api.resource_reference) = { type: "*" }
1584  ];
1585
1586  // Optional. Removes IAM policy attached to database or table asynchronously
1587  // when it is set. The default is false.
1588  bool asynchronous = 2 [(google.api.field_behavior) = OPTIONAL];
1589}
1590
1591// Response message for
1592// [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy].
1593message RemoveIamPolicyResponse {
1594  // True if the policy is successfully removed.
1595  bool success = 1;
1596}
1597
1598// Request message for
1599// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
1600message QueryMetadataRequest {
1601  // Required. The relative resource name of the metastore service to query
1602  // metadata, in the following format:
1603  //
1604  // `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1605  string service = 1 [
1606    (google.api.field_behavior) = REQUIRED,
1607    (google.api.resource_reference) = {
1608      type: "metastore.googleapis.com/Service"
1609    }
1610  ];
1611
1612  // Required. A read-only SQL query to execute against the metadata database.
1613  // The query cannot change or mutate the data.
1614  string query = 2 [(google.api.field_behavior) = REQUIRED];
1615}
1616
1617// Response message for
1618// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
1619message QueryMetadataResponse {
1620  // The manifest URI  is link to a JSON instance in Cloud Storage.
1621  // This instance manifests immediately along with QueryMetadataResponse. The
1622  // content of the URI is not retriable until the long-running operation query
1623  // against the metadata finishes.
1624  string result_manifest_uri = 1;
1625}
1626
1627// Error details in public error message for
1628// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
1629message ErrorDetails {
1630  // Additional structured details about this error.
1631  //
1632  // Keys define the failure items.
1633  // Value describes the exception or details of the item.
1634  map<string, string> details = 1;
1635}
1636
1637// Request message for
1638// [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase].
1639message MoveTableToDatabaseRequest {
1640  // Required. The relative resource name of the metastore service to mutate
1641  // metadata, in the following format:
1642  //
1643  // `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1644  string service = 1 [
1645    (google.api.field_behavior) = REQUIRED,
1646    (google.api.resource_reference) = {
1647      type: "metastore.googleapis.com/Service"
1648    }
1649  ];
1650
1651  // Required. The name of the table to be moved.
1652  string table_name = 2 [(google.api.field_behavior) = REQUIRED];
1653
1654  // Required. The name of the database where the table resides.
1655  string db_name = 3 [(google.api.field_behavior) = REQUIRED];
1656
1657  // Required. The name of the database where the table should be moved.
1658  string destination_db_name = 4 [(google.api.field_behavior) = REQUIRED];
1659}
1660
1661// Response message for
1662// [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase].
1663message MoveTableToDatabaseResponse {}
1664
1665// Request message for
1666// [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation].
1667message AlterMetadataResourceLocationRequest {
1668  // Required. The relative resource name of the metastore service to mutate
1669  // metadata, in the following format:
1670  //
1671  // `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1672  string service = 1 [
1673    (google.api.field_behavior) = REQUIRED,
1674    (google.api.resource_reference) = {
1675      type: "metastore.googleapis.com/Service"
1676    }
1677  ];
1678
1679  // Required. The relative metadata resource name in the following format.
1680  //
1681  // `databases/{database_id}`
1682  // or
1683  // `databases/{database_id}/tables/{table_id}`
1684  // or
1685  // `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
1686  string resource_name = 2 [(google.api.field_behavior) = REQUIRED];
1687
1688  // Required. The new location URI for the metadata resource.
1689  string location_uri = 3 [(google.api.field_behavior) = REQUIRED];
1690}
1691
1692// Response message for
1693// [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation].
1694message AlterMetadataResourceLocationResponse {}
1695