diff --git a/packages/google-cloud-metastore/README.md b/packages/google-cloud-metastore/README.md index 28c25b53490..6bc529619b0 100644 --- a/packages/google-cloud-metastore/README.md +++ b/packages/google-cloud-metastore/README.md @@ -101,6 +101,11 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Dataproc_metastore.restore_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.restore_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.restore_service.js,samples/README.md) | | Dataproc_metastore.update_metadata_import | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.update_metadata_import.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.update_metadata_import.js,samples/README.md) | | Dataproc_metastore.update_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.update_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.update_service.js,samples/README.md) | +| Dataproc_metastore_federation.create_federation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.create_federation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.create_federation.js,samples/README.md) | +| Dataproc_metastore_federation.delete_federation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.delete_federation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.delete_federation.js,samples/README.md) | +| Dataproc_metastore_federation.get_federation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.get_federation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.get_federation.js,samples/README.md) | +| Dataproc_metastore_federation.list_federations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.list_federations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.list_federations.js,samples/README.md) | +| Dataproc_metastore_federation.update_federation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.update_federation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.update_federation.js,samples/README.md) | | Dataproc_metastore.create_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_backup.js,samples/README.md) | | Dataproc_metastore.create_metadata_import | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_metadata_import.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_metadata_import.js,samples/README.md) | | Dataproc_metastore.create_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_service.js,samples/README.md) | @@ -116,6 +121,11 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Dataproc_metastore.restore_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.restore_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.restore_service.js,samples/README.md) | | Dataproc_metastore.update_metadata_import | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.update_metadata_import.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.update_metadata_import.js,samples/README.md) | | Dataproc_metastore.update_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.update_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.update_service.js,samples/README.md) | +| Dataproc_metastore_federation.create_federation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.create_federation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.create_federation.js,samples/README.md) | +| Dataproc_metastore_federation.delete_federation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.delete_federation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.delete_federation.js,samples/README.md) | +| Dataproc_metastore_federation.get_federation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.get_federation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.get_federation.js,samples/README.md) | +| Dataproc_metastore_federation.list_federations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.list_federations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.list_federations.js,samples/README.md) | +| Dataproc_metastore_federation.update_federation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.update_federation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.update_federation.js,samples/README.md) | | Dataproc_metastore.create_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_backup.js,samples/README.md) | | Dataproc_metastore.create_metadata_import | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_metadata_import.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_metadata_import.js,samples/README.md) | | Dataproc_metastore.create_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_service.js,samples/README.md) | @@ -131,6 +141,11 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Dataproc_metastore.restore_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.restore_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.restore_service.js,samples/README.md) | | Dataproc_metastore.update_metadata_import | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.update_metadata_import.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.update_metadata_import.js,samples/README.md) | | Dataproc_metastore.update_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.update_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.update_service.js,samples/README.md) | +| Dataproc_metastore_federation.create_federation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.create_federation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.create_federation.js,samples/README.md) | +| Dataproc_metastore_federation.delete_federation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.delete_federation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.delete_federation.js,samples/README.md) | +| Dataproc_metastore_federation.get_federation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.get_federation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.get_federation.js,samples/README.md) | +| Dataproc_metastore_federation.list_federations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.list_federations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.list_federations.js,samples/README.md) | +| Dataproc_metastore_federation.update_federation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.update_federation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.update_federation.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/quickstart.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/test/quickstart.js,samples/README.md) | diff --git a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore.proto b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore.proto index 6a49abe207f..c1ecac917f5 100644 --- a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore.proto +++ b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -30,10 +30,15 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/metastore/v1;me option java_multiple_files = true; option java_outer_classname = "MetastoreProto"; option java_package = "com.google.cloud.metastore.v1"; +option php_namespace = "Google\\Cloud\\Metastore\\V1"; option (google.api.resource_definition) = { type: "compute.googleapis.com/Network" pattern: "projects/{project}/global/networks/{network}" }; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Subnetwork" + pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}" +}; // Configures and manages metastore services. // Metastore services are fully managed, highly available, autoscaled, @@ -81,7 +86,7 @@ service DataprocMetastore { option (google.api.method_signature) = "parent,service,service_id"; option (google.longrunning.operation_info) = { response_type: "Service" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" }; } @@ -94,7 +99,7 @@ service DataprocMetastore { option (google.api.method_signature) = "service,update_mask"; option (google.longrunning.operation_info) = { response_type: "Service" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" }; } @@ -106,7 +111,7 @@ service DataprocMetastore { option (google.api.method_signature) = "name"; option (google.longrunning.operation_info) = { response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" }; } @@ -135,7 +140,7 @@ service DataprocMetastore { option (google.api.method_signature) = "parent,metadata_import,metadata_import_id"; option (google.longrunning.operation_info) = { response_type: "MetadataImport" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" }; } @@ -149,7 +154,7 @@ service DataprocMetastore { option (google.api.method_signature) = "metadata_import,update_mask"; option (google.longrunning.operation_info) = { response_type: "MetadataImport" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" }; } @@ -161,7 +166,7 @@ service DataprocMetastore { }; option (google.longrunning.operation_info) = { response_type: "MetadataExport" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" }; } @@ -174,7 +179,7 @@ service DataprocMetastore { option (google.api.method_signature) = "service,backup"; option (google.longrunning.operation_info) = { response_type: "Restore" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" }; } @@ -203,7 +208,7 @@ service DataprocMetastore { option (google.api.method_signature) = "parent,backup,backup_id"; option (google.longrunning.operation_info) = { response_type: "Backup" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" }; } @@ -215,7 +220,7 @@ service DataprocMetastore { option (google.api.method_signature) = "name"; option (google.longrunning.operation_info) = { response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" }; } } @@ -288,6 +293,18 @@ message Service { STABLE = 2; } + // The backend database type for the metastore service. + enum DatabaseType { + // The DATABASE_TYPE is not set. + DATABASE_TYPE_UNSPECIFIED = 0; + + // MySQL is used to persist the metastore data. + MYSQL = 1; + + // Spanner is used to persist the metastore data. + SPANNER = 2; + } + // Configuration properties specific to the underlying metastore service // technology (the software that serves metastore queries). oneof metastore_config { @@ -296,7 +313,8 @@ message Service { HiveMetastoreConfig hive_metastore_config = 5; } - // Immutable. The relative resource name of the metastore service, of the form: + // Immutable. The relative resource name of the metastore service, in the following + // format: // // `projects/{project_number}/locations/{location_id}/services/{service_id}`. string name = 1 [(google.api.field_behavior) = IMMUTABLE]; @@ -343,6 +361,8 @@ message Service { // The one hour maintenance window of the metastore service. This specifies // when the service can be restarted for maintenance purposes in UTC time. + // Maintenance window is not needed for services with the SPANNER + // database type. MaintenanceWindow maintenance_window = 15; // Output only. The globally unique resource identifier of the metastore service. @@ -354,6 +374,21 @@ message Service { // Immutable. The release channel of the service. // If unspecified, defaults to `STABLE`. ReleaseChannel release_channel = 19 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Information used to configure the Dataproc Metastore service to encrypt + // customer data at rest. Cannot be updated. + EncryptionConfig encryption_config = 20 [(google.api.field_behavior) = IMMUTABLE]; + + // The configuration specifying the network settings for the + // Dataproc Metastore service. + NetworkConfig network_config = 21; + + // Immutable. The database type that the Metastore service stores its data. + DatabaseType database_type = 22 [(google.api.field_behavior) = IMMUTABLE]; + + // The configuration specifying telemetry settings for the Dataproc Metastore + // service. If unspecified defaults to `JSON`. + TelemetryConfig telemetry_config = 23; } // Maintenance window. This specifies when Dataproc Metastore @@ -374,7 +409,9 @@ message HiveMetastoreConfig { // A mapping of Hive metastore configuration key-value pairs to apply to the // Hive metastore (configured in `hive-site.xml`). The mappings - // override system defaults (some keys cannot be overridden). + // override system defaults (some keys cannot be overridden). These + // overrides are also applied to auxiliary versions and can be further + // customized in the auxiliary version's `AuxiliaryVersionConfig`. map config_overrides = 2; // Information used to configure the Hive metastore service as a service @@ -413,6 +450,62 @@ message Secret { } } +// Encryption settings for the service. +message EncryptionConfig { + // The fully qualified customer provided Cloud KMS key name to use for + // customer data encryption, in the following form: + // + // `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`. + string kms_key = 1; +} + +// Network configuration for the Dataproc Metastore service. +message NetworkConfig { + // Contains information of the customer's network configurations. + message Consumer { + oneof vpc_resource { + // Immutable. The subnetwork of the customer project from which an IP address is + // reserved and used as the Dataproc Metastore service's + // endpoint. It is accessible to hosts in the subnet and to all + // hosts in a subnet in the same region and same network. There must + // be at least one IP address available in the subnet's primary range. The + // subnet is specified in the following form: + // + // `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id} + string subnetwork = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Subnetwork" + } + ]; + } + + // Output only. The URI of the endpoint used to access the metastore service. + string endpoint_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Immutable. The consumer-side network configuration for the Dataproc Metastore + // instance. + repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE]; +} + +// Telemetry Configuration for the Dataproc Metastore service. +message TelemetryConfig { + enum LogFormat { + // The LOG_FORMAT is not set. + LOG_FORMAT_UNSPECIFIED = 0; + + // Logging output uses the legacy `textPayload` format. + LEGACY = 1; + + // Logging output uses the `jsonPayload` format. + JSON = 2; + } + + // The output format of the Dataproc Metastore service's logs. + LogFormat log_format = 1; +} + // The metadata management activities of the metastore service. message MetadataManagementActivity { // Output only. The latest metadata exports of the metastore service. @@ -432,6 +525,7 @@ message MetadataImport { // A specification of the location of and metadata about a database dump from // a relational database management system. message DatabaseDump { + // The type of the database. enum DatabaseType { // The type of the source database is unknown. @@ -659,7 +753,7 @@ message ListServicesRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" + child_type: "metastore.googleapis.com/Service" } ]; @@ -723,7 +817,7 @@ message CreateServiceRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" + child_type: "metastore.googleapis.com/Service" } ]; @@ -822,7 +916,7 @@ message ListMetadataImportsRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" + child_type: "metastore.googleapis.com/MetadataImport" } ]; @@ -886,7 +980,7 @@ message CreateMetadataImportRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" + child_type: "metastore.googleapis.com/MetadataImport" } ]; @@ -957,7 +1051,7 @@ message ListBackupsRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" + child_type: "metastore.googleapis.com/Backup" } ]; @@ -1021,7 +1115,7 @@ message CreateBackupRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" + child_type: "metastore.googleapis.com/Backup" } ]; @@ -1219,6 +1313,4 @@ message DatabaseDumpSpec { // Database dump contains Avro files. AVRO = 2; } - - } diff --git a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore_federation.proto b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore_federation.proto new file mode 100644 index 00000000000..f3a95b1758d --- /dev/null +++ b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore_federation.proto @@ -0,0 +1,361 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.metastore.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/metastore/v1;metastore"; +option java_multiple_files = true; +option java_outer_classname = "MetastoreFederationProto"; +option java_package = "com.google.cloud.metastore.v1"; + +// Configures and manages metastore federation services. +// Dataproc Metastore Federation Service allows federating a collection of +// backend metastores like BigQuery, Dataplex Lakes, and other Dataproc +// Metastores. The Federation Service exposes a gRPC URL through which metadata +// from the backend metastores are served at query time. +// +// The Dataproc Metastore Federation API defines the following resource model: +// * The service works with a collection of Google Cloud projects. +// * Each project has a collection of available locations. +// * Each location has a collection of federations. +// * Dataproc Metastore Federations are resources with names of the +// form: +// `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. +service DataprocMetastoreFederation { + option (google.api.default_host) = "metastore.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists federations in a project and location. + rpc ListFederations(ListFederationsRequest) returns (ListFederationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/federations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a single federation. + rpc GetFederation(GetFederationRequest) returns (Federation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/federations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a metastore federation in a project and location. + rpc CreateFederation(CreateFederationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/federations" + body: "federation" + }; + option (google.api.method_signature) = "parent,federation,federation_id"; + option (google.longrunning.operation_info) = { + response_type: "Federation" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } + + // Updates the fields of a federation. + rpc UpdateFederation(UpdateFederationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{federation.name=projects/*/locations/*/federations/*}" + body: "federation" + }; + option (google.api.method_signature) = "federation,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Federation" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } + + // Deletes a single federation. + rpc DeleteFederation(DeleteFederationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/federations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } +} + +// Represents a federation of multiple backend metastores. +message Federation { + option (google.api.resource) = { + type: "metastore.googleapis.com/Federation" + pattern: "projects/{project}/locations/{location}/federations/{federation}" + }; + + // The current state of the federation. + enum State { + // The state of the metastore federation is unknown. + STATE_UNSPECIFIED = 0; + + // The metastore federation is in the process of being created. + CREATING = 1; + + // The metastore federation is running and ready to serve queries. + ACTIVE = 2; + + // The metastore federation is being updated. It remains usable but cannot + // accept additional update requests or be deleted at this time. + UPDATING = 3; + + // The metastore federation is undergoing deletion. It cannot be used. + DELETING = 4; + + // The metastore federation has encountered an error and cannot be used. The + // metastore federation should be deleted. + ERROR = 5; + } + + // Immutable. The relative resource name of the federation, of the + // form: + // projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time when the metastore federation was created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metastore federation was last updated. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-defined labels for the metastore federation. + map labels = 4; + + // Immutable. The Apache Hive metastore version of the federation. All backend metastore + // versions must be compatible with the federation version. + string version = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // A map from `BackendMetastore` rank to `BackendMetastore`s from which the + // federation service serves metadata at query time. The map key represents + // the order in which `BackendMetastore`s should be evaluated to resolve + // database names at query time and should be greater than or equal to zero. A + // `BackendMetastore` with a lower number will be evaluated before a + // `BackendMetastore` with a higher number. + map backend_metastores = 6; + + // Output only. The federation endpoint. + string endpoint_uri = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the federation. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state of the metastore federation, + // if available. + string state_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The globally unique resource identifier of the metastore federation. + string uid = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents a backend metastore for the federation. +message BackendMetastore { + // The type of the backend metastore. + enum MetastoreType { + // The metastore type is not set. + METASTORE_TYPE_UNSPECIFIED = 0; + + // The backend metastore is Dataproc Metastore. + DATAPROC_METASTORE = 3; + } + + // The relative resource name of the metastore that is being federated. + // The formats of the relative resource names for the currently supported + // metastores are listed below: + // + // * Dataplex + // * `projects/{project_id}/locations/{location}/lakes/{lake_id}` + // * BigQuery + // * `projects/{project_id}` + // * Dataproc Metastore + // * `projects/{project_id}/locations/{location}/services/{service_id}` + string name = 1; + + // The type of the backend metastore. + MetastoreType metastore_type = 2; +} + +// Request message for ListFederations. +message ListFederationsRequest { + // Required. The relative resource name of the location of metastore federations + // to list, in the following form: + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Federation" + } + ]; + + // Optional. The maximum number of federations to return. The response may contain less + // than the maximum number. If unspecified, no more than 500 services are + // returned. The maximum value is 1000; values above 1000 are changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous ListFederationServices + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // ListFederationServices must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListFederations +message ListFederationsResponse { + // The services in the specified location. + repeated Federation federations = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for GetFederation. +message GetFederationRequest { + // Required. The relative resource name of the metastore federation to retrieve, + // in the following form: + // + // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Federation" + } + ]; +} + +// Request message for CreateFederation. +message CreateFederationRequest { + // Required. The relative resource name of the location in which to create a federation + // service, in the following form: + // + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Federation" + } + ]; + + // Required. The ID of the metastore federation, which is used as the final + // component of the metastore federation's name. + // + // This value must be between 2 and 63 characters long inclusive, begin with a + // letter, end with a letter or number, and consist of alpha-numeric + // ASCII characters or hyphens. + string federation_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Metastore Federation to create. The `name` field is + // ignored. The ID of the created metastore federation must be + // provided in the request's `federation_id` field. + Federation federation = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to ignore the + // request if it has completed. The server will ignore subsequent requests + // that provide a duplicate request ID for at least 60 minutes after the first + // request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for UpdateFederation. +message UpdateFederationRequest { + // Required. A field mask used to specify the fields to be overwritten in the + // metastore federation resource by the update. + // Fields specified in the `update_mask` are relative to the resource (not + // to the full request). A field is overwritten if it is in the mask. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The metastore federation to update. The server only merges fields + // in the service if they are specified in `update_mask`. + // + // The metastore federation's `name` field is used to identify the + // metastore service to be updated. + Federation federation = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to ignore the + // request if it has completed. The server will ignore subsequent requests + // that provide a duplicate request ID for at least 60 minutes after the first + // request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for DeleteFederation. +message DeleteFederationRequest { + // Required. The relative resource name of the metastore federation to delete, + // in the following form: + // + // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Federation" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to ignore the + // request if it has completed. The server will ignore subsequent requests + // that provide a duplicate request ID for at least 60 minutes after the first + // request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore.proto b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore.proto index d5b96385e33..3cac5b5abc7 100644 --- a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore.proto +++ b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore.proto @@ -63,7 +63,8 @@ option (google.api.resource_definition) = { // `/projects/{project_number}/locations/{location_id}/services/{service_id}`. service DataprocMetastore { option (google.api.default_host) = "metastore.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Lists services in a project and location. rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { @@ -82,7 +83,8 @@ service DataprocMetastore { } // Creates a metastore service in a project and location. - rpc CreateService(CreateServiceRequest) returns (google.longrunning.Operation) { + rpc CreateService(CreateServiceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1alpha/{parent=projects/*/locations/*}/services" body: "service" @@ -90,12 +92,13 @@ service DataprocMetastore { option (google.api.method_signature) = "parent,service,service_id"; option (google.longrunning.operation_info) = { response_type: "Service" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" }; } // Updates the parameters of a single service. - rpc UpdateService(UpdateServiceRequest) returns (google.longrunning.Operation) { + rpc UpdateService(UpdateServiceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1alpha/{service.name=projects/*/locations/*/services/*}" body: "service" @@ -103,24 +106,26 @@ service DataprocMetastore { option (google.api.method_signature) = "service,update_mask"; option (google.longrunning.operation_info) = { response_type: "Service" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" }; } // Deletes a single service. - rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) { + rpc DeleteService(DeleteServiceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1alpha/{name=projects/*/locations/*/services/*}" }; option (google.api.method_signature) = "name"; option (google.longrunning.operation_info) = { response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" }; } // Lists imports in a service. - rpc ListMetadataImports(ListMetadataImportsRequest) returns (ListMetadataImportsResponse) { + rpc ListMetadataImports(ListMetadataImportsRequest) + returns (ListMetadataImportsResponse) { option (google.api.http) = { get: "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports" }; @@ -136,21 +141,24 @@ service DataprocMetastore { } // Creates a new MetadataImport in a given project and location. - rpc CreateMetadataImport(CreateMetadataImportRequest) returns (google.longrunning.Operation) { + rpc CreateMetadataImport(CreateMetadataImportRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports" body: "metadata_import" }; - option (google.api.method_signature) = "parent,metadata_import,metadata_import_id"; + option (google.api.method_signature) = + "parent,metadata_import,metadata_import_id"; option (google.longrunning.operation_info) = { response_type: "MetadataImport" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" }; } // Updates a single import. // Only the description field of MetadataImport is supported to be updated. - rpc UpdateMetadataImport(UpdateMetadataImportRequest) returns (google.longrunning.Operation) { + rpc UpdateMetadataImport(UpdateMetadataImportRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1alpha/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}" body: "metadata_import" @@ -158,24 +166,26 @@ service DataprocMetastore { option (google.api.method_signature) = "metadata_import,update_mask"; option (google.longrunning.operation_info) = { response_type: "MetadataImport" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" }; } // Exports metadata from a service. - rpc ExportMetadata(ExportMetadataRequest) returns (google.longrunning.Operation) { + rpc ExportMetadata(ExportMetadataRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1alpha/{service=projects/*/locations/*/services/*}:exportMetadata" body: "*" }; option (google.longrunning.operation_info) = { response_type: "MetadataExport" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" }; } // Restores a service from a backup. - rpc RestoreService(RestoreServiceRequest) returns (google.longrunning.Operation) { + rpc RestoreService(RestoreServiceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1alpha/{service=projects/*/locations/*/services/*}:restore" body: "*" @@ -183,7 +193,7 @@ service DataprocMetastore { option (google.api.method_signature) = "service,backup"; option (google.longrunning.operation_info) = { response_type: "Restore" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" }; } @@ -212,7 +222,7 @@ service DataprocMetastore { option (google.api.method_signature) = "parent,backup,backup_id"; option (google.longrunning.operation_info) = { response_type: "Backup" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" }; } @@ -224,7 +234,7 @@ service DataprocMetastore { option (google.api.method_signature) = "name"; option (google.longrunning.operation_info) = { response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" }; } } @@ -317,29 +327,30 @@ message Service { HiveMetastoreConfig hive_metastore_config = 5; } - // Immutable. The relative resource name of the metastore service, of the form: + // Immutable. The relative resource name of the metastore service, in the + // following format: // // `projects/{project_number}/locations/{location_id}/services/{service_id}`. string name = 1 [(google.api.field_behavior) = IMMUTABLE]; // Output only. The time when the metastore service was created. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the metastore service was last updated. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // User-defined labels for the metastore service. map labels = 4; - // Immutable. The relative resource name of the VPC network on which the instance can be - // accessed. It is specified in the following form: + // Immutable. The relative resource name of the VPC network on which the + // instance can be accessed. It is specified in the following form: // // `projects/{project_number}/global/networks/{network_id}`. string network = 7 [ (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { - type: "compute.googleapis.com/Network" - } + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } ]; // Output only. The URI of the endpoint used to access the metastore service. @@ -351,12 +362,12 @@ message Service { // Output only. The current state of the metastore service. State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Additional information about the current state of the metastore service, if - // available. + // Output only. Additional information about the current state of the + // metastore service, if available. string state_message = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A Cloud Storage URI (starting with `gs://`) that specifies where artifacts - // related to the metastore service are stored. + // Output only. A Cloud Storage URI (starting with `gs://`) that specifies + // where artifacts related to the metastore service are stored. string artifact_gcs_uri = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; // The tier of the service. @@ -372,26 +383,33 @@ message Service { // database type. MaintenanceWindow maintenance_window = 15; - // Output only. The globally unique resource identifier of the metastore service. + // Output only. The globally unique resource identifier of the metastore + // service. string uid = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The metadata management activities of the metastore service. - MetadataManagementActivity metadata_management_activity = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + MetadataManagementActivity metadata_management_activity = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Immutable. The release channel of the service. // If unspecified, defaults to `STABLE`. ReleaseChannel release_channel = 19 [(google.api.field_behavior) = IMMUTABLE]; - // Immutable. Information used to configure the Dataproc Metastore service to encrypt - // customer data at rest. Cannot be updated. - EncryptionConfig encryption_config = 20 [(google.api.field_behavior) = IMMUTABLE]; + // Immutable. Information used to configure the Dataproc Metastore service to + // encrypt customer data at rest. Cannot be updated. + EncryptionConfig encryption_config = 20 + [(google.api.field_behavior) = IMMUTABLE]; - // Immutable. The configuration specifying the network settings for the + // The configuration specifying the network settings for the // Dataproc Metastore service. - NetworkConfig network_config = 21 [(google.api.field_behavior) = IMMUTABLE]; + NetworkConfig network_config = 21; // Immutable. The database type that the Metastore service stores its data. DatabaseType database_type = 22 [(google.api.field_behavior) = IMMUTABLE]; + + // The configuration specifying telemetry settings for the Dataproc Metastore + // service. If unspecified defaults to `JSON`. + TelemetryConfig telemetry_config = 23; } // Specifies how metastore metadata should be integrated with external services. @@ -425,9 +443,9 @@ message Lake { // The Lake resource name. // Example: // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` - string name = 1 [(google.api.resource_reference) = { - type: "dataplex.googleapis.com/Lake" - }]; + string name = 1 [ + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; } // Maintenance window. This specifies when Dataproc Metastore @@ -537,8 +555,8 @@ message AuxiliaryVersionConfig { // the auxiliary version's overrides takes precedence. map config_overrides = 2; - // Output only. The network configuration contains the endpoint URI(s) of the auxiliary - // Hive metastore service. + // Output only. The network configuration contains the endpoint URI(s) of the + // auxiliary Hive metastore service. NetworkConfig network_config = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -547,32 +565,54 @@ message NetworkConfig { // Contains information of the customer's network configurations. message Consumer { oneof vpc_resource { - // The subnetwork of the customer project from which an IP address is - // reserved and used as the Dataproc Metastore service's + // Immutable. The subnetwork of the customer project from which an IP + // address is reserved and used as the Dataproc Metastore service's // endpoint. It is accessible to hosts in the subnet and to all // hosts in a subnet in the same region and same network. There must // be at least one IP address available in the subnet's primary range. The // subnet is specified in the following form: // // `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id} - string subnetwork = 1 [(google.api.resource_reference) = { - type: "compute.googleapis.com/Subnetwork" - }]; + string subnetwork = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Subnetwork" + } + ]; } - // Output only. The URI of the endpoint used to access the metastore service. + // Output only. The URI of the endpoint used to access the metastore + // service. string endpoint_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // Immutable. The consumer-side network configuration for the Dataproc Metastore - // instance. + // Immutable. The consumer-side network configuration for the Dataproc + // Metastore instance. repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE]; } +// Telemetry Configuration for the Dataproc Metastore service. +message TelemetryConfig { + enum LogFormat { + // The LOG_FORMAT is not set. + LOG_FORMAT_UNSPECIFIED = 0; + + // Logging output uses the legacy `textPayload` format. + LEGACY = 1; + + // Logging output uses the `jsonPayload` format. + JSON = 2; + } + + // The output format of the Dataproc Metastore service's logs. + LogFormat log_format = 1; +} + // The metadata management activities of the metastore service. message MetadataManagementActivity { // Output only. The latest metadata exports of the metastore service. - repeated MetadataExport metadata_exports = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated MetadataExport metadata_exports = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The latest restores of the metastore service. repeated Restore restores = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -607,7 +647,8 @@ message MetadataImport { // The name of the source database. string source_database = 3 [deprecated = true]; - // Optional. The type of the database dump. If unspecified, defaults to `MYSQL`. + // Optional. The type of the database dump. If unspecified, defaults to + // `MYSQL`. DatabaseDumpSpec.Type type = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -645,13 +686,16 @@ message MetadataImport { string description = 2; // Output only. The time when the metadata import was started. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the metadata import was last updated. - google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the metadata import finished. - google.protobuf.Timestamp end_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of the metadata import. State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -678,23 +722,27 @@ message MetadataExport { } oneof destination { - // Output only. A Cloud Storage URI of a folder that metadata are exported to, in the - // form of `gs:////`, where + // Output only. A Cloud Storage URI of a folder that metadata are exported + // to, in the form of + // `gs:////`, where // `` is automatically generated. string destination_gcs_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Output only. The time when the export started. - google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the export ended. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of the export. State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The type of the database dump. - DatabaseDumpSpec.Type database_dump_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + DatabaseDumpSpec.Type database_dump_type = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The details of a backup resource. @@ -731,10 +779,12 @@ message Backup { string name = 1 [(google.api.field_behavior) = IMMUTABLE]; // Output only. The time when the backup was started. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the backup finished creating. - google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of the backup. State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -746,7 +796,8 @@ message Backup { string description = 6; // Output only. Services that are restoring from the backup. - repeated string restoring_services = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated string restoring_services = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The details of a metadata restore operation. @@ -782,16 +833,18 @@ message Restore { } // Output only. The time when the restore started. - google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the restore ended. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of the restore. State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The relative resource name of the metastore service backup to restore - // from, in the following form: + // Output only. The relative resource name of the metastore service backup to + // restore from, in the following form: // // `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. string backup = 4 [ @@ -804,37 +857,40 @@ message Restore { // Output only. The type of restore. RestoreType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The restore details containing the revision of the service to be restored - // to, in format of JSON. + // Output only. The restore details containing the revision of the service to + // be restored to, in format of JSON. string details = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Request message for [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]. +// Request message for +// [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]. message ListServicesRequest { - // Required. The relative resource name of the location of metastore services to - // list, in the following form: + // Required. The relative resource name of the location of metastore services + // to list, in the following form: // // `projects/{project_number}/locations/{location_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" + child_type: "metastore.googleapis.com/Service" } ]; - // Optional. The maximum number of services to return. The response may contain less - // than the maximum number. If unspecified, no more than 500 services are - // returned. The maximum value is 1000; values above 1000 are changed to 1000. + // Optional. The maximum number of services to return. The response may + // contain less than the maximum number. If unspecified, no more than 500 + // services are returned. The maximum value is 1000; values above 1000 are + // changed to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] + // Optional. A page token, received from a previous + // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] // call. Provide this token to retrieve the subsequent page. // // To retrieve the first page, supply an empty page token. // // When paginating, other parameters provided to - // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] must match the call that provided the - // page token. + // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] + // must match the call that provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The filter to apply to list results. @@ -846,7 +902,8 @@ message ListServicesRequest { string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]. +// Response message for +// [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]. message ListServicesResponse { // The services in the specified location. repeated Service services = 1; @@ -859,10 +916,11 @@ message ListServicesResponse { repeated string unreachable = 3; } -// Request message for [DataprocMetastore.GetService][google.cloud.metastore.v1alpha.DataprocMetastore.GetService]. +// Request message for +// [DataprocMetastore.GetService][google.cloud.metastore.v1alpha.DataprocMetastore.GetService]. message GetServiceRequest { - // Required. The relative resource name of the metastore service to retrieve, in the - // following form: + // Required. The relative resource name of the metastore service to retrieve, + // in the following form: // // `projects/{project_number}/locations/{location_id}/services/{service_id}`. string name = 1 [ @@ -873,16 +931,17 @@ message GetServiceRequest { ]; } -// Request message for [DataprocMetastore.CreateService][google.cloud.metastore.v1alpha.DataprocMetastore.CreateService]. +// Request message for +// [DataprocMetastore.CreateService][google.cloud.metastore.v1alpha.DataprocMetastore.CreateService]. message CreateServiceRequest { - // Required. The relative resource name of the location in which to create a metastore - // service, in the following form: + // Required. The relative resource name of the location in which to create a + // metastore service, in the following form: // // `projects/{project_number}/locations/{location_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" + child_type: "metastore.googleapis.com/Service" } ]; @@ -899,10 +958,10 @@ message CreateServiceRequest { // the request's `service_id` field. Service service = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -914,13 +973,15 @@ message CreateServiceRequest { string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [DataprocMetastore.UpdateService][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateService]. +// Request message for +// [DataprocMetastore.UpdateService][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateService]. message UpdateServiceRequest { // Required. A field mask used to specify the fields to be overwritten in the // metastore service resource by the update. // Fields specified in the `update_mask` are relative to the resource (not // to the full request). A field is overwritten if it is in the mask. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; // Required. The metastore service to update. The server only merges fields // in the service if they are specified in `update_mask`. @@ -929,10 +990,10 @@ message UpdateServiceRequest { // service to be updated. Service service = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -944,10 +1005,11 @@ message UpdateServiceRequest { string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [DataprocMetastore.DeleteService][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteService]. +// Request message for +// [DataprocMetastore.DeleteService][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteService]. message DeleteServiceRequest { - // Required. The relative resource name of the metastore service to delete, in the - // following form: + // Required. The relative resource name of the metastore service to delete, in + // the following form: // // `projects/{project_number}/locations/{location_id}/services/{service_id}`. string name = 1 [ @@ -957,10 +1019,10 @@ message DeleteServiceRequest { } ]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -972,32 +1034,34 @@ message DeleteServiceRequest { string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports]. +// Request message for +// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports]. message ListMetadataImportsRequest { - // Required. The relative resource name of the service whose metadata imports to - // list, in the following form: + // Required. The relative resource name of the service whose metadata imports + // to list, in the following form: // // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" + child_type: "metastore.googleapis.com/MetadataImport" } ]; - // Optional. The maximum number of imports to return. The response may contain less - // than the maximum number. If unspecified, no more than 500 imports are + // Optional. The maximum number of imports to return. The response may contain + // less than the maximum number. If unspecified, no more than 500 imports are // returned. The maximum value is 1000; values above 1000 are changed to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] + // Optional. A page token, received from a previous + // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] // call. Provide this token to retrieve the subsequent page. // // To retrieve the first page, supply an empty page token. // // When paginating, other parameters provided to - // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] must match the call that provided the - // page token. + // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] + // must match the call that provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The filter to apply to list results. @@ -1009,7 +1073,8 @@ message ListMetadataImportsRequest { string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports]. +// Response message for +// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports]. message ListMetadataImportsResponse { // The imports in the specified service. repeated MetadataImport metadata_imports = 1; @@ -1022,10 +1087,11 @@ message ListMetadataImportsResponse { repeated string unreachable = 3; } -// Request message for [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.GetMetadataImport]. +// Request message for +// [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.GetMetadataImport]. message GetMetadataImportRequest { - // Required. The relative resource name of the metadata import to retrieve, in the - // following form: + // Required. The relative resource name of the metadata import to retrieve, in + // the following form: // // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`. string name = 1 [ @@ -1036,36 +1102,37 @@ message GetMetadataImportRequest { ]; } -// Request message for [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.CreateMetadataImport]. +// Request message for +// [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.CreateMetadataImport]. message CreateMetadataImportRequest { - // Required. The relative resource name of the service in which to create a metastore - // import, in the following form: + // Required. The relative resource name of the service in which to create a + // metastore import, in the following form: // // `projects/{project_number}/locations/{location_id}/services/{service_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" + child_type: "metastore.googleapis.com/MetadataImport" } ]; - // Required. The ID of the metadata import, which is used as the final component of the - // metadata import's name. + // Required. The ID of the metadata import, which is used as the final + // component of the metadata import's name. // // This value must be between 1 and 64 characters long, begin with a letter, // end with a letter or number, and consist of alpha-numeric ASCII characters // or hyphens. string metadata_import_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The metadata import to create. The `name` field is ignored. The ID of the - // created metadata import must be provided in the request's + // Required. The metadata import to create. The `name` field is ignored. The + // ID of the created metadata import must be provided in the request's // `metadata_import_id` field. MetadataImport metadata_import = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -1077,13 +1144,15 @@ message CreateMetadataImportRequest { string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateMetadataImport]. +// Request message for +// [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateMetadataImport]. message UpdateMetadataImportRequest { // Required. A field mask used to specify the fields to be overwritten in the // metadata import resource by the update. // Fields specified in the `update_mask` are relative to the resource (not // to the full request). A field is overwritten if it is in the mask. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; // Required. The metadata import to update. The server only merges fields // in the import if they are specified in `update_mask`. @@ -1092,10 +1161,10 @@ message UpdateMetadataImportRequest { // import to be updated. MetadataImport metadata_import = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -1107,7 +1176,8 @@ message UpdateMetadataImportRequest { string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]. +// Request message for +// [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]. message ListBackupsRequest { // Required. The relative resource name of the service whose backups to // list, in the following form: @@ -1116,23 +1186,24 @@ message ListBackupsRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" + child_type: "metastore.googleapis.com/Backup" } ]; - // Optional. The maximum number of backups to return. The response may contain less - // than the maximum number. If unspecified, no more than 500 backups are + // Optional. The maximum number of backups to return. The response may contain + // less than the maximum number. If unspecified, no more than 500 backups are // returned. The maximum value is 1000; values above 1000 are changed to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A page token, received from a previous [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups] + // Optional. A page token, received from a previous + // [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups] // call. Provide this token to retrieve the subsequent page. // // To retrieve the first page, supply an empty page token. // // When paginating, other parameters provided to - // [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups] must match the call that provided the - // page token. + // [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups] + // must match the call that provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The filter to apply to list results. @@ -1144,7 +1215,8 @@ message ListBackupsRequest { string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]. +// Response message for +// [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]. message ListBackupsResponse { // The backups of the specified service. repeated Backup backups = 1; @@ -1157,7 +1229,8 @@ message ListBackupsResponse { repeated string unreachable = 3; } -// Request message for [DataprocMetastore.GetBackup][google.cloud.metastore.v1alpha.DataprocMetastore.GetBackup]. +// Request message for +// [DataprocMetastore.GetBackup][google.cloud.metastore.v1alpha.DataprocMetastore.GetBackup]. message GetBackupRequest { // Required. The relative resource name of the backup to retrieve, in the // following form: @@ -1171,16 +1244,17 @@ message GetBackupRequest { ]; } -// Request message for [DataprocMetastore.CreateBackup][google.cloud.metastore.v1alpha.DataprocMetastore.CreateBackup]. +// Request message for +// [DataprocMetastore.CreateBackup][google.cloud.metastore.v1alpha.DataprocMetastore.CreateBackup]. message CreateBackupRequest { - // Required. The relative resource name of the service in which to create a backup - // of the following form: + // Required. The relative resource name of the service in which to create a + // backup of the following form: // // `projects/{project_number}/locations/{location_id}/services/{service_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" + child_type: "metastore.googleapis.com/Backup" } ]; @@ -1192,14 +1266,14 @@ message CreateBackupRequest { // or hyphens. string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The backup to create. The `name` field is ignored. The ID of the created - // backup must be provided in the request's `backup_id` field. + // Required. The backup to create. The `name` field is ignored. The ID of the + // created backup must be provided in the request's `backup_id` field. Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -1211,7 +1285,8 @@ message CreateBackupRequest { string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteBackup]. +// Request message for +// [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteBackup]. message DeleteBackupRequest { // Required. The relative resource name of the backup to delete, in the // following form: @@ -1224,10 +1299,10 @@ message DeleteBackupRequest { } ]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -1239,7 +1314,8 @@ message DeleteBackupRequest { string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.ExportMetadata]. +// Request message for +// [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.ExportMetadata]. message ExportMetadataRequest { // Required. Destination that metadata is exported to. oneof destination { @@ -1249,8 +1325,8 @@ message ExportMetadataRequest { string destination_gcs_folder = 2; } - // Required. The relative resource name of the metastore service to run export, in the - // following form: + // Required. The relative resource name of the metastore service to run + // export, in the following form: // // `projects/{project_id}/locations/{location_id}/services/{service_id}`. string service = 1 [ @@ -1260,10 +1336,10 @@ message ExportMetadataRequest { } ]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -1274,14 +1350,16 @@ message ExportMetadataRequest { // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The type of the database dump. If unspecified, defaults to `MYSQL`. - DatabaseDumpSpec.Type database_dump_type = 4 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The type of the database dump. If unspecified, defaults to + // `MYSQL`. + DatabaseDumpSpec.Type database_dump_type = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Request message for [DataprocMetastore.Restore][]. message RestoreServiceRequest { - // Required. The relative resource name of the metastore service to run restore, in the - // following form: + // Required. The relative resource name of the metastore service to run + // restore, in the following form: // // `projects/{project_id}/locations/{location_id}/services/{service_id}`. string service = 1 [ @@ -1291,8 +1369,8 @@ message RestoreServiceRequest { } ]; - // Required. The relative resource name of the metastore service backup to restore - // from, in the following form: + // Required. The relative resource name of the metastore service backup to + // restore from, in the following form: // // `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. string backup = 2 [ @@ -1305,10 +1383,10 @@ message RestoreServiceRequest { // Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`. Restore.RestoreType restore_type = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -1323,10 +1401,12 @@ message RestoreServiceRequest { // Represents the metadata of a long-running operation. message OperationMetadata { // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the operation finished running. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Server-defined resource path for the target of the operation. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -1339,8 +1419,9 @@ message OperationMetadata { // Output only. Identifies whether the caller has requested cancellation // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. API version used to start the operation. @@ -1378,6 +1459,4 @@ message DatabaseDumpSpec { // Database dump contains Avro files. AVRO = 2; } - - } diff --git a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore_federation.proto b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore_federation.proto new file mode 100644 index 00000000000..d4f07335455 --- /dev/null +++ b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore_federation.proto @@ -0,0 +1,364 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.metastore.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/metastore/v1alpha;metastore"; +option java_multiple_files = true; +option java_outer_classname = "MetastoreFederationProto"; +option java_package = "com.google.cloud.metastore.v1alpha"; + +// Configures and manages metastore federation services. +// Dataproc Metastore Federation Service allows federating a collection of +// backend metastores like BigQuery, Dataplex Lakes, and other Dataproc +// Metastores. The Federation Service exposes a gRPC URL through which metadata +// from the backend metastores are served at query time. +// +// The Dataproc Metastore Federation API defines the following resource model: +// * The service works with a collection of Google Cloud projects. +// * Each project has a collection of available locations. +// * Each location has a collection of federations. +// * Dataproc Metastore Federations are resources with names of the +// form: +// `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. +service DataprocMetastoreFederation { + option (google.api.default_host) = "metastore.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists federations in a project and location. + rpc ListFederations(ListFederationsRequest) returns (ListFederationsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/federations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a single federation. + rpc GetFederation(GetFederationRequest) returns (Federation) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/federations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a metastore federation in a project and location. + rpc CreateFederation(CreateFederationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/federations" + body: "federation" + }; + option (google.api.method_signature) = "parent,federation,federation_id"; + option (google.longrunning.operation_info) = { + response_type: "Federation" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Updates the fields of a federation. + rpc UpdateFederation(UpdateFederationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{federation.name=projects/*/locations/*/federations/*}" + body: "federation" + }; + option (google.api.method_signature) = "federation,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Federation" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Deletes a single federation. + rpc DeleteFederation(DeleteFederationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/federations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } +} + +// Represents a federation of multiple backend metastores. +message Federation { + option (google.api.resource) = { + type: "metastore.googleapis.com/Federation" + pattern: "projects/{project}/locations/{location}/federations/{federation}" + }; + + // The current state of the federation. + enum State { + // The state of the metastore federation is unknown. + STATE_UNSPECIFIED = 0; + + // The metastore federation is in the process of being created. + CREATING = 1; + + // The metastore federation is running and ready to serve queries. + ACTIVE = 2; + + // The metastore federation is being updated. It remains usable but cannot + // accept additional update requests or be deleted at this time. + UPDATING = 3; + + // The metastore federation is undergoing deletion. It cannot be used. + DELETING = 4; + + // The metastore federation has encountered an error and cannot be used. The + // metastore federation should be deleted. + ERROR = 5; + } + + // Immutable. The relative resource name of the federation, of the + // form: + // projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time when the metastore federation was created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metastore federation was last updated. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-defined labels for the metastore federation. + map labels = 4; + + // Immutable. The Apache Hive metastore version of the federation. All backend metastore + // versions must be compatible with the federation version. + string version = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // A map from `BackendMetastore` rank to `BackendMetastore`s from which the + // federation service serves metadata at query time. The map key represents + // the order in which `BackendMetastore`s should be evaluated to resolve + // database names at query time and should be greater than or equal to zero. A + // `BackendMetastore` with a lower number will be evaluated before a + // `BackendMetastore` with a higher number. + map backend_metastores = 6; + + // Output only. The federation endpoint. + string endpoint_uri = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the federation. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state of the metastore federation, + // if available. + string state_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The globally unique resource identifier of the metastore federation. + string uid = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents a backend metastore for the federation. +message BackendMetastore { + // The type of the backend metastore. + enum MetastoreType { + // The metastore type is not set. + METASTORE_TYPE_UNSPECIFIED = 0; + + // The backend metastore is BigQuery. + BIGQUERY = 2; + + // The backend metastore is Dataproc Metastore. + DATAPROC_METASTORE = 3; + } + + // The relative resource name of the metastore that is being federated. + // The formats of the relative resource names for the currently supported + // metastores are listed below: + // + // * Dataplex + // * `projects/{project_id}/locations/{location}/lakes/{lake_id}` + // * BigQuery + // * `projects/{project_id}` + // * Dataproc Metastore + // * `projects/{project_id}/locations/{location}/services/{service_id}` + string name = 1; + + // The type of the backend metastore. + MetastoreType metastore_type = 2; +} + +// Request message for ListFederations. +message ListFederationsRequest { + // Required. The relative resource name of the location of metastore federations + // to list, in the following form: + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Federation" + } + ]; + + // Optional. The maximum number of federations to return. The response may contain less + // than the maximum number. If unspecified, no more than 500 services are + // returned. The maximum value is 1000; values above 1000 are changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous ListFederationServices + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // ListFederationServices must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListFederations +message ListFederationsResponse { + // The services in the specified location. + repeated Federation federations = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for GetFederation. +message GetFederationRequest { + // Required. The relative resource name of the metastore federation to retrieve, + // in the following form: + // + // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Federation" + } + ]; +} + +// Request message for CreateFederation. +message CreateFederationRequest { + // Required. The relative resource name of the location in which to create a federation + // service, in the following form: + // + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Federation" + } + ]; + + // Required. The ID of the metastore federation, which is used as the final + // component of the metastore federation's name. + // + // This value must be between 2 and 63 characters long inclusive, begin with a + // letter, end with a letter or number, and consist of alpha-numeric + // ASCII characters or hyphens. + string federation_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Metastore Federation to create. The `name` field is + // ignored. The ID of the created metastore federation must be + // provided in the request's `federation_id` field. + Federation federation = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to ignore the + // request if it has completed. The server will ignore subsequent requests + // that provide a duplicate request ID for at least 60 minutes after the first + // request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for UpdateFederation. +message UpdateFederationRequest { + // Required. A field mask used to specify the fields to be overwritten in the + // metastore federation resource by the update. + // Fields specified in the `update_mask` are relative to the resource (not + // to the full request). A field is overwritten if it is in the mask. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The metastore federation to update. The server only merges fields + // in the service if they are specified in `update_mask`. + // + // The metastore federation's `name` field is used to identify the + // metastore service to be updated. + Federation federation = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to ignore the + // request if it has completed. The server will ignore subsequent requests + // that provide a duplicate request ID for at least 60 minutes after the first + // request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for DeleteFederation. +message DeleteFederationRequest { + // Required. The relative resource name of the metastore federation to delete, + // in the following form: + // + // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Federation" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to ignore the + // request if it has completed. The server will ignore subsequent requests + // that provide a duplicate request ID for at least 60 minutes after the first + // request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore.proto b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore.proto index 350c6bbf3d6..7d763e35b8d 100644 --- a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore.proto +++ b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -27,18 +27,26 @@ import "google/protobuf/wrappers.proto"; import "google/type/dayofweek.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/metastore/v1beta;metastore"; -option php_namespace = "Google\\Cloud\\Metastore\\V1beta"; option java_multiple_files = true; option java_outer_classname = "MetastoreProto"; option java_package = "com.google.cloud.metastore.v1beta"; +option php_namespace = "Google\\Cloud\\Metastore\\V1beta"; option (google.api.resource_definition) = { type: "compute.googleapis.com/Network" pattern: "projects/{project}/global/networks/{network}" }; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Subnetwork" + pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}" +}; +option (google.api.resource_definition) = { + type: "dataplex.googleapis.com/Lake" + pattern: "projects/{project}/locations/{location}/lakes/{lake}" +}; // Configures and manages metastore services. -// Metastore services are fully managed, highly available, auto-scaled, -// auto-healing, OSS-native deployments of technical metadata management +// Metastore services are fully managed, highly available, autoscaled, +// autohealing, OSS-native deployments of technical metadata management // software. Each metastore service exposes a network endpoint through which // metadata queries are served. Metadata queries can originate from a variety // of sources, including Apache Hive, Apache Presto, and Apache Spark. @@ -84,7 +92,7 @@ service DataprocMetastore { option (google.api.method_signature) = "parent,service,service_id"; option (google.longrunning.operation_info) = { response_type: "Service" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" }; } @@ -98,7 +106,7 @@ service DataprocMetastore { option (google.api.method_signature) = "service,update_mask"; option (google.longrunning.operation_info) = { response_type: "Service" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" }; } @@ -111,7 +119,7 @@ service DataprocMetastore { option (google.api.method_signature) = "name"; option (google.longrunning.operation_info) = { response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" }; } @@ -143,7 +151,7 @@ service DataprocMetastore { "parent,metadata_import,metadata_import_id"; option (google.longrunning.operation_info) = { response_type: "MetadataImport" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" }; } @@ -158,7 +166,7 @@ service DataprocMetastore { option (google.api.method_signature) = "metadata_import,update_mask"; option (google.longrunning.operation_info) = { response_type: "MetadataImport" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" }; } @@ -171,7 +179,7 @@ service DataprocMetastore { }; option (google.longrunning.operation_info) = { response_type: "MetadataExport" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" }; } @@ -185,7 +193,7 @@ service DataprocMetastore { option (google.api.method_signature) = "service,backup"; option (google.longrunning.operation_info) = { response_type: "Restore" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" }; } @@ -205,7 +213,7 @@ service DataprocMetastore { option (google.api.method_signature) = "name"; } - // Creates a new Backup in a given project and location. + // Creates a new backup in a given project and location. rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta/{parent=projects/*/locations/*/services/*}/backups" @@ -214,7 +222,7 @@ service DataprocMetastore { option (google.api.method_signature) = "parent,backup,backup_id"; option (google.longrunning.operation_info) = { response_type: "Backup" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" }; } @@ -226,7 +234,7 @@ service DataprocMetastore { option (google.api.method_signature) = "name"; option (google.longrunning.operation_info) = { response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" }; } } @@ -299,6 +307,18 @@ message Service { STABLE = 2; } + // The backend database type for the metastore service. + enum DatabaseType { + // The DATABASE_TYPE is not set. + DATABASE_TYPE_UNSPECIFIED = 0; + + // MySQL is used to persist the metastore data. + MYSQL = 1; + + // Spanner is used to persist the metastore data. + SPANNER = 2; + } + // Configuration properties specific to the underlying metastore service // technology (the software that serves metastore queries). oneof metastore_config { @@ -307,8 +327,8 @@ message Service { HiveMetastoreConfig hive_metastore_config = 5; } - // Immutable. The relative resource name of the metastore service, of the - // form: + // Immutable. The relative resource name of the metastore service, in the + // following format: // // `projects/{project_number}/locations/{location_id}/services/{service_id}`. string name = 1 [(google.api.field_behavior) = IMMUTABLE]; @@ -359,6 +379,8 @@ message Service { // The one hour maintenance window of the metastore service. This specifies // when the service can be restarted for maintenance purposes in UTC time. + // Maintenance window is not needed for services with the SPANNER + // database type. MaintenanceWindow maintenance_window = 15; // Output only. The globally unique resource identifier of the metastore @@ -372,12 +394,31 @@ message Service { // Immutable. The release channel of the service. // If unspecified, defaults to `STABLE`. ReleaseChannel release_channel = 19 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Information used to configure the Dataproc Metastore service to + // encrypt customer data at rest. Cannot be updated. + EncryptionConfig encryption_config = 20 + [(google.api.field_behavior) = IMMUTABLE]; + + // The configuration specifying the network settings for the + // Dataproc Metastore service. + NetworkConfig network_config = 21; + + // Immutable. The database type that the Metastore service stores its data. + DatabaseType database_type = 22 [(google.api.field_behavior) = IMMUTABLE]; + + // The configuration specifying telemetry settings for the Dataproc Metastore + // service. If unspecified defaults to `JSON`. + TelemetryConfig telemetry_config = 23; } // Specifies how metastore metadata should be integrated with external services. message MetadataIntegration { // The integration config for the Data Catalog service. DataCatalogConfig data_catalog_config = 1; + + // The integration config for the Dataplex service. + DataplexConfig dataplex_config = 2; } // Specifies how metastore metadata should be integrated with the Data Catalog @@ -388,6 +429,25 @@ message DataCatalogConfig { bool enabled = 2; } +// Specifies how metastore metadata should be integrated with the Dataplex +// service. +message DataplexConfig { + // A reference to the Lake resources that this metastore service is attached + // to. The key is the lake resource name. Example: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + map lake_resources = 1; +} + +// Represents a Lake resource +message Lake { + // The Lake resource name. + // Example: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + string name = 1 [ + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; +} + // Maintenance window. This specifies when Dataproc Metastore // may perform system maintenance operation to the service. message MaintenanceWindow { @@ -401,12 +461,26 @@ message MaintenanceWindow { // Specifies configuration information specific to running Hive metastore // software as the metastore service. message HiveMetastoreConfig { + // Protocols available for serving the metastore service endpoint. + enum EndpointProtocol { + // The protocol is not set. + ENDPOINT_PROTOCOL_UNSPECIFIED = 0; + + // Use the legacy Apache Thrift protocol for the metastore service endpoint. + THRIFT = 1; + + // Use the modernized gRPC protocol for the metastore service endpoint. + GRPC = 2; + } + // Immutable. The Hive metastore schema version. string version = 1 [(google.api.field_behavior) = IMMUTABLE]; // A mapping of Hive metastore configuration key-value pairs to apply to the // Hive metastore (configured in `hive-site.xml`). The mappings - // override system defaults (some keys cannot be overridden). + // override system defaults (some keys cannot be overridden). These + // overrides are also applied to auxiliary versions and can be further + // customized in the auxiliary version's `AuxiliaryVersionConfig`. map config_overrides = 2; // Information used to configure the Hive metastore service as a service @@ -415,6 +489,20 @@ message HiveMetastoreConfig { // (`hive_metastore_config.kerberos_config`) in the request's `update_mask` // while omitting this field from the request's `service`. KerberosConfig kerberos_config = 3; + + // The protocol to use for the metastore service endpoint. If unspecified, + // defaults to `THRIFT`. + EndpointProtocol endpoint_protocol = 4; + + // A mapping of Hive metastore version to the auxiliary version + // configuration. When specified, a secondary Hive metastore service is + // created along with the primary service. All auxiliary versions must be less + // than the service's primary version. The key is the auxiliary service name + // and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This + // means that the first character must be a lowercase letter, and all the + // following characters must be hyphens, lowercase letters, or digits, except + // the last character, which cannot be a hyphen. + map auxiliary_versions = 5; } // Configuration information for a Kerberos principal. @@ -429,7 +517,7 @@ message KerberosConfig { string principal = 2; // A Cloud Storage URI that specifies the path to a - // krb5.conf file. It is of the form gs://{bucket_name}/path/to/krb5.conf, + // krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`, // although the file does not need to be named krb5.conf explicitly. string krb5_config_gcs_uri = 3; } @@ -445,6 +533,81 @@ message Secret { } } +// Encryption settings for the service. +message EncryptionConfig { + // The fully qualified customer provided Cloud KMS key name to use for + // customer data encryption, in the following form: + // + // `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`. + string kms_key = 1; +} + +// Configuration information for the auxiliary service versions. +message AuxiliaryVersionConfig { + // The Hive metastore version of the auxiliary service. It must be less + // than the primary Hive metastore service's version. + string version = 1; + + // A mapping of Hive metastore configuration key-value pairs to apply to the + // auxiliary Hive metastore (configured in `hive-site.xml`) in addition to + // the primary version's overrides. If keys are present in both the auxiliary + // version's overrides and the primary version's overrides, the value from + // the auxiliary version's overrides takes precedence. + map config_overrides = 2; + + // Output only. The network configuration contains the endpoint URI(s) of the + // auxiliary Hive metastore service. + NetworkConfig network_config = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Network configuration for the Dataproc Metastore service. +message NetworkConfig { + // Contains information of the customer's network configurations. + message Consumer { + oneof vpc_resource { + // Immutable. The subnetwork of the customer project from which an IP + // address is reserved and used as the Dataproc Metastore service's + // endpoint. It is accessible to hosts in the subnet and to all + // hosts in a subnet in the same region and same network. There must + // be at least one IP address available in the subnet's primary range. The + // subnet is specified in the following form: + // + // `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id} + string subnetwork = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Subnetwork" + } + ]; + } + + // Output only. The URI of the endpoint used to access the metastore + // service. + string endpoint_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Immutable. The consumer-side network configuration for the Dataproc + // Metastore instance. + repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE]; +} + +// Telemetry Configuration for the Dataproc Metastore service. +message TelemetryConfig { + enum LogFormat { + // The LOG_FORMAT is not set. + LOG_FORMAT_UNSPECIFIED = 0; + + // Logging output uses the legacy `textPayload` format. + LEGACY = 1; + + // Logging output uses the `jsonPayload` format. + JSON = 2; + } + + // The output format of the Dataproc Metastore service's logs. + LogFormat log_format = 1; +} + // The metadata management activities of the metastore service. message MetadataManagementActivity { // Output only. The latest metadata exports of the metastore service. @@ -522,7 +685,7 @@ message MetadataImport { // The description of the metadata import. string description = 2; - // Output only. The time when the metadata import was created. + // Output only. The time when the metadata import was started. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -530,6 +693,10 @@ message MetadataImport { google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The time when the metadata import finished. + google.protobuf.Timestamp end_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The current state of the metadata import. State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -601,6 +768,9 @@ message Backup { // The backup failed. FAILED = 4; + + // The backup is being restored. + RESTORING = 5; } // Immutable. The relative resource name of the backup, in the following form: @@ -624,6 +794,10 @@ message Backup { // The description of the backup. string description = 6; + + // Output only. Services that are restoring from the backup. + repeated string restoring_services = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The details of a metadata restore operation. @@ -646,7 +820,7 @@ message Restore { CANCELLED = 4; } - // The type of restore. + // The type of restore. If unspecified, defaults to `METADATA_ONLY`. enum RestoreType { // The restore type is unknown. RESTORE_TYPE_UNSPECIFIED = 0; @@ -672,7 +846,7 @@ message Restore { // Output only. The relative resource name of the metastore service backup to // restore from, in the following form: // - // `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}` + // `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. string backup = 4 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -698,7 +872,7 @@ message ListServicesRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" + child_type: "metastore.googleapis.com/Service" } ]; @@ -767,7 +941,7 @@ message CreateServiceRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" + child_type: "metastore.googleapis.com/Service" } ]; @@ -870,7 +1044,7 @@ message ListMetadataImportsRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" + child_type: "metastore.googleapis.com/MetadataImport" } ]; @@ -934,11 +1108,11 @@ message CreateMetadataImportRequest { // Required. The relative resource name of the service in which to create a // metastore import, in the following form: // - // `projects/{project_number}/locations/{location_id}/services/{service_id}` + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" + child_type: "metastore.googleapis.com/MetadataImport" } ]; @@ -1012,7 +1186,7 @@ message ListBackupsRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" + child_type: "metastore.googleapis.com/Backup" } ]; @@ -1076,11 +1250,11 @@ message CreateBackupRequest { // Required. The relative resource name of the service in which to create a // backup of the following form: // - // `projects/{project_number}/locations/{location_id}/services/{service_id}` + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" + child_type: "metastore.googleapis.com/Backup" } ]; @@ -1154,7 +1328,7 @@ message ExportMetadataRequest { // Required. The relative resource name of the metastore service to run // export, in the following form: // - // `projects/{project_id}/locations/{location_id}/services/{service_id}` + // `projects/{project_id}/locations/{location_id}/services/{service_id}`. string service = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1187,7 +1361,7 @@ message RestoreServiceRequest { // Required. The relative resource name of the metastore service to run // restore, in the following form: // - // `projects/{project_id}/locations/{location_id}/services/{service_id}` + // `projects/{project_id}/locations/{location_id}/services/{service_id}`. string service = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1198,7 +1372,7 @@ message RestoreServiceRequest { // Required. The relative resource name of the metastore service backup to // restore from, in the following form: // - // `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}` + // `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. string backup = 2 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1281,5 +1455,8 @@ message DatabaseDumpSpec { // Database dump is a MySQL dump file. MYSQL = 1; + + // Database dump contains Avro files. + AVRO = 2; } } diff --git a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore_federation.proto b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore_federation.proto new file mode 100644 index 00000000000..c0798f7bada --- /dev/null +++ b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore_federation.proto @@ -0,0 +1,364 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.metastore.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/metastore/v1beta;metastore"; +option java_multiple_files = true; +option java_outer_classname = "MetastoreFederationProto"; +option java_package = "com.google.cloud.metastore.v1beta"; + +// Configures and manages metastore federation services. +// Dataproc Metastore Federation Service allows federating a collection of +// backend metastores like BigQuery, Dataplex Lakes, and other Dataproc +// Metastores. The Federation Service exposes a gRPC URL through which metadata +// from the backend metastores are served at query time. +// +// The Dataproc Metastore Federation API defines the following resource model: +// * The service works with a collection of Google Cloud projects. +// * Each project has a collection of available locations. +// * Each location has a collection of federations. +// * Dataproc Metastore Federations are resources with names of the +// form: +// `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. +service DataprocMetastoreFederation { + option (google.api.default_host) = "metastore.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists federations in a project and location. + rpc ListFederations(ListFederationsRequest) returns (ListFederationsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/federations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a single federation. + rpc GetFederation(GetFederationRequest) returns (Federation) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/federations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a metastore federation in a project and location. + rpc CreateFederation(CreateFederationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/federations" + body: "federation" + }; + option (google.api.method_signature) = "parent,federation,federation_id"; + option (google.longrunning.operation_info) = { + response_type: "Federation" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Updates the fields of a federation. + rpc UpdateFederation(UpdateFederationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{federation.name=projects/*/locations/*/federations/*}" + body: "federation" + }; + option (google.api.method_signature) = "federation,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Federation" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Deletes a single federation. + rpc DeleteFederation(DeleteFederationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/federations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } +} + +// Represents a federation of multiple backend metastores. +message Federation { + option (google.api.resource) = { + type: "metastore.googleapis.com/Federation" + pattern: "projects/{project}/locations/{location}/federations/{federation}" + }; + + // The current state of the federation. + enum State { + // The state of the metastore federation is unknown. + STATE_UNSPECIFIED = 0; + + // The metastore federation is in the process of being created. + CREATING = 1; + + // The metastore federation is running and ready to serve queries. + ACTIVE = 2; + + // The metastore federation is being updated. It remains usable but cannot + // accept additional update requests or be deleted at this time. + UPDATING = 3; + + // The metastore federation is undergoing deletion. It cannot be used. + DELETING = 4; + + // The metastore federation has encountered an error and cannot be used. The + // metastore federation should be deleted. + ERROR = 5; + } + + // Immutable. The relative resource name of the federation, of the + // form: + // projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time when the metastore federation was created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metastore federation was last updated. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-defined labels for the metastore federation. + map labels = 4; + + // Immutable. The Apache Hive metastore version of the federation. All backend metastore + // versions must be compatible with the federation version. + string version = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // A map from `BackendMetastore` rank to `BackendMetastore`s from which the + // federation service serves metadata at query time. The map key represents + // the order in which `BackendMetastore`s should be evaluated to resolve + // database names at query time and should be greater than or equal to zero. A + // `BackendMetastore` with a lower number will be evaluated before a + // `BackendMetastore` with a higher number. + map backend_metastores = 6; + + // Output only. The federation endpoint. + string endpoint_uri = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the federation. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state of the metastore federation, + // if available. + string state_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The globally unique resource identifier of the metastore federation. + string uid = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents a backend metastore for the federation. +message BackendMetastore { + // The type of the backend metastore. + enum MetastoreType { + // The metastore type is not set. + METASTORE_TYPE_UNSPECIFIED = 0; + + // The backend metastore is BigQuery. + BIGQUERY = 2; + + // The backend metastore is Dataproc Metastore. + DATAPROC_METASTORE = 3; + } + + // The relative resource name of the metastore that is being federated. + // The formats of the relative resource names for the currently supported + // metastores are listed below: + // + // * Dataplex + // * `projects/{project_id}/locations/{location}/lakes/{lake_id}` + // * BigQuery + // * `projects/{project_id}` + // * Dataproc Metastore + // * `projects/{project_id}/locations/{location}/services/{service_id}` + string name = 1; + + // The type of the backend metastore. + MetastoreType metastore_type = 2; +} + +// Request message for ListFederations. +message ListFederationsRequest { + // Required. The relative resource name of the location of metastore federations + // to list, in the following form: + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Federation" + } + ]; + + // Optional. The maximum number of federations to return. The response may contain less + // than the maximum number. If unspecified, no more than 500 services are + // returned. The maximum value is 1000; values above 1000 are changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous ListFederationServices + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // ListFederationServices must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListFederations +message ListFederationsResponse { + // The services in the specified location. + repeated Federation federations = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for GetFederation. +message GetFederationRequest { + // Required. The relative resource name of the metastore federation to retrieve, + // in the following form: + // + // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Federation" + } + ]; +} + +// Request message for CreateFederation. +message CreateFederationRequest { + // Required. The relative resource name of the location in which to create a federation + // service, in the following form: + // + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Federation" + } + ]; + + // Required. The ID of the metastore federation, which is used as the final + // component of the metastore federation's name. + // + // This value must be between 2 and 63 characters long inclusive, begin with a + // letter, end with a letter or number, and consist of alpha-numeric + // ASCII characters or hyphens. + string federation_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Metastore Federation to create. The `name` field is + // ignored. The ID of the created metastore federation must be + // provided in the request's `federation_id` field. + Federation federation = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to ignore the + // request if it has completed. The server will ignore subsequent requests + // that provide a duplicate request ID for at least 60 minutes after the first + // request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for UpdateFederation. +message UpdateFederationRequest { + // Required. A field mask used to specify the fields to be overwritten in the + // metastore federation resource by the update. + // Fields specified in the `update_mask` are relative to the resource (not + // to the full request). A field is overwritten if it is in the mask. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The metastore federation to update. The server only merges fields + // in the service if they are specified in `update_mask`. + // + // The metastore federation's `name` field is used to identify the + // metastore service to be updated. + Federation federation = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to ignore the + // request if it has completed. The server will ignore subsequent requests + // that provide a duplicate request ID for at least 60 minutes after the first + // request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for DeleteFederation. +message DeleteFederationRequest { + // Required. The relative resource name of the metastore federation to delete, + // in the following form: + // + // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Federation" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to ignore the + // request if it has completed. The server will ignore subsequent requests + // that provide a duplicate request ID for at least 60 minutes after the first + // request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-metastore/protos/protos.d.ts b/packages/google-cloud-metastore/protos/protos.d.ts index 06364f1ba28..5a8c00fa36a 100644 --- a/packages/google-cloud-metastore/protos/protos.d.ts +++ b/packages/google-cloud-metastore/protos/protos.d.ts @@ -415,6 +415,18 @@ export namespace google { /** Service releaseChannel */ releaseChannel?: (google.cloud.metastore.v1.Service.ReleaseChannel|keyof typeof google.cloud.metastore.v1.Service.ReleaseChannel|null); + + /** Service encryptionConfig */ + encryptionConfig?: (google.cloud.metastore.v1.IEncryptionConfig|null); + + /** Service networkConfig */ + networkConfig?: (google.cloud.metastore.v1.INetworkConfig|null); + + /** Service databaseType */ + databaseType?: (google.cloud.metastore.v1.Service.DatabaseType|keyof typeof google.cloud.metastore.v1.Service.DatabaseType|null); + + /** Service telemetryConfig */ + telemetryConfig?: (google.cloud.metastore.v1.ITelemetryConfig|null); } /** Represents a Service. */ @@ -474,6 +486,18 @@ export namespace google { /** Service releaseChannel. */ public releaseChannel: (google.cloud.metastore.v1.Service.ReleaseChannel|keyof typeof google.cloud.metastore.v1.Service.ReleaseChannel); + /** Service encryptionConfig. */ + public encryptionConfig?: (google.cloud.metastore.v1.IEncryptionConfig|null); + + /** Service networkConfig. */ + public networkConfig?: (google.cloud.metastore.v1.INetworkConfig|null); + + /** Service databaseType. */ + public databaseType: (google.cloud.metastore.v1.Service.DatabaseType|keyof typeof google.cloud.metastore.v1.Service.DatabaseType); + + /** Service telemetryConfig. */ + public telemetryConfig?: (google.cloud.metastore.v1.ITelemetryConfig|null); + /** Service metastoreConfig. */ public metastoreConfig?: "hiveMetastoreConfig"; @@ -582,6 +606,13 @@ export namespace google { CANARY = 1, STABLE = 2 } + + /** DatabaseType enum. */ + enum DatabaseType { + DATABASE_TYPE_UNSPECIFIED = 0, + MYSQL = 1, + SPANNER = 2 + } } /** Properties of a MaintenanceWindow. */ @@ -1005,12679 +1036,17167 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MetadataManagementActivity. */ - interface IMetadataManagementActivity { - - /** MetadataManagementActivity metadataExports */ - metadataExports?: (google.cloud.metastore.v1.IMetadataExport[]|null); + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { - /** MetadataManagementActivity restores */ - restores?: (google.cloud.metastore.v1.IRestore[]|null); + /** EncryptionConfig kmsKey */ + kmsKey?: (string|null); } - /** Represents a MetadataManagementActivity. */ - class MetadataManagementActivity implements IMetadataManagementActivity { + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { /** - * Constructs a new MetadataManagementActivity. + * Constructs a new EncryptionConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IMetadataManagementActivity); - - /** MetadataManagementActivity metadataExports. */ - public metadataExports: google.cloud.metastore.v1.IMetadataExport[]; + constructor(properties?: google.cloud.metastore.v1.IEncryptionConfig); - /** MetadataManagementActivity restores. */ - public restores: google.cloud.metastore.v1.IRestore[]; + /** EncryptionConfig kmsKey. */ + public kmsKey: string; /** - * Creates a new MetadataManagementActivity instance using the specified properties. + * Creates a new EncryptionConfig instance using the specified properties. * @param [properties] Properties to set - * @returns MetadataManagementActivity instance + * @returns EncryptionConfig instance */ - public static create(properties?: google.cloud.metastore.v1.IMetadataManagementActivity): google.cloud.metastore.v1.MetadataManagementActivity; + public static create(properties?: google.cloud.metastore.v1.IEncryptionConfig): google.cloud.metastore.v1.EncryptionConfig; /** - * Encodes the specified MetadataManagementActivity message. Does not implicitly {@link google.cloud.metastore.v1.MetadataManagementActivity.verify|verify} messages. - * @param message MetadataManagementActivity message or plain object to encode + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.metastore.v1.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IMetadataManagementActivity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetadataManagementActivity message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataManagementActivity.verify|verify} messages. - * @param message MetadataManagementActivity message or plain object to encode + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IMetadataManagementActivity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetadataManagementActivity message from the specified reader or buffer. + * Decodes an EncryptionConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetadataManagementActivity + * @returns EncryptionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.MetadataManagementActivity; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.EncryptionConfig; /** - * Decodes a MetadataManagementActivity message from the specified reader or buffer, length delimited. + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetadataManagementActivity + * @returns EncryptionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.MetadataManagementActivity; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.EncryptionConfig; /** - * Verifies a MetadataManagementActivity message. + * Verifies an EncryptionConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetadataManagementActivity message from a plain object. Also converts values to their respective internal types. + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetadataManagementActivity + * @returns EncryptionConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.MetadataManagementActivity; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.EncryptionConfig; /** - * Creates a plain object from a MetadataManagementActivity message. Also converts values to other types if specified. - * @param message MetadataManagementActivity + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @param message EncryptionConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.MetadataManagementActivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetadataManagementActivity to JSON. + * Converts this EncryptionConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MetadataManagementActivity + * Gets the default type url for EncryptionConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MetadataImport. */ - interface IMetadataImport { - - /** MetadataImport databaseDump */ - databaseDump?: (google.cloud.metastore.v1.MetadataImport.IDatabaseDump|null); - - /** MetadataImport name */ - name?: (string|null); - - /** MetadataImport description */ - description?: (string|null); - - /** MetadataImport createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** MetadataImport updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** MetadataImport endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** Properties of a NetworkConfig. */ + interface INetworkConfig { - /** MetadataImport state */ - state?: (google.cloud.metastore.v1.MetadataImport.State|keyof typeof google.cloud.metastore.v1.MetadataImport.State|null); + /** NetworkConfig consumers */ + consumers?: (google.cloud.metastore.v1.NetworkConfig.IConsumer[]|null); } - /** Represents a MetadataImport. */ - class MetadataImport implements IMetadataImport { + /** Represents a NetworkConfig. */ + class NetworkConfig implements INetworkConfig { /** - * Constructs a new MetadataImport. + * Constructs a new NetworkConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IMetadataImport); - - /** MetadataImport databaseDump. */ - public databaseDump?: (google.cloud.metastore.v1.MetadataImport.IDatabaseDump|null); - - /** MetadataImport name. */ - public name: string; - - /** MetadataImport description. */ - public description: string; - - /** MetadataImport createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** MetadataImport updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** MetadataImport endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** MetadataImport state. */ - public state: (google.cloud.metastore.v1.MetadataImport.State|keyof typeof google.cloud.metastore.v1.MetadataImport.State); + constructor(properties?: google.cloud.metastore.v1.INetworkConfig); - /** MetadataImport metadata. */ - public metadata?: "databaseDump"; + /** NetworkConfig consumers. */ + public consumers: google.cloud.metastore.v1.NetworkConfig.IConsumer[]; /** - * Creates a new MetadataImport instance using the specified properties. + * Creates a new NetworkConfig instance using the specified properties. * @param [properties] Properties to set - * @returns MetadataImport instance + * @returns NetworkConfig instance */ - public static create(properties?: google.cloud.metastore.v1.IMetadataImport): google.cloud.metastore.v1.MetadataImport; + public static create(properties?: google.cloud.metastore.v1.INetworkConfig): google.cloud.metastore.v1.NetworkConfig; /** - * Encodes the specified MetadataImport message. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.verify|verify} messages. - * @param message MetadataImport message or plain object to encode + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.metastore.v1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IMetadataImport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetadataImport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.verify|verify} messages. - * @param message MetadataImport message or plain object to encode + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IMetadataImport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetadataImport message from the specified reader or buffer. + * Decodes a NetworkConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetadataImport + * @returns NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.MetadataImport; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.NetworkConfig; /** - * Decodes a MetadataImport message from the specified reader or buffer, length delimited. + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetadataImport + * @returns NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.MetadataImport; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.NetworkConfig; /** - * Verifies a MetadataImport message. + * Verifies a NetworkConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetadataImport message from a plain object. Also converts values to their respective internal types. + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetadataImport + * @returns NetworkConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.MetadataImport; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.NetworkConfig; /** - * Creates a plain object from a MetadataImport message. Also converts values to other types if specified. - * @param message MetadataImport + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @param message NetworkConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.MetadataImport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetadataImport to JSON. + * Converts this NetworkConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MetadataImport + * Gets the default type url for NetworkConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace MetadataImport { - - /** Properties of a DatabaseDump. */ - interface IDatabaseDump { + namespace NetworkConfig { - /** DatabaseDump databaseType */ - databaseType?: (google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType|keyof typeof google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType|null); + /** Properties of a Consumer. */ + interface IConsumer { - /** DatabaseDump gcsUri */ - gcsUri?: (string|null); + /** Consumer subnetwork */ + subnetwork?: (string|null); - /** DatabaseDump type */ - type?: (google.cloud.metastore.v1.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1.DatabaseDumpSpec.Type|null); + /** Consumer endpointUri */ + endpointUri?: (string|null); } - /** Represents a DatabaseDump. */ - class DatabaseDump implements IDatabaseDump { + /** Represents a Consumer. */ + class Consumer implements IConsumer { /** - * Constructs a new DatabaseDump. + * Constructs a new Consumer. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.MetadataImport.IDatabaseDump); + constructor(properties?: google.cloud.metastore.v1.NetworkConfig.IConsumer); - /** DatabaseDump databaseType. */ - public databaseType: (google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType|keyof typeof google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType); + /** Consumer subnetwork. */ + public subnetwork?: (string|null); - /** DatabaseDump gcsUri. */ - public gcsUri: string; + /** Consumer endpointUri. */ + public endpointUri: string; - /** DatabaseDump type. */ - public type: (google.cloud.metastore.v1.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1.DatabaseDumpSpec.Type); + /** Consumer vpcResource. */ + public vpcResource?: "subnetwork"; /** - * Creates a new DatabaseDump instance using the specified properties. + * Creates a new Consumer instance using the specified properties. * @param [properties] Properties to set - * @returns DatabaseDump instance + * @returns Consumer instance */ - public static create(properties?: google.cloud.metastore.v1.MetadataImport.IDatabaseDump): google.cloud.metastore.v1.MetadataImport.DatabaseDump; + public static create(properties?: google.cloud.metastore.v1.NetworkConfig.IConsumer): google.cloud.metastore.v1.NetworkConfig.Consumer; /** - * Encodes the specified DatabaseDump message. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.DatabaseDump.verify|verify} messages. - * @param message DatabaseDump message or plain object to encode + * Encodes the specified Consumer message. Does not implicitly {@link google.cloud.metastore.v1.NetworkConfig.Consumer.verify|verify} messages. + * @param message Consumer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.MetadataImport.IDatabaseDump, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.NetworkConfig.IConsumer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DatabaseDump message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.DatabaseDump.verify|verify} messages. - * @param message DatabaseDump message or plain object to encode + * Encodes the specified Consumer message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.NetworkConfig.Consumer.verify|verify} messages. + * @param message Consumer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.MetadataImport.IDatabaseDump, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.NetworkConfig.IConsumer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DatabaseDump message from the specified reader or buffer. + * Decodes a Consumer message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DatabaseDump + * @returns Consumer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.MetadataImport.DatabaseDump; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.NetworkConfig.Consumer; /** - * Decodes a DatabaseDump message from the specified reader or buffer, length delimited. + * Decodes a Consumer message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DatabaseDump + * @returns Consumer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.MetadataImport.DatabaseDump; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.NetworkConfig.Consumer; /** - * Verifies a DatabaseDump message. + * Verifies a Consumer message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DatabaseDump message from a plain object. Also converts values to their respective internal types. + * Creates a Consumer message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DatabaseDump + * @returns Consumer */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.MetadataImport.DatabaseDump; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.NetworkConfig.Consumer; /** - * Creates a plain object from a DatabaseDump message. Also converts values to other types if specified. - * @param message DatabaseDump + * Creates a plain object from a Consumer message. Also converts values to other types if specified. + * @param message Consumer * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.MetadataImport.DatabaseDump, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.NetworkConfig.Consumer, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DatabaseDump to JSON. + * Converts this Consumer to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DatabaseDump + * Gets the default type url for Consumer * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - namespace DatabaseDump { - - /** DatabaseType enum. */ - enum DatabaseType { - DATABASE_TYPE_UNSPECIFIED = 0, - MYSQL = 1 - } - } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - SUCCEEDED = 2, - UPDATING = 3, - FAILED = 4 - } - } - - /** Properties of a MetadataExport. */ - interface IMetadataExport { - - /** MetadataExport destinationGcsUri */ - destinationGcsUri?: (string|null); - - /** MetadataExport startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** MetadataExport endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** MetadataExport state */ - state?: (google.cloud.metastore.v1.MetadataExport.State|keyof typeof google.cloud.metastore.v1.MetadataExport.State|null); + /** Properties of a TelemetryConfig. */ + interface ITelemetryConfig { - /** MetadataExport databaseDumpType */ - databaseDumpType?: (google.cloud.metastore.v1.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1.DatabaseDumpSpec.Type|null); + /** TelemetryConfig logFormat */ + logFormat?: (google.cloud.metastore.v1.TelemetryConfig.LogFormat|keyof typeof google.cloud.metastore.v1.TelemetryConfig.LogFormat|null); } - /** Represents a MetadataExport. */ - class MetadataExport implements IMetadataExport { + /** Represents a TelemetryConfig. */ + class TelemetryConfig implements ITelemetryConfig { /** - * Constructs a new MetadataExport. + * Constructs a new TelemetryConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IMetadataExport); - - /** MetadataExport destinationGcsUri. */ - public destinationGcsUri?: (string|null); - - /** MetadataExport startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** MetadataExport endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.metastore.v1.ITelemetryConfig); - /** MetadataExport state. */ - public state: (google.cloud.metastore.v1.MetadataExport.State|keyof typeof google.cloud.metastore.v1.MetadataExport.State); - - /** MetadataExport databaseDumpType. */ - public databaseDumpType: (google.cloud.metastore.v1.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1.DatabaseDumpSpec.Type); - - /** MetadataExport destination. */ - public destination?: "destinationGcsUri"; + /** TelemetryConfig logFormat. */ + public logFormat: (google.cloud.metastore.v1.TelemetryConfig.LogFormat|keyof typeof google.cloud.metastore.v1.TelemetryConfig.LogFormat); /** - * Creates a new MetadataExport instance using the specified properties. + * Creates a new TelemetryConfig instance using the specified properties. * @param [properties] Properties to set - * @returns MetadataExport instance + * @returns TelemetryConfig instance */ - public static create(properties?: google.cloud.metastore.v1.IMetadataExport): google.cloud.metastore.v1.MetadataExport; + public static create(properties?: google.cloud.metastore.v1.ITelemetryConfig): google.cloud.metastore.v1.TelemetryConfig; /** - * Encodes the specified MetadataExport message. Does not implicitly {@link google.cloud.metastore.v1.MetadataExport.verify|verify} messages. - * @param message MetadataExport message or plain object to encode + * Encodes the specified TelemetryConfig message. Does not implicitly {@link google.cloud.metastore.v1.TelemetryConfig.verify|verify} messages. + * @param message TelemetryConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IMetadataExport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.ITelemetryConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetadataExport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataExport.verify|verify} messages. - * @param message MetadataExport message or plain object to encode + * Encodes the specified TelemetryConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.TelemetryConfig.verify|verify} messages. + * @param message TelemetryConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IMetadataExport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.ITelemetryConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetadataExport message from the specified reader or buffer. + * Decodes a TelemetryConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetadataExport + * @returns TelemetryConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.MetadataExport; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.TelemetryConfig; /** - * Decodes a MetadataExport message from the specified reader or buffer, length delimited. + * Decodes a TelemetryConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetadataExport + * @returns TelemetryConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.MetadataExport; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.TelemetryConfig; /** - * Verifies a MetadataExport message. + * Verifies a TelemetryConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetadataExport message from a plain object. Also converts values to their respective internal types. + * Creates a TelemetryConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetadataExport + * @returns TelemetryConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.MetadataExport; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.TelemetryConfig; /** - * Creates a plain object from a MetadataExport message. Also converts values to other types if specified. - * @param message MetadataExport + * Creates a plain object from a TelemetryConfig message. Also converts values to other types if specified. + * @param message TelemetryConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.MetadataExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.TelemetryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetadataExport to JSON. + * Converts this TelemetryConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MetadataExport + * Gets the default type url for TelemetryConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace MetadataExport { + namespace TelemetryConfig { - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - SUCCEEDED = 2, - FAILED = 3, - CANCELLED = 4 + /** LogFormat enum. */ + enum LogFormat { + LOG_FORMAT_UNSPECIFIED = 0, + LEGACY = 1, + JSON = 2 } } - /** Properties of a Backup. */ - interface IBackup { - - /** Backup name */ - name?: (string|null); - - /** Backup createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Backup endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** Backup state */ - state?: (google.cloud.metastore.v1.Backup.State|keyof typeof google.cloud.metastore.v1.Backup.State|null); - - /** Backup serviceRevision */ - serviceRevision?: (google.cloud.metastore.v1.IService|null); + /** Properties of a MetadataManagementActivity. */ + interface IMetadataManagementActivity { - /** Backup description */ - description?: (string|null); + /** MetadataManagementActivity metadataExports */ + metadataExports?: (google.cloud.metastore.v1.IMetadataExport[]|null); - /** Backup restoringServices */ - restoringServices?: (string[]|null); + /** MetadataManagementActivity restores */ + restores?: (google.cloud.metastore.v1.IRestore[]|null); } - /** Represents a Backup. */ - class Backup implements IBackup { + /** Represents a MetadataManagementActivity. */ + class MetadataManagementActivity implements IMetadataManagementActivity { /** - * Constructs a new Backup. + * Constructs a new MetadataManagementActivity. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IBackup); - - /** Backup name. */ - public name: string; - - /** Backup createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Backup endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** Backup state. */ - public state: (google.cloud.metastore.v1.Backup.State|keyof typeof google.cloud.metastore.v1.Backup.State); - - /** Backup serviceRevision. */ - public serviceRevision?: (google.cloud.metastore.v1.IService|null); + constructor(properties?: google.cloud.metastore.v1.IMetadataManagementActivity); - /** Backup description. */ - public description: string; + /** MetadataManagementActivity metadataExports. */ + public metadataExports: google.cloud.metastore.v1.IMetadataExport[]; - /** Backup restoringServices. */ - public restoringServices: string[]; + /** MetadataManagementActivity restores. */ + public restores: google.cloud.metastore.v1.IRestore[]; /** - * Creates a new Backup instance using the specified properties. + * Creates a new MetadataManagementActivity instance using the specified properties. * @param [properties] Properties to set - * @returns Backup instance + * @returns MetadataManagementActivity instance */ - public static create(properties?: google.cloud.metastore.v1.IBackup): google.cloud.metastore.v1.Backup; + public static create(properties?: google.cloud.metastore.v1.IMetadataManagementActivity): google.cloud.metastore.v1.MetadataManagementActivity; /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.metastore.v1.Backup.verify|verify} messages. - * @param message Backup message or plain object to encode + * Encodes the specified MetadataManagementActivity message. Does not implicitly {@link google.cloud.metastore.v1.MetadataManagementActivity.verify|verify} messages. + * @param message MetadataManagementActivity message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IMetadataManagementActivity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.Backup.verify|verify} messages. - * @param message Backup message or plain object to encode + * Encodes the specified MetadataManagementActivity message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataManagementActivity.verify|verify} messages. + * @param message MetadataManagementActivity message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IMetadataManagementActivity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Backup message from the specified reader or buffer. + * Decodes a MetadataManagementActivity message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Backup + * @returns MetadataManagementActivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.Backup; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.MetadataManagementActivity; /** - * Decodes a Backup message from the specified reader or buffer, length delimited. + * Decodes a MetadataManagementActivity message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Backup + * @returns MetadataManagementActivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.Backup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.MetadataManagementActivity; /** - * Verifies a Backup message. + * Verifies a MetadataManagementActivity message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * Creates a MetadataManagementActivity message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Backup + * @returns MetadataManagementActivity */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.Backup; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.MetadataManagementActivity; /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. - * @param message Backup + * Creates a plain object from a MetadataManagementActivity message. Also converts values to other types if specified. + * @param message MetadataManagementActivity * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.MetadataManagementActivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Backup to JSON. + * Converts this MetadataManagementActivity to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Backup + * Gets the default type url for MetadataManagementActivity * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Backup { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - DELETING = 2, - ACTIVE = 3, - FAILED = 4, - RESTORING = 5 - } - } + /** Properties of a MetadataImport. */ + interface IMetadataImport { - /** Properties of a Restore. */ - interface IRestore { + /** MetadataImport databaseDump */ + databaseDump?: (google.cloud.metastore.v1.MetadataImport.IDatabaseDump|null); - /** Restore startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** MetadataImport name */ + name?: (string|null); - /** Restore endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** MetadataImport description */ + description?: (string|null); - /** Restore state */ - state?: (google.cloud.metastore.v1.Restore.State|keyof typeof google.cloud.metastore.v1.Restore.State|null); + /** MetadataImport createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** Restore backup */ - backup?: (string|null); + /** MetadataImport updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** Restore type */ - type?: (google.cloud.metastore.v1.Restore.RestoreType|keyof typeof google.cloud.metastore.v1.Restore.RestoreType|null); + /** MetadataImport endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** Restore details */ - details?: (string|null); + /** MetadataImport state */ + state?: (google.cloud.metastore.v1.MetadataImport.State|keyof typeof google.cloud.metastore.v1.MetadataImport.State|null); } - /** Represents a Restore. */ - class Restore implements IRestore { + /** Represents a MetadataImport. */ + class MetadataImport implements IMetadataImport { /** - * Constructs a new Restore. + * Constructs a new MetadataImport. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IRestore); + constructor(properties?: google.cloud.metastore.v1.IMetadataImport); - /** Restore startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** MetadataImport databaseDump. */ + public databaseDump?: (google.cloud.metastore.v1.MetadataImport.IDatabaseDump|null); - /** Restore endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** MetadataImport name. */ + public name: string; - /** Restore state. */ - public state: (google.cloud.metastore.v1.Restore.State|keyof typeof google.cloud.metastore.v1.Restore.State); + /** MetadataImport description. */ + public description: string; - /** Restore backup. */ - public backup: string; + /** MetadataImport createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** Restore type. */ - public type: (google.cloud.metastore.v1.Restore.RestoreType|keyof typeof google.cloud.metastore.v1.Restore.RestoreType); + /** MetadataImport updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** Restore details. */ - public details: string; + /** MetadataImport endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** MetadataImport state. */ + public state: (google.cloud.metastore.v1.MetadataImport.State|keyof typeof google.cloud.metastore.v1.MetadataImport.State); + + /** MetadataImport metadata. */ + public metadata?: "databaseDump"; /** - * Creates a new Restore instance using the specified properties. + * Creates a new MetadataImport instance using the specified properties. * @param [properties] Properties to set - * @returns Restore instance + * @returns MetadataImport instance */ - public static create(properties?: google.cloud.metastore.v1.IRestore): google.cloud.metastore.v1.Restore; + public static create(properties?: google.cloud.metastore.v1.IMetadataImport): google.cloud.metastore.v1.MetadataImport; /** - * Encodes the specified Restore message. Does not implicitly {@link google.cloud.metastore.v1.Restore.verify|verify} messages. - * @param message Restore message or plain object to encode + * Encodes the specified MetadataImport message. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.verify|verify} messages. + * @param message MetadataImport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IRestore, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IMetadataImport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Restore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.Restore.verify|verify} messages. - * @param message Restore message or plain object to encode + * Encodes the specified MetadataImport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.verify|verify} messages. + * @param message MetadataImport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IRestore, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IMetadataImport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Restore message from the specified reader or buffer. + * Decodes a MetadataImport message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Restore + * @returns MetadataImport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.Restore; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.MetadataImport; /** - * Decodes a Restore message from the specified reader or buffer, length delimited. + * Decodes a MetadataImport message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Restore + * @returns MetadataImport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.Restore; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.MetadataImport; /** - * Verifies a Restore message. + * Verifies a MetadataImport message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Restore message from a plain object. Also converts values to their respective internal types. + * Creates a MetadataImport message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Restore + * @returns MetadataImport */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.Restore; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.MetadataImport; /** - * Creates a plain object from a Restore message. Also converts values to other types if specified. - * @param message Restore + * Creates a plain object from a MetadataImport message. Also converts values to other types if specified. + * @param message MetadataImport * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.Restore, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.MetadataImport, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Restore to JSON. + * Converts this MetadataImport to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Restore + * Gets the default type url for MetadataImport * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Restore { + namespace MetadataImport { + + /** Properties of a DatabaseDump. */ + interface IDatabaseDump { + + /** DatabaseDump databaseType */ + databaseType?: (google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType|keyof typeof google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType|null); + + /** DatabaseDump gcsUri */ + gcsUri?: (string|null); + + /** DatabaseDump type */ + type?: (google.cloud.metastore.v1.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1.DatabaseDumpSpec.Type|null); + } + + /** Represents a DatabaseDump. */ + class DatabaseDump implements IDatabaseDump { + + /** + * Constructs a new DatabaseDump. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1.MetadataImport.IDatabaseDump); + + /** DatabaseDump databaseType. */ + public databaseType: (google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType|keyof typeof google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType); + + /** DatabaseDump gcsUri. */ + public gcsUri: string; + + /** DatabaseDump type. */ + public type: (google.cloud.metastore.v1.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1.DatabaseDumpSpec.Type); + + /** + * Creates a new DatabaseDump instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseDump instance + */ + public static create(properties?: google.cloud.metastore.v1.MetadataImport.IDatabaseDump): google.cloud.metastore.v1.MetadataImport.DatabaseDump; + + /** + * Encodes the specified DatabaseDump message. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.DatabaseDump.verify|verify} messages. + * @param message DatabaseDump message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1.MetadataImport.IDatabaseDump, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseDump message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.DatabaseDump.verify|verify} messages. + * @param message DatabaseDump message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1.MetadataImport.IDatabaseDump, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseDump message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseDump + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.MetadataImport.DatabaseDump; + + /** + * Decodes a DatabaseDump message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseDump + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.MetadataImport.DatabaseDump; + + /** + * Verifies a DatabaseDump message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseDump message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseDump + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.MetadataImport.DatabaseDump; + + /** + * Creates a plain object from a DatabaseDump message. Also converts values to other types if specified. + * @param message DatabaseDump + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1.MetadataImport.DatabaseDump, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseDump to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseDump + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DatabaseDump { + + /** DatabaseType enum. */ + enum DatabaseType { + DATABASE_TYPE_UNSPECIFIED = 0, + MYSQL = 1 + } + } /** State enum. */ enum State { STATE_UNSPECIFIED = 0, RUNNING = 1, SUCCEEDED = 2, - FAILED = 3, - CANCELLED = 4 - } - - /** RestoreType enum. */ - enum RestoreType { - RESTORE_TYPE_UNSPECIFIED = 0, - FULL = 1, - METADATA_ONLY = 2 + UPDATING = 3, + FAILED = 4 } } - /** Properties of a ListServicesRequest. */ - interface IListServicesRequest { + /** Properties of a MetadataExport. */ + interface IMetadataExport { - /** ListServicesRequest parent */ - parent?: (string|null); + /** MetadataExport destinationGcsUri */ + destinationGcsUri?: (string|null); - /** ListServicesRequest pageSize */ - pageSize?: (number|null); + /** MetadataExport startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** ListServicesRequest pageToken */ - pageToken?: (string|null); + /** MetadataExport endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** ListServicesRequest filter */ - filter?: (string|null); + /** MetadataExport state */ + state?: (google.cloud.metastore.v1.MetadataExport.State|keyof typeof google.cloud.metastore.v1.MetadataExport.State|null); - /** ListServicesRequest orderBy */ - orderBy?: (string|null); + /** MetadataExport databaseDumpType */ + databaseDumpType?: (google.cloud.metastore.v1.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1.DatabaseDumpSpec.Type|null); } - /** Represents a ListServicesRequest. */ - class ListServicesRequest implements IListServicesRequest { + /** Represents a MetadataExport. */ + class MetadataExport implements IMetadataExport { /** - * Constructs a new ListServicesRequest. + * Constructs a new MetadataExport. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IListServicesRequest); + constructor(properties?: google.cloud.metastore.v1.IMetadataExport); - /** ListServicesRequest parent. */ - public parent: string; + /** MetadataExport destinationGcsUri. */ + public destinationGcsUri?: (string|null); - /** ListServicesRequest pageSize. */ - public pageSize: number; + /** MetadataExport startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** ListServicesRequest pageToken. */ - public pageToken: string; + /** MetadataExport endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** ListServicesRequest filter. */ - public filter: string; + /** MetadataExport state. */ + public state: (google.cloud.metastore.v1.MetadataExport.State|keyof typeof google.cloud.metastore.v1.MetadataExport.State); - /** ListServicesRequest orderBy. */ - public orderBy: string; + /** MetadataExport databaseDumpType. */ + public databaseDumpType: (google.cloud.metastore.v1.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1.DatabaseDumpSpec.Type); + + /** MetadataExport destination. */ + public destination?: "destinationGcsUri"; /** - * Creates a new ListServicesRequest instance using the specified properties. + * Creates a new MetadataExport instance using the specified properties. * @param [properties] Properties to set - * @returns ListServicesRequest instance + * @returns MetadataExport instance */ - public static create(properties?: google.cloud.metastore.v1.IListServicesRequest): google.cloud.metastore.v1.ListServicesRequest; + public static create(properties?: google.cloud.metastore.v1.IMetadataExport): google.cloud.metastore.v1.MetadataExport; /** - * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.cloud.metastore.v1.ListServicesRequest.verify|verify} messages. - * @param message ListServicesRequest message or plain object to encode + * Encodes the specified MetadataExport message. Does not implicitly {@link google.cloud.metastore.v1.MetadataExport.verify|verify} messages. + * @param message MetadataExport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IMetadataExport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListServicesRequest.verify|verify} messages. - * @param message ListServicesRequest message or plain object to encode + * Encodes the specified MetadataExport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataExport.verify|verify} messages. + * @param message MetadataExport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IMetadataExport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListServicesRequest message from the specified reader or buffer. + * Decodes a MetadataExport message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListServicesRequest + * @returns MetadataExport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ListServicesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.MetadataExport; /** - * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. + * Decodes a MetadataExport message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListServicesRequest + * @returns MetadataExport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ListServicesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.MetadataExport; /** - * Verifies a ListServicesRequest message. + * Verifies a MetadataExport message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MetadataExport message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListServicesRequest + * @returns MetadataExport */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ListServicesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.MetadataExport; /** - * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. - * @param message ListServicesRequest + * Creates a plain object from a MetadataExport message. Also converts values to other types if specified. + * @param message MetadataExport * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.ListServicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.MetadataExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListServicesRequest to JSON. + * Converts this MetadataExport to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListServicesRequest + * Gets the default type url for MetadataExport * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListServicesResponse. */ - interface IListServicesResponse { + namespace MetadataExport { - /** ListServicesResponse services */ - services?: (google.cloud.metastore.v1.IService[]|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + FAILED = 3, + CANCELLED = 4 + } + } - /** ListServicesResponse nextPageToken */ - nextPageToken?: (string|null); + /** Properties of a Backup. */ + interface IBackup { - /** ListServicesResponse unreachable */ - unreachable?: (string[]|null); + /** Backup name */ + name?: (string|null); + + /** Backup createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Backup endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Backup state */ + state?: (google.cloud.metastore.v1.Backup.State|keyof typeof google.cloud.metastore.v1.Backup.State|null); + + /** Backup serviceRevision */ + serviceRevision?: (google.cloud.metastore.v1.IService|null); + + /** Backup description */ + description?: (string|null); + + /** Backup restoringServices */ + restoringServices?: (string[]|null); } - /** Represents a ListServicesResponse. */ - class ListServicesResponse implements IListServicesResponse { + /** Represents a Backup. */ + class Backup implements IBackup { /** - * Constructs a new ListServicesResponse. + * Constructs a new Backup. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IListServicesResponse); + constructor(properties?: google.cloud.metastore.v1.IBackup); - /** ListServicesResponse services. */ - public services: google.cloud.metastore.v1.IService[]; + /** Backup name. */ + public name: string; - /** ListServicesResponse nextPageToken. */ - public nextPageToken: string; + /** Backup createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** ListServicesResponse unreachable. */ - public unreachable: string[]; + /** Backup endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Backup state. */ + public state: (google.cloud.metastore.v1.Backup.State|keyof typeof google.cloud.metastore.v1.Backup.State); + + /** Backup serviceRevision. */ + public serviceRevision?: (google.cloud.metastore.v1.IService|null); + + /** Backup description. */ + public description: string; + + /** Backup restoringServices. */ + public restoringServices: string[]; /** - * Creates a new ListServicesResponse instance using the specified properties. + * Creates a new Backup instance using the specified properties. * @param [properties] Properties to set - * @returns ListServicesResponse instance + * @returns Backup instance */ - public static create(properties?: google.cloud.metastore.v1.IListServicesResponse): google.cloud.metastore.v1.ListServicesResponse; + public static create(properties?: google.cloud.metastore.v1.IBackup): google.cloud.metastore.v1.Backup; /** - * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.cloud.metastore.v1.ListServicesResponse.verify|verify} messages. - * @param message ListServicesResponse message or plain object to encode + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.metastore.v1.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListServicesResponse.verify|verify} messages. - * @param message ListServicesResponse message or plain object to encode + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListServicesResponse message from the specified reader or buffer. + * Decodes a Backup message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListServicesResponse + * @returns Backup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ListServicesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.Backup; /** - * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. + * Decodes a Backup message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListServicesResponse + * @returns Backup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ListServicesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.Backup; /** - * Verifies a ListServicesResponse message. + * Verifies a Backup message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Backup message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListServicesResponse + * @returns Backup */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ListServicesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.Backup; /** - * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. - * @param message ListServicesResponse + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @param message Backup * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.ListServicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListServicesResponse to JSON. + * Converts this Backup to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListServicesResponse + * Gets the default type url for Backup * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetServiceRequest. */ - interface IGetServiceRequest { + namespace Backup { - /** GetServiceRequest name */ - name?: (string|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + DELETING = 2, + ACTIVE = 3, + FAILED = 4, + RESTORING = 5 + } } - /** Represents a GetServiceRequest. */ - class GetServiceRequest implements IGetServiceRequest { + /** Properties of a Restore. */ + interface IRestore { + + /** Restore startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Restore endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Restore state */ + state?: (google.cloud.metastore.v1.Restore.State|keyof typeof google.cloud.metastore.v1.Restore.State|null); + + /** Restore backup */ + backup?: (string|null); + + /** Restore type */ + type?: (google.cloud.metastore.v1.Restore.RestoreType|keyof typeof google.cloud.metastore.v1.Restore.RestoreType|null); + + /** Restore details */ + details?: (string|null); + } + + /** Represents a Restore. */ + class Restore implements IRestore { /** - * Constructs a new GetServiceRequest. + * Constructs a new Restore. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IGetServiceRequest); + constructor(properties?: google.cloud.metastore.v1.IRestore); - /** GetServiceRequest name. */ - public name: string; + /** Restore startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Restore endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Restore state. */ + public state: (google.cloud.metastore.v1.Restore.State|keyof typeof google.cloud.metastore.v1.Restore.State); + + /** Restore backup. */ + public backup: string; + + /** Restore type. */ + public type: (google.cloud.metastore.v1.Restore.RestoreType|keyof typeof google.cloud.metastore.v1.Restore.RestoreType); + + /** Restore details. */ + public details: string; /** - * Creates a new GetServiceRequest instance using the specified properties. + * Creates a new Restore instance using the specified properties. * @param [properties] Properties to set - * @returns GetServiceRequest instance + * @returns Restore instance */ - public static create(properties?: google.cloud.metastore.v1.IGetServiceRequest): google.cloud.metastore.v1.GetServiceRequest; + public static create(properties?: google.cloud.metastore.v1.IRestore): google.cloud.metastore.v1.Restore; /** - * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.GetServiceRequest.verify|verify} messages. - * @param message GetServiceRequest message or plain object to encode + * Encodes the specified Restore message. Does not implicitly {@link google.cloud.metastore.v1.Restore.verify|verify} messages. + * @param message Restore message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IRestore, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.GetServiceRequest.verify|verify} messages. - * @param message GetServiceRequest message or plain object to encode + * Encodes the specified Restore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.Restore.verify|verify} messages. + * @param message Restore message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IRestore, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetServiceRequest message from the specified reader or buffer. + * Decodes a Restore message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetServiceRequest + * @returns Restore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.GetServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.Restore; /** - * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a Restore message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetServiceRequest + * @returns Restore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.GetServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.Restore; /** - * Verifies a GetServiceRequest message. + * Verifies a Restore message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Restore message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetServiceRequest + * @returns Restore */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.GetServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.Restore; /** - * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. - * @param message GetServiceRequest + * Creates a plain object from a Restore message. Also converts values to other types if specified. + * @param message Restore * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.GetServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.Restore, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetServiceRequest to JSON. + * Converts this Restore to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetServiceRequest + * Gets the default type url for Restore * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateServiceRequest. */ - interface ICreateServiceRequest { + namespace Restore { - /** CreateServiceRequest parent */ + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + FAILED = 3, + CANCELLED = 4 + } + + /** RestoreType enum. */ + enum RestoreType { + RESTORE_TYPE_UNSPECIFIED = 0, + FULL = 1, + METADATA_ONLY = 2 + } + } + + /** Properties of a ListServicesRequest. */ + interface IListServicesRequest { + + /** ListServicesRequest parent */ parent?: (string|null); - /** CreateServiceRequest serviceId */ - serviceId?: (string|null); + /** ListServicesRequest pageSize */ + pageSize?: (number|null); - /** CreateServiceRequest service */ - service?: (google.cloud.metastore.v1.IService|null); + /** ListServicesRequest pageToken */ + pageToken?: (string|null); - /** CreateServiceRequest requestId */ - requestId?: (string|null); + /** ListServicesRequest filter */ + filter?: (string|null); + + /** ListServicesRequest orderBy */ + orderBy?: (string|null); } - /** Represents a CreateServiceRequest. */ - class CreateServiceRequest implements ICreateServiceRequest { + /** Represents a ListServicesRequest. */ + class ListServicesRequest implements IListServicesRequest { /** - * Constructs a new CreateServiceRequest. + * Constructs a new ListServicesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.ICreateServiceRequest); + constructor(properties?: google.cloud.metastore.v1.IListServicesRequest); - /** CreateServiceRequest parent. */ + /** ListServicesRequest parent. */ public parent: string; - /** CreateServiceRequest serviceId. */ - public serviceId: string; + /** ListServicesRequest pageSize. */ + public pageSize: number; - /** CreateServiceRequest service. */ - public service?: (google.cloud.metastore.v1.IService|null); + /** ListServicesRequest pageToken. */ + public pageToken: string; - /** CreateServiceRequest requestId. */ - public requestId: string; + /** ListServicesRequest filter. */ + public filter: string; + + /** ListServicesRequest orderBy. */ + public orderBy: string; /** - * Creates a new CreateServiceRequest instance using the specified properties. + * Creates a new ListServicesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateServiceRequest instance + * @returns ListServicesRequest instance */ - public static create(properties?: google.cloud.metastore.v1.ICreateServiceRequest): google.cloud.metastore.v1.CreateServiceRequest; + public static create(properties?: google.cloud.metastore.v1.IListServicesRequest): google.cloud.metastore.v1.ListServicesRequest; /** - * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.CreateServiceRequest.verify|verify} messages. - * @param message CreateServiceRequest message or plain object to encode + * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.cloud.metastore.v1.ListServicesRequest.verify|verify} messages. + * @param message ListServicesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.CreateServiceRequest.verify|verify} messages. - * @param message CreateServiceRequest message or plain object to encode + * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListServicesRequest.verify|verify} messages. + * @param message ListServicesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer. + * Decodes a ListServicesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateServiceRequest + * @returns ListServicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.CreateServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ListServicesRequest; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateServiceRequest + * @returns ListServicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.CreateServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ListServicesRequest; /** - * Verifies a CreateServiceRequest message. + * Verifies a ListServicesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateServiceRequest + * @returns ListServicesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.CreateServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ListServicesRequest; /** - * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. - * @param message CreateServiceRequest + * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. + * @param message ListServicesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.CreateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.ListServicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateServiceRequest to JSON. + * Converts this ListServicesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateServiceRequest + * Gets the default type url for ListServicesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateServiceRequest. */ - interface IUpdateServiceRequest { + /** Properties of a ListServicesResponse. */ + interface IListServicesResponse { - /** UpdateServiceRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListServicesResponse services */ + services?: (google.cloud.metastore.v1.IService[]|null); - /** UpdateServiceRequest service */ - service?: (google.cloud.metastore.v1.IService|null); + /** ListServicesResponse nextPageToken */ + nextPageToken?: (string|null); - /** UpdateServiceRequest requestId */ - requestId?: (string|null); + /** ListServicesResponse unreachable */ + unreachable?: (string[]|null); } - /** Represents an UpdateServiceRequest. */ - class UpdateServiceRequest implements IUpdateServiceRequest { + /** Represents a ListServicesResponse. */ + class ListServicesResponse implements IListServicesResponse { /** - * Constructs a new UpdateServiceRequest. + * Constructs a new ListServicesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IUpdateServiceRequest); + constructor(properties?: google.cloud.metastore.v1.IListServicesResponse); - /** UpdateServiceRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListServicesResponse services. */ + public services: google.cloud.metastore.v1.IService[]; - /** UpdateServiceRequest service. */ - public service?: (google.cloud.metastore.v1.IService|null); + /** ListServicesResponse nextPageToken. */ + public nextPageToken: string; - /** UpdateServiceRequest requestId. */ - public requestId: string; + /** ListServicesResponse unreachable. */ + public unreachable: string[]; /** - * Creates a new UpdateServiceRequest instance using the specified properties. + * Creates a new ListServicesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateServiceRequest instance + * @returns ListServicesResponse instance */ - public static create(properties?: google.cloud.metastore.v1.IUpdateServiceRequest): google.cloud.metastore.v1.UpdateServiceRequest; + public static create(properties?: google.cloud.metastore.v1.IListServicesResponse): google.cloud.metastore.v1.ListServicesResponse; /** - * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.UpdateServiceRequest.verify|verify} messages. - * @param message UpdateServiceRequest message or plain object to encode + * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.cloud.metastore.v1.ListServicesResponse.verify|verify} messages. + * @param message ListServicesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.UpdateServiceRequest.verify|verify} messages. - * @param message UpdateServiceRequest message or plain object to encode + * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListServicesResponse.verify|verify} messages. + * @param message ListServicesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer. + * Decodes a ListServicesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateServiceRequest + * @returns ListServicesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.UpdateServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ListServicesResponse; /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateServiceRequest + * @returns ListServicesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.UpdateServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ListServicesResponse; /** - * Verifies an UpdateServiceRequest message. + * Verifies a ListServicesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateServiceRequest + * @returns ListServicesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.UpdateServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ListServicesResponse; /** - * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. - * @param message UpdateServiceRequest + * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. + * @param message ListServicesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.UpdateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.ListServicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateServiceRequest to JSON. + * Converts this ListServicesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateServiceRequest + * Gets the default type url for ListServicesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteServiceRequest. */ - interface IDeleteServiceRequest { + /** Properties of a GetServiceRequest. */ + interface IGetServiceRequest { - /** DeleteServiceRequest name */ + /** GetServiceRequest name */ name?: (string|null); - - /** DeleteServiceRequest requestId */ - requestId?: (string|null); } - /** Represents a DeleteServiceRequest. */ - class DeleteServiceRequest implements IDeleteServiceRequest { + /** Represents a GetServiceRequest. */ + class GetServiceRequest implements IGetServiceRequest { /** - * Constructs a new DeleteServiceRequest. + * Constructs a new GetServiceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IDeleteServiceRequest); + constructor(properties?: google.cloud.metastore.v1.IGetServiceRequest); - /** DeleteServiceRequest name. */ + /** GetServiceRequest name. */ public name: string; - /** DeleteServiceRequest requestId. */ - public requestId: string; - /** - * Creates a new DeleteServiceRequest instance using the specified properties. + * Creates a new GetServiceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteServiceRequest instance + * @returns GetServiceRequest instance */ - public static create(properties?: google.cloud.metastore.v1.IDeleteServiceRequest): google.cloud.metastore.v1.DeleteServiceRequest; + public static create(properties?: google.cloud.metastore.v1.IGetServiceRequest): google.cloud.metastore.v1.GetServiceRequest; /** - * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.DeleteServiceRequest.verify|verify} messages. - * @param message DeleteServiceRequest message or plain object to encode + * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.GetServiceRequest.verify|verify} messages. + * @param message GetServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.DeleteServiceRequest.verify|verify} messages. - * @param message DeleteServiceRequest message or plain object to encode + * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.GetServiceRequest.verify|verify} messages. + * @param message GetServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * Decodes a GetServiceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteServiceRequest + * @returns GetServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.DeleteServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.GetServiceRequest; /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteServiceRequest + * @returns GetServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.DeleteServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.GetServiceRequest; /** - * Verifies a DeleteServiceRequest message. + * Verifies a GetServiceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteServiceRequest + * @returns GetServiceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.DeleteServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.GetServiceRequest; /** - * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. - * @param message DeleteServiceRequest + * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. + * @param message GetServiceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.DeleteServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.GetServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteServiceRequest to JSON. + * Converts this GetServiceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteServiceRequest + * Gets the default type url for GetServiceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListMetadataImportsRequest. */ - interface IListMetadataImportsRequest { + /** Properties of a CreateServiceRequest. */ + interface ICreateServiceRequest { - /** ListMetadataImportsRequest parent */ + /** CreateServiceRequest parent */ parent?: (string|null); - /** ListMetadataImportsRequest pageSize */ - pageSize?: (number|null); - - /** ListMetadataImportsRequest pageToken */ - pageToken?: (string|null); + /** CreateServiceRequest serviceId */ + serviceId?: (string|null); - /** ListMetadataImportsRequest filter */ - filter?: (string|null); + /** CreateServiceRequest service */ + service?: (google.cloud.metastore.v1.IService|null); - /** ListMetadataImportsRequest orderBy */ - orderBy?: (string|null); + /** CreateServiceRequest requestId */ + requestId?: (string|null); } - /** Represents a ListMetadataImportsRequest. */ - class ListMetadataImportsRequest implements IListMetadataImportsRequest { + /** Represents a CreateServiceRequest. */ + class CreateServiceRequest implements ICreateServiceRequest { /** - * Constructs a new ListMetadataImportsRequest. + * Constructs a new CreateServiceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IListMetadataImportsRequest); + constructor(properties?: google.cloud.metastore.v1.ICreateServiceRequest); - /** ListMetadataImportsRequest parent. */ + /** CreateServiceRequest parent. */ public parent: string; - /** ListMetadataImportsRequest pageSize. */ - public pageSize: number; - - /** ListMetadataImportsRequest pageToken. */ - public pageToken: string; + /** CreateServiceRequest serviceId. */ + public serviceId: string; - /** ListMetadataImportsRequest filter. */ - public filter: string; + /** CreateServiceRequest service. */ + public service?: (google.cloud.metastore.v1.IService|null); - /** ListMetadataImportsRequest orderBy. */ - public orderBy: string; + /** CreateServiceRequest requestId. */ + public requestId: string; /** - * Creates a new ListMetadataImportsRequest instance using the specified properties. + * Creates a new CreateServiceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListMetadataImportsRequest instance + * @returns CreateServiceRequest instance */ - public static create(properties?: google.cloud.metastore.v1.IListMetadataImportsRequest): google.cloud.metastore.v1.ListMetadataImportsRequest; + public static create(properties?: google.cloud.metastore.v1.ICreateServiceRequest): google.cloud.metastore.v1.CreateServiceRequest; /** - * Encodes the specified ListMetadataImportsRequest message. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsRequest.verify|verify} messages. - * @param message ListMetadataImportsRequest message or plain object to encode + * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.CreateServiceRequest.verify|verify} messages. + * @param message CreateServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IListMetadataImportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMetadataImportsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsRequest.verify|verify} messages. - * @param message ListMetadataImportsRequest message or plain object to encode + * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.CreateServiceRequest.verify|verify} messages. + * @param message CreateServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IListMetadataImportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMetadataImportsRequest message from the specified reader or buffer. + * Decodes a CreateServiceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMetadataImportsRequest + * @returns CreateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ListMetadataImportsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.CreateServiceRequest; /** - * Decodes a ListMetadataImportsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMetadataImportsRequest + * @returns CreateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ListMetadataImportsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.CreateServiceRequest; /** - * Verifies a ListMetadataImportsRequest message. + * Verifies a CreateServiceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMetadataImportsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMetadataImportsRequest + * @returns CreateServiceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ListMetadataImportsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.CreateServiceRequest; /** - * Creates a plain object from a ListMetadataImportsRequest message. Also converts values to other types if specified. - * @param message ListMetadataImportsRequest + * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. + * @param message CreateServiceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.ListMetadataImportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.CreateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMetadataImportsRequest to JSON. + * Converts this CreateServiceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListMetadataImportsRequest + * Gets the default type url for CreateServiceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListMetadataImportsResponse. */ - interface IListMetadataImportsResponse { + /** Properties of an UpdateServiceRequest. */ + interface IUpdateServiceRequest { - /** ListMetadataImportsResponse metadataImports */ - metadataImports?: (google.cloud.metastore.v1.IMetadataImport[]|null); + /** UpdateServiceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** ListMetadataImportsResponse nextPageToken */ - nextPageToken?: (string|null); + /** UpdateServiceRequest service */ + service?: (google.cloud.metastore.v1.IService|null); - /** ListMetadataImportsResponse unreachable */ - unreachable?: (string[]|null); + /** UpdateServiceRequest requestId */ + requestId?: (string|null); } - /** Represents a ListMetadataImportsResponse. */ - class ListMetadataImportsResponse implements IListMetadataImportsResponse { + /** Represents an UpdateServiceRequest. */ + class UpdateServiceRequest implements IUpdateServiceRequest { /** - * Constructs a new ListMetadataImportsResponse. + * Constructs a new UpdateServiceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IListMetadataImportsResponse); + constructor(properties?: google.cloud.metastore.v1.IUpdateServiceRequest); - /** ListMetadataImportsResponse metadataImports. */ - public metadataImports: google.cloud.metastore.v1.IMetadataImport[]; + /** UpdateServiceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** ListMetadataImportsResponse nextPageToken. */ - public nextPageToken: string; + /** UpdateServiceRequest service. */ + public service?: (google.cloud.metastore.v1.IService|null); - /** ListMetadataImportsResponse unreachable. */ - public unreachable: string[]; + /** UpdateServiceRequest requestId. */ + public requestId: string; /** - * Creates a new ListMetadataImportsResponse instance using the specified properties. + * Creates a new UpdateServiceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListMetadataImportsResponse instance + * @returns UpdateServiceRequest instance */ - public static create(properties?: google.cloud.metastore.v1.IListMetadataImportsResponse): google.cloud.metastore.v1.ListMetadataImportsResponse; + public static create(properties?: google.cloud.metastore.v1.IUpdateServiceRequest): google.cloud.metastore.v1.UpdateServiceRequest; /** - * Encodes the specified ListMetadataImportsResponse message. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsResponse.verify|verify} messages. - * @param message ListMetadataImportsResponse message or plain object to encode + * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.UpdateServiceRequest.verify|verify} messages. + * @param message UpdateServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IListMetadataImportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMetadataImportsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsResponse.verify|verify} messages. - * @param message ListMetadataImportsResponse message or plain object to encode + * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.UpdateServiceRequest.verify|verify} messages. + * @param message UpdateServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IListMetadataImportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMetadataImportsResponse message from the specified reader or buffer. + * Decodes an UpdateServiceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMetadataImportsResponse + * @returns UpdateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ListMetadataImportsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.UpdateServiceRequest; /** - * Decodes a ListMetadataImportsResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMetadataImportsResponse + * @returns UpdateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ListMetadataImportsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.UpdateServiceRequest; /** - * Verifies a ListMetadataImportsResponse message. + * Verifies an UpdateServiceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMetadataImportsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMetadataImportsResponse + * @returns UpdateServiceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ListMetadataImportsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.UpdateServiceRequest; /** - * Creates a plain object from a ListMetadataImportsResponse message. Also converts values to other types if specified. - * @param message ListMetadataImportsResponse + * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. + * @param message UpdateServiceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.ListMetadataImportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.UpdateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMetadataImportsResponse to JSON. + * Converts this UpdateServiceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListMetadataImportsResponse + * Gets the default type url for UpdateServiceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetMetadataImportRequest. */ - interface IGetMetadataImportRequest { + /** Properties of a DeleteServiceRequest. */ + interface IDeleteServiceRequest { - /** GetMetadataImportRequest name */ + /** DeleteServiceRequest name */ name?: (string|null); + + /** DeleteServiceRequest requestId */ + requestId?: (string|null); } - /** Represents a GetMetadataImportRequest. */ - class GetMetadataImportRequest implements IGetMetadataImportRequest { + /** Represents a DeleteServiceRequest. */ + class DeleteServiceRequest implements IDeleteServiceRequest { /** - * Constructs a new GetMetadataImportRequest. + * Constructs a new DeleteServiceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IGetMetadataImportRequest); + constructor(properties?: google.cloud.metastore.v1.IDeleteServiceRequest); - /** GetMetadataImportRequest name. */ + /** DeleteServiceRequest name. */ public name: string; + /** DeleteServiceRequest requestId. */ + public requestId: string; + /** - * Creates a new GetMetadataImportRequest instance using the specified properties. + * Creates a new DeleteServiceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetMetadataImportRequest instance + * @returns DeleteServiceRequest instance */ - public static create(properties?: google.cloud.metastore.v1.IGetMetadataImportRequest): google.cloud.metastore.v1.GetMetadataImportRequest; + public static create(properties?: google.cloud.metastore.v1.IDeleteServiceRequest): google.cloud.metastore.v1.DeleteServiceRequest; /** - * Encodes the specified GetMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1.GetMetadataImportRequest.verify|verify} messages. - * @param message GetMetadataImportRequest message or plain object to encode + * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.DeleteServiceRequest.verify|verify} messages. + * @param message DeleteServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IGetMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.GetMetadataImportRequest.verify|verify} messages. - * @param message GetMetadataImportRequest message or plain object to encode + * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.DeleteServiceRequest.verify|verify} messages. + * @param message DeleteServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IGetMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetMetadataImportRequest message from the specified reader or buffer. + * Decodes a DeleteServiceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetMetadataImportRequest + * @returns DeleteServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.GetMetadataImportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.DeleteServiceRequest; /** - * Decodes a GetMetadataImportRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetMetadataImportRequest + * @returns DeleteServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.GetMetadataImportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.DeleteServiceRequest; /** - * Verifies a GetMetadataImportRequest message. + * Verifies a DeleteServiceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetMetadataImportRequest + * @returns DeleteServiceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.GetMetadataImportRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.DeleteServiceRequest; /** - * Creates a plain object from a GetMetadataImportRequest message. Also converts values to other types if specified. - * @param message GetMetadataImportRequest + * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. + * @param message DeleteServiceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.GetMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.DeleteServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetMetadataImportRequest to JSON. + * Converts this DeleteServiceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetMetadataImportRequest + * Gets the default type url for DeleteServiceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateMetadataImportRequest. */ - interface ICreateMetadataImportRequest { + /** Properties of a ListMetadataImportsRequest. */ + interface IListMetadataImportsRequest { - /** CreateMetadataImportRequest parent */ + /** ListMetadataImportsRequest parent */ parent?: (string|null); - /** CreateMetadataImportRequest metadataImportId */ - metadataImportId?: (string|null); + /** ListMetadataImportsRequest pageSize */ + pageSize?: (number|null); - /** CreateMetadataImportRequest metadataImport */ - metadataImport?: (google.cloud.metastore.v1.IMetadataImport|null); + /** ListMetadataImportsRequest pageToken */ + pageToken?: (string|null); - /** CreateMetadataImportRequest requestId */ - requestId?: (string|null); + /** ListMetadataImportsRequest filter */ + filter?: (string|null); + + /** ListMetadataImportsRequest orderBy */ + orderBy?: (string|null); } - /** Represents a CreateMetadataImportRequest. */ - class CreateMetadataImportRequest implements ICreateMetadataImportRequest { + /** Represents a ListMetadataImportsRequest. */ + class ListMetadataImportsRequest implements IListMetadataImportsRequest { /** - * Constructs a new CreateMetadataImportRequest. + * Constructs a new ListMetadataImportsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.ICreateMetadataImportRequest); + constructor(properties?: google.cloud.metastore.v1.IListMetadataImportsRequest); - /** CreateMetadataImportRequest parent. */ + /** ListMetadataImportsRequest parent. */ public parent: string; - /** CreateMetadataImportRequest metadataImportId. */ - public metadataImportId: string; + /** ListMetadataImportsRequest pageSize. */ + public pageSize: number; - /** CreateMetadataImportRequest metadataImport. */ - public metadataImport?: (google.cloud.metastore.v1.IMetadataImport|null); + /** ListMetadataImportsRequest pageToken. */ + public pageToken: string; - /** CreateMetadataImportRequest requestId. */ - public requestId: string; + /** ListMetadataImportsRequest filter. */ + public filter: string; + + /** ListMetadataImportsRequest orderBy. */ + public orderBy: string; /** - * Creates a new CreateMetadataImportRequest instance using the specified properties. + * Creates a new ListMetadataImportsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateMetadataImportRequest instance + * @returns ListMetadataImportsRequest instance */ - public static create(properties?: google.cloud.metastore.v1.ICreateMetadataImportRequest): google.cloud.metastore.v1.CreateMetadataImportRequest; + public static create(properties?: google.cloud.metastore.v1.IListMetadataImportsRequest): google.cloud.metastore.v1.ListMetadataImportsRequest; /** - * Encodes the specified CreateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1.CreateMetadataImportRequest.verify|verify} messages. - * @param message CreateMetadataImportRequest message or plain object to encode + * Encodes the specified ListMetadataImportsRequest message. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsRequest.verify|verify} messages. + * @param message ListMetadataImportsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.ICreateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IListMetadataImportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.CreateMetadataImportRequest.verify|verify} messages. - * @param message CreateMetadataImportRequest message or plain object to encode + * Encodes the specified ListMetadataImportsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsRequest.verify|verify} messages. + * @param message ListMetadataImportsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.ICreateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IListMetadataImportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateMetadataImportRequest message from the specified reader or buffer. + * Decodes a ListMetadataImportsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateMetadataImportRequest + * @returns ListMetadataImportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.CreateMetadataImportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ListMetadataImportsRequest; /** - * Decodes a CreateMetadataImportRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMetadataImportsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateMetadataImportRequest + * @returns ListMetadataImportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.CreateMetadataImportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ListMetadataImportsRequest; /** - * Verifies a CreateMetadataImportRequest message. + * Verifies a ListMetadataImportsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetadataImportsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateMetadataImportRequest + * @returns ListMetadataImportsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.CreateMetadataImportRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ListMetadataImportsRequest; /** - * Creates a plain object from a CreateMetadataImportRequest message. Also converts values to other types if specified. - * @param message CreateMetadataImportRequest + * Creates a plain object from a ListMetadataImportsRequest message. Also converts values to other types if specified. + * @param message ListMetadataImportsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.CreateMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.ListMetadataImportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateMetadataImportRequest to JSON. + * Converts this ListMetadataImportsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateMetadataImportRequest + * Gets the default type url for ListMetadataImportsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateMetadataImportRequest. */ - interface IUpdateMetadataImportRequest { + /** Properties of a ListMetadataImportsResponse. */ + interface IListMetadataImportsResponse { - /** UpdateMetadataImportRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListMetadataImportsResponse metadataImports */ + metadataImports?: (google.cloud.metastore.v1.IMetadataImport[]|null); - /** UpdateMetadataImportRequest metadataImport */ - metadataImport?: (google.cloud.metastore.v1.IMetadataImport|null); + /** ListMetadataImportsResponse nextPageToken */ + nextPageToken?: (string|null); - /** UpdateMetadataImportRequest requestId */ - requestId?: (string|null); + /** ListMetadataImportsResponse unreachable */ + unreachable?: (string[]|null); } - /** Represents an UpdateMetadataImportRequest. */ - class UpdateMetadataImportRequest implements IUpdateMetadataImportRequest { + /** Represents a ListMetadataImportsResponse. */ + class ListMetadataImportsResponse implements IListMetadataImportsResponse { /** - * Constructs a new UpdateMetadataImportRequest. + * Constructs a new ListMetadataImportsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IUpdateMetadataImportRequest); + constructor(properties?: google.cloud.metastore.v1.IListMetadataImportsResponse); - /** UpdateMetadataImportRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListMetadataImportsResponse metadataImports. */ + public metadataImports: google.cloud.metastore.v1.IMetadataImport[]; - /** UpdateMetadataImportRequest metadataImport. */ - public metadataImport?: (google.cloud.metastore.v1.IMetadataImport|null); + /** ListMetadataImportsResponse nextPageToken. */ + public nextPageToken: string; - /** UpdateMetadataImportRequest requestId. */ - public requestId: string; + /** ListMetadataImportsResponse unreachable. */ + public unreachable: string[]; /** - * Creates a new UpdateMetadataImportRequest instance using the specified properties. + * Creates a new ListMetadataImportsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateMetadataImportRequest instance + * @returns ListMetadataImportsResponse instance */ - public static create(properties?: google.cloud.metastore.v1.IUpdateMetadataImportRequest): google.cloud.metastore.v1.UpdateMetadataImportRequest; + public static create(properties?: google.cloud.metastore.v1.IListMetadataImportsResponse): google.cloud.metastore.v1.ListMetadataImportsResponse; /** - * Encodes the specified UpdateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1.UpdateMetadataImportRequest.verify|verify} messages. - * @param message UpdateMetadataImportRequest message or plain object to encode + * Encodes the specified ListMetadataImportsResponse message. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsResponse.verify|verify} messages. + * @param message ListMetadataImportsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IUpdateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IListMetadataImportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.UpdateMetadataImportRequest.verify|verify} messages. - * @param message UpdateMetadataImportRequest message or plain object to encode + * Encodes the specified ListMetadataImportsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsResponse.verify|verify} messages. + * @param message ListMetadataImportsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IUpdateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IListMetadataImportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer. + * Decodes a ListMetadataImportsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateMetadataImportRequest + * @returns ListMetadataImportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.UpdateMetadataImportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ListMetadataImportsResponse; /** - * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMetadataImportsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateMetadataImportRequest + * @returns ListMetadataImportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.UpdateMetadataImportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ListMetadataImportsResponse; /** - * Verifies an UpdateMetadataImportRequest message. + * Verifies a ListMetadataImportsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetadataImportsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateMetadataImportRequest + * @returns ListMetadataImportsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.UpdateMetadataImportRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ListMetadataImportsResponse; /** - * Creates a plain object from an UpdateMetadataImportRequest message. Also converts values to other types if specified. - * @param message UpdateMetadataImportRequest + * Creates a plain object from a ListMetadataImportsResponse message. Also converts values to other types if specified. + * @param message ListMetadataImportsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.UpdateMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.ListMetadataImportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateMetadataImportRequest to JSON. + * Converts this ListMetadataImportsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateMetadataImportRequest + * Gets the default type url for ListMetadataImportsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBackupsRequest. */ - interface IListBackupsRequest { - - /** ListBackupsRequest parent */ - parent?: (string|null); - - /** ListBackupsRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupsRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupsRequest filter */ - filter?: (string|null); + /** Properties of a GetMetadataImportRequest. */ + interface IGetMetadataImportRequest { - /** ListBackupsRequest orderBy */ - orderBy?: (string|null); + /** GetMetadataImportRequest name */ + name?: (string|null); } - /** Represents a ListBackupsRequest. */ - class ListBackupsRequest implements IListBackupsRequest { + /** Represents a GetMetadataImportRequest. */ + class GetMetadataImportRequest implements IGetMetadataImportRequest { /** - * Constructs a new ListBackupsRequest. + * Constructs a new GetMetadataImportRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IListBackupsRequest); - - /** ListBackupsRequest parent. */ - public parent: string; - - /** ListBackupsRequest pageSize. */ - public pageSize: number; - - /** ListBackupsRequest pageToken. */ - public pageToken: string; - - /** ListBackupsRequest filter. */ - public filter: string; + constructor(properties?: google.cloud.metastore.v1.IGetMetadataImportRequest); - /** ListBackupsRequest orderBy. */ - public orderBy: string; + /** GetMetadataImportRequest name. */ + public name: string; /** - * Creates a new ListBackupsRequest instance using the specified properties. + * Creates a new GetMetadataImportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListBackupsRequest instance + * @returns GetMetadataImportRequest instance */ - public static create(properties?: google.cloud.metastore.v1.IListBackupsRequest): google.cloud.metastore.v1.ListBackupsRequest; + public static create(properties?: google.cloud.metastore.v1.IGetMetadataImportRequest): google.cloud.metastore.v1.GetMetadataImportRequest; /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsRequest.verify|verify} messages. - * @param message ListBackupsRequest message or plain object to encode + * Encodes the specified GetMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1.GetMetadataImportRequest.verify|verify} messages. + * @param message GetMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IGetMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsRequest.verify|verify} messages. - * @param message ListBackupsRequest message or plain object to encode + * Encodes the specified GetMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.GetMetadataImportRequest.verify|verify} messages. + * @param message GetMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IGetMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. + * Decodes a GetMetadataImportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBackupsRequest + * @returns GetMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ListBackupsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.GetMetadataImportRequest; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetMetadataImportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBackupsRequest + * @returns GetMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ListBackupsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.GetMetadataImportRequest; /** - * Verifies a ListBackupsRequest message. + * Verifies a GetMetadataImportRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBackupsRequest + * @returns GetMetadataImportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ListBackupsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.GetMetadataImportRequest; /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. - * @param message ListBackupsRequest + * Creates a plain object from a GetMetadataImportRequest message. Also converts values to other types if specified. + * @param message GetMetadataImportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.GetMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBackupsRequest to JSON. + * Converts this GetMetadataImportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListBackupsRequest + * Gets the default type url for GetMetadataImportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBackupsResponse. */ - interface IListBackupsResponse { + /** Properties of a CreateMetadataImportRequest. */ + interface ICreateMetadataImportRequest { - /** ListBackupsResponse backups */ - backups?: (google.cloud.metastore.v1.IBackup[]|null); + /** CreateMetadataImportRequest parent */ + parent?: (string|null); - /** ListBackupsResponse nextPageToken */ - nextPageToken?: (string|null); + /** CreateMetadataImportRequest metadataImportId */ + metadataImportId?: (string|null); - /** ListBackupsResponse unreachable */ - unreachable?: (string[]|null); + /** CreateMetadataImportRequest metadataImport */ + metadataImport?: (google.cloud.metastore.v1.IMetadataImport|null); + + /** CreateMetadataImportRequest requestId */ + requestId?: (string|null); } - /** Represents a ListBackupsResponse. */ - class ListBackupsResponse implements IListBackupsResponse { + /** Represents a CreateMetadataImportRequest. */ + class CreateMetadataImportRequest implements ICreateMetadataImportRequest { /** - * Constructs a new ListBackupsResponse. + * Constructs a new CreateMetadataImportRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IListBackupsResponse); + constructor(properties?: google.cloud.metastore.v1.ICreateMetadataImportRequest); - /** ListBackupsResponse backups. */ - public backups: google.cloud.metastore.v1.IBackup[]; + /** CreateMetadataImportRequest parent. */ + public parent: string; - /** ListBackupsResponse nextPageToken. */ - public nextPageToken: string; + /** CreateMetadataImportRequest metadataImportId. */ + public metadataImportId: string; - /** ListBackupsResponse unreachable. */ - public unreachable: string[]; + /** CreateMetadataImportRequest metadataImport. */ + public metadataImport?: (google.cloud.metastore.v1.IMetadataImport|null); + + /** CreateMetadataImportRequest requestId. */ + public requestId: string; /** - * Creates a new ListBackupsResponse instance using the specified properties. + * Creates a new CreateMetadataImportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListBackupsResponse instance + * @returns CreateMetadataImportRequest instance */ - public static create(properties?: google.cloud.metastore.v1.IListBackupsResponse): google.cloud.metastore.v1.ListBackupsResponse; + public static create(properties?: google.cloud.metastore.v1.ICreateMetadataImportRequest): google.cloud.metastore.v1.CreateMetadataImportRequest; /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsResponse.verify|verify} messages. - * @param message ListBackupsResponse message or plain object to encode + * Encodes the specified CreateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1.CreateMetadataImportRequest.verify|verify} messages. + * @param message CreateMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.ICreateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsResponse.verify|verify} messages. - * @param message ListBackupsResponse message or plain object to encode + * Encodes the specified CreateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.CreateMetadataImportRequest.verify|verify} messages. + * @param message CreateMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.ICreateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. + * Decodes a CreateMetadataImportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBackupsResponse + * @returns CreateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ListBackupsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.CreateMetadataImportRequest; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateMetadataImportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBackupsResponse + * @returns CreateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ListBackupsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.CreateMetadataImportRequest; /** - * Verifies a ListBackupsResponse message. + * Verifies a CreateMetadataImportRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBackupsResponse + * @returns CreateMetadataImportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ListBackupsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.CreateMetadataImportRequest; /** - * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. - * @param message ListBackupsResponse + * Creates a plain object from a CreateMetadataImportRequest message. Also converts values to other types if specified. + * @param message CreateMetadataImportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.CreateMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBackupsResponse to JSON. + * Converts this CreateMetadataImportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListBackupsResponse + * Gets the default type url for CreateMetadataImportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetBackupRequest. */ - interface IGetBackupRequest { + /** Properties of an UpdateMetadataImportRequest. */ + interface IUpdateMetadataImportRequest { - /** GetBackupRequest name */ - name?: (string|null); + /** UpdateMetadataImportRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateMetadataImportRequest metadataImport */ + metadataImport?: (google.cloud.metastore.v1.IMetadataImport|null); + + /** UpdateMetadataImportRequest requestId */ + requestId?: (string|null); } - /** Represents a GetBackupRequest. */ - class GetBackupRequest implements IGetBackupRequest { + /** Represents an UpdateMetadataImportRequest. */ + class UpdateMetadataImportRequest implements IUpdateMetadataImportRequest { /** - * Constructs a new GetBackupRequest. + * Constructs a new UpdateMetadataImportRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IGetBackupRequest); + constructor(properties?: google.cloud.metastore.v1.IUpdateMetadataImportRequest); - /** GetBackupRequest name. */ - public name: string; + /** UpdateMetadataImportRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateMetadataImportRequest metadataImport. */ + public metadataImport?: (google.cloud.metastore.v1.IMetadataImport|null); + + /** UpdateMetadataImportRequest requestId. */ + public requestId: string; /** - * Creates a new GetBackupRequest instance using the specified properties. + * Creates a new UpdateMetadataImportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetBackupRequest instance + * @returns UpdateMetadataImportRequest instance */ - public static create(properties?: google.cloud.metastore.v1.IGetBackupRequest): google.cloud.metastore.v1.GetBackupRequest; + public static create(properties?: google.cloud.metastore.v1.IUpdateMetadataImportRequest): google.cloud.metastore.v1.UpdateMetadataImportRequest; /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1.GetBackupRequest.verify|verify} messages. - * @param message GetBackupRequest message or plain object to encode + * Encodes the specified UpdateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1.UpdateMetadataImportRequest.verify|verify} messages. + * @param message UpdateMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IUpdateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.GetBackupRequest.verify|verify} messages. - * @param message GetBackupRequest message or plain object to encode + * Encodes the specified UpdateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.UpdateMetadataImportRequest.verify|verify} messages. + * @param message UpdateMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IUpdateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetBackupRequest message from the specified reader or buffer. + * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetBackupRequest + * @returns UpdateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.GetBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.UpdateMetadataImportRequest; /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetBackupRequest + * @returns UpdateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.GetBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.UpdateMetadataImportRequest; /** - * Verifies a GetBackupRequest message. + * Verifies an UpdateMetadataImportRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetBackupRequest + * @returns UpdateMetadataImportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.GetBackupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.UpdateMetadataImportRequest; /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. - * @param message GetBackupRequest + * Creates a plain object from an UpdateMetadataImportRequest message. Also converts values to other types if specified. + * @param message UpdateMetadataImportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.UpdateMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetBackupRequest to JSON. + * Converts this UpdateMetadataImportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetBackupRequest + * Gets the default type url for UpdateMetadataImportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateBackupRequest. */ - interface ICreateBackupRequest { + /** Properties of a ListBackupsRequest. */ + interface IListBackupsRequest { - /** CreateBackupRequest parent */ + /** ListBackupsRequest parent */ parent?: (string|null); - /** CreateBackupRequest backupId */ - backupId?: (string|null); + /** ListBackupsRequest pageSize */ + pageSize?: (number|null); - /** CreateBackupRequest backup */ - backup?: (google.cloud.metastore.v1.IBackup|null); + /** ListBackupsRequest pageToken */ + pageToken?: (string|null); - /** CreateBackupRequest requestId */ - requestId?: (string|null); + /** ListBackupsRequest filter */ + filter?: (string|null); + + /** ListBackupsRequest orderBy */ + orderBy?: (string|null); } - /** Represents a CreateBackupRequest. */ - class CreateBackupRequest implements ICreateBackupRequest { + /** Represents a ListBackupsRequest. */ + class ListBackupsRequest implements IListBackupsRequest { /** - * Constructs a new CreateBackupRequest. + * Constructs a new ListBackupsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.ICreateBackupRequest); + constructor(properties?: google.cloud.metastore.v1.IListBackupsRequest); - /** CreateBackupRequest parent. */ + /** ListBackupsRequest parent. */ public parent: string; - /** CreateBackupRequest backupId. */ - public backupId: string; + /** ListBackupsRequest pageSize. */ + public pageSize: number; - /** CreateBackupRequest backup. */ - public backup?: (google.cloud.metastore.v1.IBackup|null); + /** ListBackupsRequest pageToken. */ + public pageToken: string; - /** CreateBackupRequest requestId. */ - public requestId: string; + /** ListBackupsRequest filter. */ + public filter: string; + + /** ListBackupsRequest orderBy. */ + public orderBy: string; /** - * Creates a new CreateBackupRequest instance using the specified properties. + * Creates a new ListBackupsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateBackupRequest instance + * @returns ListBackupsRequest instance */ - public static create(properties?: google.cloud.metastore.v1.ICreateBackupRequest): google.cloud.metastore.v1.CreateBackupRequest; + public static create(properties?: google.cloud.metastore.v1.IListBackupsRequest): google.cloud.metastore.v1.ListBackupsRequest; /** - * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1.CreateBackupRequest.verify|verify} messages. - * @param message CreateBackupRequest message or plain object to encode + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.CreateBackupRequest.verify|verify} messages. - * @param message CreateBackupRequest message or plain object to encode + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateBackupRequest message from the specified reader or buffer. + * Decodes a ListBackupsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateBackupRequest + * @returns ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.CreateBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ListBackupsRequest; /** - * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateBackupRequest + * @returns ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.CreateBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ListBackupsRequest; /** - * Verifies a CreateBackupRequest message. + * Verifies a ListBackupsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateBackupRequest + * @returns ListBackupsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.CreateBackupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ListBackupsRequest; /** - * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. - * @param message CreateBackupRequest + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @param message ListBackupsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.CreateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateBackupRequest to JSON. + * Converts this ListBackupsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateBackupRequest + * Gets the default type url for ListBackupsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteBackupRequest. */ - interface IDeleteBackupRequest { + /** Properties of a ListBackupsResponse. */ + interface IListBackupsResponse { - /** DeleteBackupRequest name */ - name?: (string|null); + /** ListBackupsResponse backups */ + backups?: (google.cloud.metastore.v1.IBackup[]|null); - /** DeleteBackupRequest requestId */ - requestId?: (string|null); + /** ListBackupsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupsResponse unreachable */ + unreachable?: (string[]|null); } - /** Represents a DeleteBackupRequest. */ - class DeleteBackupRequest implements IDeleteBackupRequest { + /** Represents a ListBackupsResponse. */ + class ListBackupsResponse implements IListBackupsResponse { /** - * Constructs a new DeleteBackupRequest. + * Constructs a new ListBackupsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IDeleteBackupRequest); + constructor(properties?: google.cloud.metastore.v1.IListBackupsResponse); - /** DeleteBackupRequest name. */ - public name: string; + /** ListBackupsResponse backups. */ + public backups: google.cloud.metastore.v1.IBackup[]; - /** DeleteBackupRequest requestId. */ - public requestId: string; + /** ListBackupsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupsResponse unreachable. */ + public unreachable: string[]; /** - * Creates a new DeleteBackupRequest instance using the specified properties. + * Creates a new ListBackupsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteBackupRequest instance + * @returns ListBackupsResponse instance */ - public static create(properties?: google.cloud.metastore.v1.IDeleteBackupRequest): google.cloud.metastore.v1.DeleteBackupRequest; + public static create(properties?: google.cloud.metastore.v1.IListBackupsResponse): google.cloud.metastore.v1.ListBackupsResponse; /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1.DeleteBackupRequest.verify|verify} messages. - * @param message DeleteBackupRequest message or plain object to encode + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.DeleteBackupRequest.verify|verify} messages. - * @param message DeleteBackupRequest message or plain object to encode + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * Decodes a ListBackupsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteBackupRequest + * @returns ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.DeleteBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ListBackupsResponse; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteBackupRequest + * @returns ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.DeleteBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ListBackupsResponse; /** - * Verifies a DeleteBackupRequest message. + * Verifies a ListBackupsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteBackupRequest + * @returns ListBackupsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.DeleteBackupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ListBackupsResponse; /** - * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. - * @param message DeleteBackupRequest + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * @param message ListBackupsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteBackupRequest to JSON. + * Converts this ListBackupsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteBackupRequest + * Gets the default type url for ListBackupsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExportMetadataRequest. */ - interface IExportMetadataRequest { - - /** ExportMetadataRequest destinationGcsFolder */ - destinationGcsFolder?: (string|null); - - /** ExportMetadataRequest service */ - service?: (string|null); - - /** ExportMetadataRequest requestId */ - requestId?: (string|null); + /** Properties of a GetBackupRequest. */ + interface IGetBackupRequest { - /** ExportMetadataRequest databaseDumpType */ - databaseDumpType?: (google.cloud.metastore.v1.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1.DatabaseDumpSpec.Type|null); + /** GetBackupRequest name */ + name?: (string|null); } - /** Represents an ExportMetadataRequest. */ - class ExportMetadataRequest implements IExportMetadataRequest { + /** Represents a GetBackupRequest. */ + class GetBackupRequest implements IGetBackupRequest { /** - * Constructs a new ExportMetadataRequest. + * Constructs a new GetBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IExportMetadataRequest); - - /** ExportMetadataRequest destinationGcsFolder. */ - public destinationGcsFolder?: (string|null); - - /** ExportMetadataRequest service. */ - public service: string; - - /** ExportMetadataRequest requestId. */ - public requestId: string; - - /** ExportMetadataRequest databaseDumpType. */ - public databaseDumpType: (google.cloud.metastore.v1.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1.DatabaseDumpSpec.Type); + constructor(properties?: google.cloud.metastore.v1.IGetBackupRequest); - /** ExportMetadataRequest destination. */ - public destination?: "destinationGcsFolder"; + /** GetBackupRequest name. */ + public name: string; /** - * Creates a new ExportMetadataRequest instance using the specified properties. + * Creates a new GetBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportMetadataRequest instance + * @returns GetBackupRequest instance */ - public static create(properties?: google.cloud.metastore.v1.IExportMetadataRequest): google.cloud.metastore.v1.ExportMetadataRequest; + public static create(properties?: google.cloud.metastore.v1.IGetBackupRequest): google.cloud.metastore.v1.GetBackupRequest; /** - * Encodes the specified ExportMetadataRequest message. Does not implicitly {@link google.cloud.metastore.v1.ExportMetadataRequest.verify|verify} messages. - * @param message ExportMetadataRequest message or plain object to encode + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IExportMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportMetadataRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ExportMetadataRequest.verify|verify} messages. - * @param message ExportMetadataRequest message or plain object to encode + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IExportMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportMetadataRequest message from the specified reader or buffer. + * Decodes a GetBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportMetadataRequest + * @returns GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ExportMetadataRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.GetBackupRequest; /** - * Decodes an ExportMetadataRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportMetadataRequest + * @returns GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ExportMetadataRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.GetBackupRequest; /** - * Verifies an ExportMetadataRequest message. + * Verifies a GetBackupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExportMetadataRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportMetadataRequest + * @returns GetBackupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ExportMetadataRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.GetBackupRequest; /** - * Creates a plain object from an ExportMetadataRequest message. Also converts values to other types if specified. - * @param message ExportMetadataRequest + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @param message GetBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.ExportMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportMetadataRequest to JSON. + * Converts this GetBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExportMetadataRequest + * Gets the default type url for GetBackupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RestoreServiceRequest. */ - interface IRestoreServiceRequest { + /** Properties of a CreateBackupRequest. */ + interface ICreateBackupRequest { - /** RestoreServiceRequest service */ - service?: (string|null); + /** CreateBackupRequest parent */ + parent?: (string|null); - /** RestoreServiceRequest backup */ - backup?: (string|null); + /** CreateBackupRequest backupId */ + backupId?: (string|null); - /** RestoreServiceRequest restoreType */ - restoreType?: (google.cloud.metastore.v1.Restore.RestoreType|keyof typeof google.cloud.metastore.v1.Restore.RestoreType|null); + /** CreateBackupRequest backup */ + backup?: (google.cloud.metastore.v1.IBackup|null); - /** RestoreServiceRequest requestId */ + /** CreateBackupRequest requestId */ requestId?: (string|null); } - /** Represents a RestoreServiceRequest. */ - class RestoreServiceRequest implements IRestoreServiceRequest { + /** Represents a CreateBackupRequest. */ + class CreateBackupRequest implements ICreateBackupRequest { /** - * Constructs a new RestoreServiceRequest. + * Constructs a new CreateBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IRestoreServiceRequest); + constructor(properties?: google.cloud.metastore.v1.ICreateBackupRequest); - /** RestoreServiceRequest service. */ - public service: string; + /** CreateBackupRequest parent. */ + public parent: string; - /** RestoreServiceRequest backup. */ - public backup: string; + /** CreateBackupRequest backupId. */ + public backupId: string; - /** RestoreServiceRequest restoreType. */ - public restoreType: (google.cloud.metastore.v1.Restore.RestoreType|keyof typeof google.cloud.metastore.v1.Restore.RestoreType); + /** CreateBackupRequest backup. */ + public backup?: (google.cloud.metastore.v1.IBackup|null); - /** RestoreServiceRequest requestId. */ + /** CreateBackupRequest requestId. */ public requestId: string; /** - * Creates a new RestoreServiceRequest instance using the specified properties. + * Creates a new CreateBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RestoreServiceRequest instance + * @returns CreateBackupRequest instance */ - public static create(properties?: google.cloud.metastore.v1.IRestoreServiceRequest): google.cloud.metastore.v1.RestoreServiceRequest; + public static create(properties?: google.cloud.metastore.v1.ICreateBackupRequest): google.cloud.metastore.v1.CreateBackupRequest; /** - * Encodes the specified RestoreServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.RestoreServiceRequest.verify|verify} messages. - * @param message RestoreServiceRequest message or plain object to encode + * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1.CreateBackupRequest.verify|verify} messages. + * @param message CreateBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IRestoreServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RestoreServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.RestoreServiceRequest.verify|verify} messages. - * @param message RestoreServiceRequest message or plain object to encode + * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.CreateBackupRequest.verify|verify} messages. + * @param message CreateBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IRestoreServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RestoreServiceRequest message from the specified reader or buffer. + * Decodes a CreateBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RestoreServiceRequest + * @returns CreateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.RestoreServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.CreateBackupRequest; /** - * Decodes a RestoreServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RestoreServiceRequest + * @returns CreateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.RestoreServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.CreateBackupRequest; /** - * Verifies a RestoreServiceRequest message. + * Verifies a CreateBackupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RestoreServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RestoreServiceRequest + * @returns CreateBackupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.RestoreServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.CreateBackupRequest; /** - * Creates a plain object from a RestoreServiceRequest message. Also converts values to other types if specified. - * @param message RestoreServiceRequest + * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. + * @param message CreateBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.RestoreServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.CreateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RestoreServiceRequest to JSON. + * Converts this CreateBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RestoreServiceRequest + * Gets the default type url for CreateBackupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { - - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target */ - target?: (string|null); - - /** OperationMetadata verb */ - verb?: (string|null); - - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); + /** Properties of a DeleteBackupRequest. */ + interface IDeleteBackupRequest { - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); + /** DeleteBackupRequest name */ + name?: (string|null); - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); + /** DeleteBackupRequest requestId */ + requestId?: (string|null); } - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** Represents a DeleteBackupRequest. */ + class DeleteBackupRequest implements IDeleteBackupRequest { /** - * Constructs a new OperationMetadata. + * Constructs a new DeleteBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IOperationMetadata); - - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target. */ - public target: string; - - /** OperationMetadata verb. */ - public verb: string; - - /** OperationMetadata statusMessage. */ - public statusMessage: string; + constructor(properties?: google.cloud.metastore.v1.IDeleteBackupRequest); - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; + /** DeleteBackupRequest name. */ + public name: string; - /** OperationMetadata apiVersion. */ - public apiVersion: string; + /** DeleteBackupRequest requestId. */ + public requestId: string; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new DeleteBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OperationMetadata instance + * @returns DeleteBackupRequest instance */ - public static create(properties?: google.cloud.metastore.v1.IOperationMetadata): google.cloud.metastore.v1.OperationMetadata; + public static create(properties?: google.cloud.metastore.v1.IDeleteBackupRequest): google.cloud.metastore.v1.DeleteBackupRequest; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.metastore.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a DeleteBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperationMetadata + * @returns DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.DeleteBackupRequest; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperationMetadata + * @returns DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.DeleteBackupRequest; /** - * Verifies an OperationMetadata message. + * Verifies a DeleteBackupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperationMetadata + * @returns DeleteBackupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.DeleteBackupRequest; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * @param message DeleteBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperationMetadata to JSON. + * Converts this DeleteBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for DeleteBackupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LocationMetadata. */ - interface ILocationMetadata { + /** Properties of an ExportMetadataRequest. */ + interface IExportMetadataRequest { - /** LocationMetadata supportedHiveMetastoreVersions */ - supportedHiveMetastoreVersions?: (google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion[]|null); + /** ExportMetadataRequest destinationGcsFolder */ + destinationGcsFolder?: (string|null); + + /** ExportMetadataRequest service */ + service?: (string|null); + + /** ExportMetadataRequest requestId */ + requestId?: (string|null); + + /** ExportMetadataRequest databaseDumpType */ + databaseDumpType?: (google.cloud.metastore.v1.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1.DatabaseDumpSpec.Type|null); } - /** Represents a LocationMetadata. */ - class LocationMetadata implements ILocationMetadata { + /** Represents an ExportMetadataRequest. */ + class ExportMetadataRequest implements IExportMetadataRequest { /** - * Constructs a new LocationMetadata. + * Constructs a new ExportMetadataRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.ILocationMetadata); + constructor(properties?: google.cloud.metastore.v1.IExportMetadataRequest); - /** LocationMetadata supportedHiveMetastoreVersions. */ - public supportedHiveMetastoreVersions: google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion[]; + /** ExportMetadataRequest destinationGcsFolder. */ + public destinationGcsFolder?: (string|null); + + /** ExportMetadataRequest service. */ + public service: string; + + /** ExportMetadataRequest requestId. */ + public requestId: string; + + /** ExportMetadataRequest databaseDumpType. */ + public databaseDumpType: (google.cloud.metastore.v1.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1.DatabaseDumpSpec.Type); + + /** ExportMetadataRequest destination. */ + public destination?: "destinationGcsFolder"; /** - * Creates a new LocationMetadata instance using the specified properties. + * Creates a new ExportMetadataRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LocationMetadata instance + * @returns ExportMetadataRequest instance */ - public static create(properties?: google.cloud.metastore.v1.ILocationMetadata): google.cloud.metastore.v1.LocationMetadata; + public static create(properties?: google.cloud.metastore.v1.IExportMetadataRequest): google.cloud.metastore.v1.ExportMetadataRequest; /** - * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.verify|verify} messages. - * @param message LocationMetadata message or plain object to encode + * Encodes the specified ExportMetadataRequest message. Does not implicitly {@link google.cloud.metastore.v1.ExportMetadataRequest.verify|verify} messages. + * @param message ExportMetadataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IExportMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.verify|verify} messages. - * @param message LocationMetadata message or plain object to encode + * Encodes the specified ExportMetadataRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ExportMetadataRequest.verify|verify} messages. + * @param message ExportMetadataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IExportMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LocationMetadata message from the specified reader or buffer. + * Decodes an ExportMetadataRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LocationMetadata + * @returns ExportMetadataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.LocationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ExportMetadataRequest; /** - * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. + * Decodes an ExportMetadataRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LocationMetadata + * @returns ExportMetadataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.LocationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ExportMetadataRequest; /** - * Verifies a LocationMetadata message. + * Verifies an ExportMetadataRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ExportMetadataRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LocationMetadata + * @returns ExportMetadataRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.LocationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ExportMetadataRequest; /** - * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. - * @param message LocationMetadata + * Creates a plain object from an ExportMetadataRequest message. Also converts values to other types if specified. + * @param message ExportMetadataRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.LocationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.ExportMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LocationMetadata to JSON. + * Converts this ExportMetadataRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LocationMetadata + * Gets the default type url for ExportMetadataRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace LocationMetadata { + /** Properties of a RestoreServiceRequest. */ + interface IRestoreServiceRequest { - /** Properties of a HiveMetastoreVersion. */ - interface IHiveMetastoreVersion { + /** RestoreServiceRequest service */ + service?: (string|null); - /** HiveMetastoreVersion version */ - version?: (string|null); + /** RestoreServiceRequest backup */ + backup?: (string|null); - /** HiveMetastoreVersion isDefault */ - isDefault?: (boolean|null); - } - - /** Represents a HiveMetastoreVersion. */ - class HiveMetastoreVersion implements IHiveMetastoreVersion { - - /** - * Constructs a new HiveMetastoreVersion. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion); - - /** HiveMetastoreVersion version. */ - public version: string; - - /** HiveMetastoreVersion isDefault. */ - public isDefault: boolean; - - /** - * Creates a new HiveMetastoreVersion instance using the specified properties. - * @param [properties] Properties to set - * @returns HiveMetastoreVersion instance - */ - public static create(properties?: google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion): google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion; - - /** - * Encodes the specified HiveMetastoreVersion message. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. - * @param message HiveMetastoreVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HiveMetastoreVersion message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. - * @param message HiveMetastoreVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HiveMetastoreVersion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HiveMetastoreVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion; - - /** - * Decodes a HiveMetastoreVersion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HiveMetastoreVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion; - - /** - * Verifies a HiveMetastoreVersion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HiveMetastoreVersion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HiveMetastoreVersion - */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion; - - /** - * Creates a plain object from a HiveMetastoreVersion message. Also converts values to other types if specified. - * @param message HiveMetastoreVersion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HiveMetastoreVersion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HiveMetastoreVersion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** RestoreServiceRequest restoreType */ + restoreType?: (google.cloud.metastore.v1.Restore.RestoreType|keyof typeof google.cloud.metastore.v1.Restore.RestoreType|null); - /** Properties of a DatabaseDumpSpec. */ - interface IDatabaseDumpSpec { + /** RestoreServiceRequest requestId */ + requestId?: (string|null); } - /** Represents a DatabaseDumpSpec. */ - class DatabaseDumpSpec implements IDatabaseDumpSpec { + /** Represents a RestoreServiceRequest. */ + class RestoreServiceRequest implements IRestoreServiceRequest { /** - * Constructs a new DatabaseDumpSpec. + * Constructs a new RestoreServiceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1.IDatabaseDumpSpec); + constructor(properties?: google.cloud.metastore.v1.IRestoreServiceRequest); + + /** RestoreServiceRequest service. */ + public service: string; + + /** RestoreServiceRequest backup. */ + public backup: string; + + /** RestoreServiceRequest restoreType. */ + public restoreType: (google.cloud.metastore.v1.Restore.RestoreType|keyof typeof google.cloud.metastore.v1.Restore.RestoreType); + + /** RestoreServiceRequest requestId. */ + public requestId: string; /** - * Creates a new DatabaseDumpSpec instance using the specified properties. + * Creates a new RestoreServiceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DatabaseDumpSpec instance + * @returns RestoreServiceRequest instance */ - public static create(properties?: google.cloud.metastore.v1.IDatabaseDumpSpec): google.cloud.metastore.v1.DatabaseDumpSpec; + public static create(properties?: google.cloud.metastore.v1.IRestoreServiceRequest): google.cloud.metastore.v1.RestoreServiceRequest; /** - * Encodes the specified DatabaseDumpSpec message. Does not implicitly {@link google.cloud.metastore.v1.DatabaseDumpSpec.verify|verify} messages. - * @param message DatabaseDumpSpec message or plain object to encode + * Encodes the specified RestoreServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.RestoreServiceRequest.verify|verify} messages. + * @param message RestoreServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1.IDatabaseDumpSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1.IRestoreServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DatabaseDumpSpec message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.DatabaseDumpSpec.verify|verify} messages. - * @param message DatabaseDumpSpec message or plain object to encode + * Encodes the specified RestoreServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.RestoreServiceRequest.verify|verify} messages. + * @param message RestoreServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1.IDatabaseDumpSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1.IRestoreServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DatabaseDumpSpec message from the specified reader or buffer. + * Decodes a RestoreServiceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DatabaseDumpSpec + * @returns RestoreServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.DatabaseDumpSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.RestoreServiceRequest; /** - * Decodes a DatabaseDumpSpec message from the specified reader or buffer, length delimited. + * Decodes a RestoreServiceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DatabaseDumpSpec + * @returns RestoreServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.DatabaseDumpSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.RestoreServiceRequest; /** - * Verifies a DatabaseDumpSpec message. + * Verifies a RestoreServiceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DatabaseDumpSpec message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreServiceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DatabaseDumpSpec + * @returns RestoreServiceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.DatabaseDumpSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.RestoreServiceRequest; /** - * Creates a plain object from a DatabaseDumpSpec message. Also converts values to other types if specified. - * @param message DatabaseDumpSpec + * Creates a plain object from a RestoreServiceRequest message. Also converts values to other types if specified. + * @param message RestoreServiceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1.DatabaseDumpSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1.RestoreServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DatabaseDumpSpec to JSON. + * Converts this RestoreServiceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DatabaseDumpSpec + * Gets the default type url for RestoreServiceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace DatabaseDumpSpec { + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - MYSQL = 1, - AVRO = 2 - } - } - } + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** Namespace v1alpha. */ - namespace v1alpha { + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** Represents a DataprocMetastore */ - class DataprocMetastore extends $protobuf.rpc.Service { + /** OperationMetadata target */ + target?: (string|null); - /** - * Constructs a new DataprocMetastore service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** OperationMetadata verb */ + verb?: (string|null); - /** - * Creates new DataprocMetastore service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataprocMetastore; + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); - /** - * Calls ListServices. - * @param request ListServicesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListServicesResponse - */ - public listServices(request: google.cloud.metastore.v1alpha.IListServicesRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.ListServicesCallback): void; + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); - /** - * Calls ListServices. - * @param request ListServicesRequest message or plain object - * @returns Promise - */ - public listServices(request: google.cloud.metastore.v1alpha.IListServicesRequest): Promise; + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } - /** - * Calls GetService. - * @param request GetServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Service - */ - public getService(request: google.cloud.metastore.v1alpha.IGetServiceRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.GetServiceCallback): void; + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { /** - * Calls GetService. - * @param request GetServiceRequest message or plain object - * @returns Promise + * Constructs a new OperationMetadata. + * @param [properties] Properties to set */ - public getService(request: google.cloud.metastore.v1alpha.IGetServiceRequest): Promise; + constructor(properties?: google.cloud.metastore.v1.IOperationMetadata); - /** - * Calls CreateService. - * @param request CreateServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createService(request: google.cloud.metastore.v1alpha.ICreateServiceRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.CreateServiceCallback): void; + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** - * Calls CreateService. - * @param request CreateServiceRequest message or plain object - * @returns Promise - */ - public createService(request: google.cloud.metastore.v1alpha.ICreateServiceRequest): Promise; + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** - * Calls UpdateService. - * @param request UpdateServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateService(request: google.cloud.metastore.v1alpha.IUpdateServiceRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.UpdateServiceCallback): void; + /** OperationMetadata target. */ + public target: string; - /** - * Calls UpdateService. - * @param request UpdateServiceRequest message or plain object - * @returns Promise - */ - public updateService(request: google.cloud.metastore.v1alpha.IUpdateServiceRequest): Promise; + /** OperationMetadata verb. */ + public verb: string; - /** - * Calls DeleteService. - * @param request DeleteServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteService(request: google.cloud.metastore.v1alpha.IDeleteServiceRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.DeleteServiceCallback): void; + /** OperationMetadata statusMessage. */ + public statusMessage: string; - /** - * Calls DeleteService. - * @param request DeleteServiceRequest message or plain object - * @returns Promise - */ - public deleteService(request: google.cloud.metastore.v1alpha.IDeleteServiceRequest): Promise; + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; - /** - * Calls ListMetadataImports. - * @param request ListMetadataImportsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMetadataImportsResponse - */ - public listMetadataImports(request: google.cloud.metastore.v1alpha.IListMetadataImportsRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImportsCallback): void; + /** OperationMetadata apiVersion. */ + public apiVersion: string; /** - * Calls ListMetadataImports. - * @param request ListMetadataImportsRequest message or plain object - * @returns Promise + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance */ - public listMetadataImports(request: google.cloud.metastore.v1alpha.IListMetadataImportsRequest): Promise; + public static create(properties?: google.cloud.metastore.v1.IOperationMetadata): google.cloud.metastore.v1.OperationMetadata; /** - * Calls GetMetadataImport. - * @param request GetMetadataImportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MetadataImport + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.metastore.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getMetadataImport(request: google.cloud.metastore.v1alpha.IGetMetadataImportRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.GetMetadataImportCallback): void; + public static encode(message: google.cloud.metastore.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetMetadataImport. - * @param request GetMetadataImportRequest message or plain object - * @returns Promise + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getMetadataImport(request: google.cloud.metastore.v1alpha.IGetMetadataImportRequest): Promise; + public static encodeDelimited(message: google.cloud.metastore.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateMetadataImport. - * @param request CreateMetadataImportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createMetadataImport(request: google.cloud.metastore.v1alpha.ICreateMetadataImportRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.CreateMetadataImportCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.OperationMetadata; /** - * Calls CreateMetadataImport. - * @param request CreateMetadataImportRequest message or plain object - * @returns Promise + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createMetadataImport(request: google.cloud.metastore.v1alpha.ICreateMetadataImportRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.OperationMetadata; /** - * Calls UpdateMetadataImport. - * @param request UpdateMetadataImportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateMetadataImport(request: google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.UpdateMetadataImportCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateMetadataImport. - * @param request UpdateMetadataImportRequest message or plain object - * @returns Promise + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata */ - public updateMetadataImport(request: google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.OperationMetadata; /** - * Calls ExportMetadata. - * @param request ExportMetadataRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object */ - public exportMetadata(request: google.cloud.metastore.v1alpha.IExportMetadataRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.ExportMetadataCallback): void; + public static toObject(message: google.cloud.metastore.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ExportMetadata. - * @param request ExportMetadataRequest message or plain object - * @returns Promise + * Converts this OperationMetadata to JSON. + * @returns JSON object */ - public exportMetadata(request: google.cloud.metastore.v1alpha.IExportMetadataRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls RestoreService. - * @param request RestoreServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public restoreService(request: google.cloud.metastore.v1alpha.IRestoreServiceRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.RestoreServiceCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Calls RestoreService. - * @param request RestoreServiceRequest message or plain object - * @returns Promise - */ - public restoreService(request: google.cloud.metastore.v1alpha.IRestoreServiceRequest): Promise; + /** Properties of a LocationMetadata. */ + interface ILocationMetadata { - /** - * Calls ListBackups. - * @param request ListBackupsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupsResponse - */ - public listBackups(request: google.cloud.metastore.v1alpha.IListBackupsRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.ListBackupsCallback): void; + /** LocationMetadata supportedHiveMetastoreVersions */ + supportedHiveMetastoreVersions?: (google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion[]|null); + } - /** - * Calls ListBackups. - * @param request ListBackupsRequest message or plain object - * @returns Promise - */ - public listBackups(request: google.cloud.metastore.v1alpha.IListBackupsRequest): Promise; + /** Represents a LocationMetadata. */ + class LocationMetadata implements ILocationMetadata { /** - * Calls GetBackup. - * @param request GetBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Backup + * Constructs a new LocationMetadata. + * @param [properties] Properties to set */ - public getBackup(request: google.cloud.metastore.v1alpha.IGetBackupRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.GetBackupCallback): void; + constructor(properties?: google.cloud.metastore.v1.ILocationMetadata); - /** - * Calls GetBackup. - * @param request GetBackupRequest message or plain object - * @returns Promise - */ - public getBackup(request: google.cloud.metastore.v1alpha.IGetBackupRequest): Promise; + /** LocationMetadata supportedHiveMetastoreVersions. */ + public supportedHiveMetastoreVersions: google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion[]; /** - * Calls CreateBackup. - * @param request CreateBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a new LocationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationMetadata instance */ - public createBackup(request: google.cloud.metastore.v1alpha.ICreateBackupRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.CreateBackupCallback): void; + public static create(properties?: google.cloud.metastore.v1.ILocationMetadata): google.cloud.metastore.v1.LocationMetadata; /** - * Calls CreateBackup. - * @param request CreateBackupRequest message or plain object - * @returns Promise + * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.verify|verify} messages. + * @param message LocationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createBackup(request: google.cloud.metastore.v1alpha.ICreateBackupRequest): Promise; + public static encode(message: google.cloud.metastore.v1.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteBackup. - * @param request DeleteBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.verify|verify} messages. + * @param message LocationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteBackup(request: google.cloud.metastore.v1alpha.IDeleteBackupRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.DeleteBackupCallback): void; + public static encodeDelimited(message: google.cloud.metastore.v1.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteBackup. - * @param request DeleteBackupRequest message or plain object - * @returns Promise + * Decodes a LocationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteBackup(request: google.cloud.metastore.v1alpha.IDeleteBackupRequest): Promise; - } - - namespace DataprocMetastore { + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.LocationMetadata; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|listServices}. - * @param error Error, if any - * @param [response] ListServicesResponse + * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListServicesCallback = (error: (Error|null), response?: google.cloud.metastore.v1alpha.ListServicesResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.LocationMetadata; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|getService}. - * @param error Error, if any - * @param [response] Service + * Verifies a LocationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetServiceCallback = (error: (Error|null), response?: google.cloud.metastore.v1alpha.Service) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|createService}. - * @param error Error, if any - * @param [response] Operation + * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationMetadata */ - type CreateServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.LocationMetadata; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|updateService}. - * @param error Error, if any - * @param [response] Operation + * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. + * @param message LocationMetadata + * @param [options] Conversion options + * @returns Plain object */ - type UpdateServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static toObject(message: google.cloud.metastore.v1.LocationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|deleteService}. - * @param error Error, if any - * @param [response] Operation + * Converts this LocationMetadata to JSON. + * @returns JSON object */ - type DeleteServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|listMetadataImports}. - * @param error Error, if any - * @param [response] ListMetadataImportsResponse + * Gets the default type url for LocationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LocationMetadata { + + /** Properties of a HiveMetastoreVersion. */ + interface IHiveMetastoreVersion { + + /** HiveMetastoreVersion version */ + version?: (string|null); + + /** HiveMetastoreVersion isDefault */ + isDefault?: (boolean|null); + } + + /** Represents a HiveMetastoreVersion. */ + class HiveMetastoreVersion implements IHiveMetastoreVersion { + + /** + * Constructs a new HiveMetastoreVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion); + + /** HiveMetastoreVersion version. */ + public version: string; + + /** HiveMetastoreVersion isDefault. */ + public isDefault: boolean; + + /** + * Creates a new HiveMetastoreVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns HiveMetastoreVersion instance + */ + public static create(properties?: google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion): google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion; + + /** + * Encodes the specified HiveMetastoreVersion message. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. + * @param message HiveMetastoreVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HiveMetastoreVersion message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. + * @param message HiveMetastoreVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HiveMetastoreVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HiveMetastoreVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion; + + /** + * Decodes a HiveMetastoreVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HiveMetastoreVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion; + + /** + * Verifies a HiveMetastoreVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HiveMetastoreVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HiveMetastoreVersion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion; + + /** + * Creates a plain object from a HiveMetastoreVersion message. Also converts values to other types if specified. + * @param message HiveMetastoreVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HiveMetastoreVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HiveMetastoreVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DatabaseDumpSpec. */ + interface IDatabaseDumpSpec { + } + + /** Represents a DatabaseDumpSpec. */ + class DatabaseDumpSpec implements IDatabaseDumpSpec { + + /** + * Constructs a new DatabaseDumpSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1.IDatabaseDumpSpec); + + /** + * Creates a new DatabaseDumpSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseDumpSpec instance + */ + public static create(properties?: google.cloud.metastore.v1.IDatabaseDumpSpec): google.cloud.metastore.v1.DatabaseDumpSpec; + + /** + * Encodes the specified DatabaseDumpSpec message. Does not implicitly {@link google.cloud.metastore.v1.DatabaseDumpSpec.verify|verify} messages. + * @param message DatabaseDumpSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1.IDatabaseDumpSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseDumpSpec message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.DatabaseDumpSpec.verify|verify} messages. + * @param message DatabaseDumpSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1.IDatabaseDumpSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseDumpSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseDumpSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.DatabaseDumpSpec; + + /** + * Decodes a DatabaseDumpSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseDumpSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.DatabaseDumpSpec; + + /** + * Verifies a DatabaseDumpSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseDumpSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseDumpSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.DatabaseDumpSpec; + + /** + * Creates a plain object from a DatabaseDumpSpec message. Also converts values to other types if specified. + * @param message DatabaseDumpSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1.DatabaseDumpSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseDumpSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseDumpSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DatabaseDumpSpec { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + MYSQL = 1, + AVRO = 2 + } + } + + /** Represents a DataprocMetastoreFederation */ + class DataprocMetastoreFederation extends $protobuf.rpc.Service { + + /** + * Constructs a new DataprocMetastoreFederation service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new DataprocMetastoreFederation service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataprocMetastoreFederation; + + /** + * Calls ListFederations. + * @param request ListFederationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFederationsResponse + */ + public listFederations(request: google.cloud.metastore.v1.IListFederationsRequest, callback: google.cloud.metastore.v1.DataprocMetastoreFederation.ListFederationsCallback): void; + + /** + * Calls ListFederations. + * @param request ListFederationsRequest message or plain object + * @returns Promise + */ + public listFederations(request: google.cloud.metastore.v1.IListFederationsRequest): Promise; + + /** + * Calls GetFederation. + * @param request GetFederationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Federation + */ + public getFederation(request: google.cloud.metastore.v1.IGetFederationRequest, callback: google.cloud.metastore.v1.DataprocMetastoreFederation.GetFederationCallback): void; + + /** + * Calls GetFederation. + * @param request GetFederationRequest message or plain object + * @returns Promise + */ + public getFederation(request: google.cloud.metastore.v1.IGetFederationRequest): Promise; + + /** + * Calls CreateFederation. + * @param request CreateFederationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createFederation(request: google.cloud.metastore.v1.ICreateFederationRequest, callback: google.cloud.metastore.v1.DataprocMetastoreFederation.CreateFederationCallback): void; + + /** + * Calls CreateFederation. + * @param request CreateFederationRequest message or plain object + * @returns Promise + */ + public createFederation(request: google.cloud.metastore.v1.ICreateFederationRequest): Promise; + + /** + * Calls UpdateFederation. + * @param request UpdateFederationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateFederation(request: google.cloud.metastore.v1.IUpdateFederationRequest, callback: google.cloud.metastore.v1.DataprocMetastoreFederation.UpdateFederationCallback): void; + + /** + * Calls UpdateFederation. + * @param request UpdateFederationRequest message or plain object + * @returns Promise + */ + public updateFederation(request: google.cloud.metastore.v1.IUpdateFederationRequest): Promise; + + /** + * Calls DeleteFederation. + * @param request DeleteFederationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteFederation(request: google.cloud.metastore.v1.IDeleteFederationRequest, callback: google.cloud.metastore.v1.DataprocMetastoreFederation.DeleteFederationCallback): void; + + /** + * Calls DeleteFederation. + * @param request DeleteFederationRequest message or plain object + * @returns Promise + */ + public deleteFederation(request: google.cloud.metastore.v1.IDeleteFederationRequest): Promise; + } + + namespace DataprocMetastoreFederation { + + /** + * Callback as used by {@link google.cloud.metastore.v1.DataprocMetastoreFederation|listFederations}. + * @param error Error, if any + * @param [response] ListFederationsResponse + */ + type ListFederationsCallback = (error: (Error|null), response?: google.cloud.metastore.v1.ListFederationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1.DataprocMetastoreFederation|getFederation}. + * @param error Error, if any + * @param [response] Federation + */ + type GetFederationCallback = (error: (Error|null), response?: google.cloud.metastore.v1.Federation) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1.DataprocMetastoreFederation|createFederation}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateFederationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1.DataprocMetastoreFederation|updateFederation}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateFederationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1.DataprocMetastoreFederation|deleteFederation}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteFederationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a Federation. */ + interface IFederation { + + /** Federation name */ + name?: (string|null); + + /** Federation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Federation updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Federation labels */ + labels?: ({ [k: string]: string }|null); + + /** Federation version */ + version?: (string|null); + + /** Federation backendMetastores */ + backendMetastores?: ({ [k: string]: google.cloud.metastore.v1.IBackendMetastore }|null); + + /** Federation endpointUri */ + endpointUri?: (string|null); + + /** Federation state */ + state?: (google.cloud.metastore.v1.Federation.State|keyof typeof google.cloud.metastore.v1.Federation.State|null); + + /** Federation stateMessage */ + stateMessage?: (string|null); + + /** Federation uid */ + uid?: (string|null); + } + + /** Represents a Federation. */ + class Federation implements IFederation { + + /** + * Constructs a new Federation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1.IFederation); + + /** Federation name. */ + public name: string; + + /** Federation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Federation updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Federation labels. */ + public labels: { [k: string]: string }; + + /** Federation version. */ + public version: string; + + /** Federation backendMetastores. */ + public backendMetastores: { [k: string]: google.cloud.metastore.v1.IBackendMetastore }; + + /** Federation endpointUri. */ + public endpointUri: string; + + /** Federation state. */ + public state: (google.cloud.metastore.v1.Federation.State|keyof typeof google.cloud.metastore.v1.Federation.State); + + /** Federation stateMessage. */ + public stateMessage: string; + + /** Federation uid. */ + public uid: string; + + /** + * Creates a new Federation instance using the specified properties. + * @param [properties] Properties to set + * @returns Federation instance + */ + public static create(properties?: google.cloud.metastore.v1.IFederation): google.cloud.metastore.v1.Federation; + + /** + * Encodes the specified Federation message. Does not implicitly {@link google.cloud.metastore.v1.Federation.verify|verify} messages. + * @param message Federation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1.IFederation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Federation message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.Federation.verify|verify} messages. + * @param message Federation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1.IFederation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Federation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Federation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.Federation; + + /** + * Decodes a Federation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Federation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.Federation; + + /** + * Verifies a Federation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Federation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Federation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.Federation; + + /** + * Creates a plain object from a Federation message. Also converts values to other types if specified. + * @param message Federation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1.Federation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Federation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Federation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Federation { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + UPDATING = 3, + DELETING = 4, + ERROR = 5 + } + } + + /** Properties of a BackendMetastore. */ + interface IBackendMetastore { + + /** BackendMetastore name */ + name?: (string|null); + + /** BackendMetastore metastoreType */ + metastoreType?: (google.cloud.metastore.v1.BackendMetastore.MetastoreType|keyof typeof google.cloud.metastore.v1.BackendMetastore.MetastoreType|null); + } + + /** Represents a BackendMetastore. */ + class BackendMetastore implements IBackendMetastore { + + /** + * Constructs a new BackendMetastore. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1.IBackendMetastore); + + /** BackendMetastore name. */ + public name: string; + + /** BackendMetastore metastoreType. */ + public metastoreType: (google.cloud.metastore.v1.BackendMetastore.MetastoreType|keyof typeof google.cloud.metastore.v1.BackendMetastore.MetastoreType); + + /** + * Creates a new BackendMetastore instance using the specified properties. + * @param [properties] Properties to set + * @returns BackendMetastore instance + */ + public static create(properties?: google.cloud.metastore.v1.IBackendMetastore): google.cloud.metastore.v1.BackendMetastore; + + /** + * Encodes the specified BackendMetastore message. Does not implicitly {@link google.cloud.metastore.v1.BackendMetastore.verify|verify} messages. + * @param message BackendMetastore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1.IBackendMetastore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackendMetastore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.BackendMetastore.verify|verify} messages. + * @param message BackendMetastore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1.IBackendMetastore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackendMetastore message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackendMetastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.BackendMetastore; + + /** + * Decodes a BackendMetastore message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackendMetastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.BackendMetastore; + + /** + * Verifies a BackendMetastore message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackendMetastore message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackendMetastore + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.BackendMetastore; + + /** + * Creates a plain object from a BackendMetastore message. Also converts values to other types if specified. + * @param message BackendMetastore + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1.BackendMetastore, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackendMetastore to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackendMetastore + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackendMetastore { + + /** MetastoreType enum. */ + enum MetastoreType { + METASTORE_TYPE_UNSPECIFIED = 0, + DATAPROC_METASTORE = 3 + } + } + + /** Properties of a ListFederationsRequest. */ + interface IListFederationsRequest { + + /** ListFederationsRequest parent */ + parent?: (string|null); + + /** ListFederationsRequest pageSize */ + pageSize?: (number|null); + + /** ListFederationsRequest pageToken */ + pageToken?: (string|null); + + /** ListFederationsRequest filter */ + filter?: (string|null); + + /** ListFederationsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListFederationsRequest. */ + class ListFederationsRequest implements IListFederationsRequest { + + /** + * Constructs a new ListFederationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1.IListFederationsRequest); + + /** ListFederationsRequest parent. */ + public parent: string; + + /** ListFederationsRequest pageSize. */ + public pageSize: number; + + /** ListFederationsRequest pageToken. */ + public pageToken: string; + + /** ListFederationsRequest filter. */ + public filter: string; + + /** ListFederationsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListFederationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFederationsRequest instance + */ + public static create(properties?: google.cloud.metastore.v1.IListFederationsRequest): google.cloud.metastore.v1.ListFederationsRequest; + + /** + * Encodes the specified ListFederationsRequest message. Does not implicitly {@link google.cloud.metastore.v1.ListFederationsRequest.verify|verify} messages. + * @param message ListFederationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1.IListFederationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFederationsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListFederationsRequest.verify|verify} messages. + * @param message ListFederationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1.IListFederationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFederationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFederationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ListFederationsRequest; + + /** + * Decodes a ListFederationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFederationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ListFederationsRequest; + + /** + * Verifies a ListFederationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFederationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFederationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ListFederationsRequest; + + /** + * Creates a plain object from a ListFederationsRequest message. Also converts values to other types if specified. + * @param message ListFederationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1.ListFederationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFederationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFederationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFederationsResponse. */ + interface IListFederationsResponse { + + /** ListFederationsResponse federations */ + federations?: (google.cloud.metastore.v1.IFederation[]|null); + + /** ListFederationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListFederationsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListFederationsResponse. */ + class ListFederationsResponse implements IListFederationsResponse { + + /** + * Constructs a new ListFederationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1.IListFederationsResponse); + + /** ListFederationsResponse federations. */ + public federations: google.cloud.metastore.v1.IFederation[]; + + /** ListFederationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListFederationsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListFederationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFederationsResponse instance + */ + public static create(properties?: google.cloud.metastore.v1.IListFederationsResponse): google.cloud.metastore.v1.ListFederationsResponse; + + /** + * Encodes the specified ListFederationsResponse message. Does not implicitly {@link google.cloud.metastore.v1.ListFederationsResponse.verify|verify} messages. + * @param message ListFederationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1.IListFederationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFederationsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListFederationsResponse.verify|verify} messages. + * @param message ListFederationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1.IListFederationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFederationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFederationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.ListFederationsResponse; + + /** + * Decodes a ListFederationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFederationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.ListFederationsResponse; + + /** + * Verifies a ListFederationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFederationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFederationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ListFederationsResponse; + + /** + * Creates a plain object from a ListFederationsResponse message. Also converts values to other types if specified. + * @param message ListFederationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1.ListFederationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFederationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFederationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetFederationRequest. */ + interface IGetFederationRequest { + + /** GetFederationRequest name */ + name?: (string|null); + } + + /** Represents a GetFederationRequest. */ + class GetFederationRequest implements IGetFederationRequest { + + /** + * Constructs a new GetFederationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1.IGetFederationRequest); + + /** GetFederationRequest name. */ + public name: string; + + /** + * Creates a new GetFederationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFederationRequest instance + */ + public static create(properties?: google.cloud.metastore.v1.IGetFederationRequest): google.cloud.metastore.v1.GetFederationRequest; + + /** + * Encodes the specified GetFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1.GetFederationRequest.verify|verify} messages. + * @param message GetFederationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1.IGetFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.GetFederationRequest.verify|verify} messages. + * @param message GetFederationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1.IGetFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetFederationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFederationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.GetFederationRequest; + + /** + * Decodes a GetFederationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetFederationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.GetFederationRequest; + + /** + * Verifies a GetFederationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetFederationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFederationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.GetFederationRequest; + + /** + * Creates a plain object from a GetFederationRequest message. Also converts values to other types if specified. + * @param message GetFederationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1.GetFederationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetFederationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetFederationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateFederationRequest. */ + interface ICreateFederationRequest { + + /** CreateFederationRequest parent */ + parent?: (string|null); + + /** CreateFederationRequest federationId */ + federationId?: (string|null); + + /** CreateFederationRequest federation */ + federation?: (google.cloud.metastore.v1.IFederation|null); + + /** CreateFederationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateFederationRequest. */ + class CreateFederationRequest implements ICreateFederationRequest { + + /** + * Constructs a new CreateFederationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1.ICreateFederationRequest); + + /** CreateFederationRequest parent. */ + public parent: string; + + /** CreateFederationRequest federationId. */ + public federationId: string; + + /** CreateFederationRequest federation. */ + public federation?: (google.cloud.metastore.v1.IFederation|null); + + /** CreateFederationRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateFederationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateFederationRequest instance + */ + public static create(properties?: google.cloud.metastore.v1.ICreateFederationRequest): google.cloud.metastore.v1.CreateFederationRequest; + + /** + * Encodes the specified CreateFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1.CreateFederationRequest.verify|verify} messages. + * @param message CreateFederationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1.ICreateFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.CreateFederationRequest.verify|verify} messages. + * @param message CreateFederationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1.ICreateFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateFederationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateFederationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.CreateFederationRequest; + + /** + * Decodes a CreateFederationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateFederationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.CreateFederationRequest; + + /** + * Verifies a CreateFederationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateFederationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateFederationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.CreateFederationRequest; + + /** + * Creates a plain object from a CreateFederationRequest message. Also converts values to other types if specified. + * @param message CreateFederationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1.CreateFederationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateFederationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateFederationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFederationRequest. */ + interface IUpdateFederationRequest { + + /** UpdateFederationRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateFederationRequest federation */ + federation?: (google.cloud.metastore.v1.IFederation|null); + + /** UpdateFederationRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateFederationRequest. */ + class UpdateFederationRequest implements IUpdateFederationRequest { + + /** + * Constructs a new UpdateFederationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1.IUpdateFederationRequest); + + /** UpdateFederationRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateFederationRequest federation. */ + public federation?: (google.cloud.metastore.v1.IFederation|null); + + /** UpdateFederationRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateFederationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFederationRequest instance + */ + public static create(properties?: google.cloud.metastore.v1.IUpdateFederationRequest): google.cloud.metastore.v1.UpdateFederationRequest; + + /** + * Encodes the specified UpdateFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1.UpdateFederationRequest.verify|verify} messages. + * @param message UpdateFederationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1.IUpdateFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.UpdateFederationRequest.verify|verify} messages. + * @param message UpdateFederationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1.IUpdateFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateFederationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFederationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.UpdateFederationRequest; + + /** + * Decodes an UpdateFederationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFederationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.UpdateFederationRequest; + + /** + * Verifies an UpdateFederationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateFederationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFederationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.UpdateFederationRequest; + + /** + * Creates a plain object from an UpdateFederationRequest message. Also converts values to other types if specified. + * @param message UpdateFederationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1.UpdateFederationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateFederationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFederationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteFederationRequest. */ + interface IDeleteFederationRequest { + + /** DeleteFederationRequest name */ + name?: (string|null); + + /** DeleteFederationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteFederationRequest. */ + class DeleteFederationRequest implements IDeleteFederationRequest { + + /** + * Constructs a new DeleteFederationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1.IDeleteFederationRequest); + + /** DeleteFederationRequest name. */ + public name: string; + + /** DeleteFederationRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteFederationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFederationRequest instance + */ + public static create(properties?: google.cloud.metastore.v1.IDeleteFederationRequest): google.cloud.metastore.v1.DeleteFederationRequest; + + /** + * Encodes the specified DeleteFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1.DeleteFederationRequest.verify|verify} messages. + * @param message DeleteFederationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1.IDeleteFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.DeleteFederationRequest.verify|verify} messages. + * @param message DeleteFederationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1.IDeleteFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFederationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFederationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1.DeleteFederationRequest; + + /** + * Decodes a DeleteFederationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFederationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1.DeleteFederationRequest; + + /** + * Verifies a DeleteFederationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteFederationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFederationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.DeleteFederationRequest; + + /** + * Creates a plain object from a DeleteFederationRequest message. Also converts values to other types if specified. + * @param message DeleteFederationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1.DeleteFederationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFederationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFederationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace v1alpha. */ + namespace v1alpha { + + /** Represents a DataprocMetastore */ + class DataprocMetastore extends $protobuf.rpc.Service { + + /** + * Constructs a new DataprocMetastore service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new DataprocMetastore service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataprocMetastore; + + /** + * Calls ListServices. + * @param request ListServicesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListServicesResponse + */ + public listServices(request: google.cloud.metastore.v1alpha.IListServicesRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.ListServicesCallback): void; + + /** + * Calls ListServices. + * @param request ListServicesRequest message or plain object + * @returns Promise + */ + public listServices(request: google.cloud.metastore.v1alpha.IListServicesRequest): Promise; + + /** + * Calls GetService. + * @param request GetServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Service + */ + public getService(request: google.cloud.metastore.v1alpha.IGetServiceRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.GetServiceCallback): void; + + /** + * Calls GetService. + * @param request GetServiceRequest message or plain object + * @returns Promise + */ + public getService(request: google.cloud.metastore.v1alpha.IGetServiceRequest): Promise; + + /** + * Calls CreateService. + * @param request CreateServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createService(request: google.cloud.metastore.v1alpha.ICreateServiceRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.CreateServiceCallback): void; + + /** + * Calls CreateService. + * @param request CreateServiceRequest message or plain object + * @returns Promise + */ + public createService(request: google.cloud.metastore.v1alpha.ICreateServiceRequest): Promise; + + /** + * Calls UpdateService. + * @param request UpdateServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateService(request: google.cloud.metastore.v1alpha.IUpdateServiceRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.UpdateServiceCallback): void; + + /** + * Calls UpdateService. + * @param request UpdateServiceRequest message or plain object + * @returns Promise + */ + public updateService(request: google.cloud.metastore.v1alpha.IUpdateServiceRequest): Promise; + + /** + * Calls DeleteService. + * @param request DeleteServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteService(request: google.cloud.metastore.v1alpha.IDeleteServiceRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.DeleteServiceCallback): void; + + /** + * Calls DeleteService. + * @param request DeleteServiceRequest message or plain object + * @returns Promise + */ + public deleteService(request: google.cloud.metastore.v1alpha.IDeleteServiceRequest): Promise; + + /** + * Calls ListMetadataImports. + * @param request ListMetadataImportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMetadataImportsResponse + */ + public listMetadataImports(request: google.cloud.metastore.v1alpha.IListMetadataImportsRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImportsCallback): void; + + /** + * Calls ListMetadataImports. + * @param request ListMetadataImportsRequest message or plain object + * @returns Promise + */ + public listMetadataImports(request: google.cloud.metastore.v1alpha.IListMetadataImportsRequest): Promise; + + /** + * Calls GetMetadataImport. + * @param request GetMetadataImportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MetadataImport + */ + public getMetadataImport(request: google.cloud.metastore.v1alpha.IGetMetadataImportRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.GetMetadataImportCallback): void; + + /** + * Calls GetMetadataImport. + * @param request GetMetadataImportRequest message or plain object + * @returns Promise + */ + public getMetadataImport(request: google.cloud.metastore.v1alpha.IGetMetadataImportRequest): Promise; + + /** + * Calls CreateMetadataImport. + * @param request CreateMetadataImportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createMetadataImport(request: google.cloud.metastore.v1alpha.ICreateMetadataImportRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.CreateMetadataImportCallback): void; + + /** + * Calls CreateMetadataImport. + * @param request CreateMetadataImportRequest message or plain object + * @returns Promise + */ + public createMetadataImport(request: google.cloud.metastore.v1alpha.ICreateMetadataImportRequest): Promise; + + /** + * Calls UpdateMetadataImport. + * @param request UpdateMetadataImportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateMetadataImport(request: google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.UpdateMetadataImportCallback): void; + + /** + * Calls UpdateMetadataImport. + * @param request UpdateMetadataImportRequest message or plain object + * @returns Promise + */ + public updateMetadataImport(request: google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest): Promise; + + /** + * Calls ExportMetadata. + * @param request ExportMetadataRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public exportMetadata(request: google.cloud.metastore.v1alpha.IExportMetadataRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.ExportMetadataCallback): void; + + /** + * Calls ExportMetadata. + * @param request ExportMetadataRequest message or plain object + * @returns Promise + */ + public exportMetadata(request: google.cloud.metastore.v1alpha.IExportMetadataRequest): Promise; + + /** + * Calls RestoreService. + * @param request RestoreServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public restoreService(request: google.cloud.metastore.v1alpha.IRestoreServiceRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.RestoreServiceCallback): void; + + /** + * Calls RestoreService. + * @param request RestoreServiceRequest message or plain object + * @returns Promise + */ + public restoreService(request: google.cloud.metastore.v1alpha.IRestoreServiceRequest): Promise; + + /** + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupsResponse + */ + public listBackups(request: google.cloud.metastore.v1alpha.IListBackupsRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.ListBackupsCallback): void; + + /** + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @returns Promise + */ + public listBackups(request: google.cloud.metastore.v1alpha.IListBackupsRequest): Promise; + + /** + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Backup + */ + public getBackup(request: google.cloud.metastore.v1alpha.IGetBackupRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.GetBackupCallback): void; + + /** + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @returns Promise + */ + public getBackup(request: google.cloud.metastore.v1alpha.IGetBackupRequest): Promise; + + /** + * Calls CreateBackup. + * @param request CreateBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackup(request: google.cloud.metastore.v1alpha.ICreateBackupRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.CreateBackupCallback): void; + + /** + * Calls CreateBackup. + * @param request CreateBackupRequest message or plain object + * @returns Promise + */ + public createBackup(request: google.cloud.metastore.v1alpha.ICreateBackupRequest): Promise; + + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackup(request: google.cloud.metastore.v1alpha.IDeleteBackupRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastore.DeleteBackupCallback): void; + + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @returns Promise + */ + public deleteBackup(request: google.cloud.metastore.v1alpha.IDeleteBackupRequest): Promise; + } + + namespace DataprocMetastore { + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|listServices}. + * @param error Error, if any + * @param [response] ListServicesResponse + */ + type ListServicesCallback = (error: (Error|null), response?: google.cloud.metastore.v1alpha.ListServicesResponse) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|getService}. + * @param error Error, if any + * @param [response] Service + */ + type GetServiceCallback = (error: (Error|null), response?: google.cloud.metastore.v1alpha.Service) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|createService}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|updateService}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|deleteService}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|listMetadataImports}. + * @param error Error, if any + * @param [response] ListMetadataImportsResponse */ type ListMetadataImportsCallback = (error: (Error|null), response?: google.cloud.metastore.v1alpha.ListMetadataImportsResponse) => void; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|getMetadataImport}. - * @param error Error, if any - * @param [response] MetadataImport + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|getMetadataImport}. + * @param error Error, if any + * @param [response] MetadataImport + */ + type GetMetadataImportCallback = (error: (Error|null), response?: google.cloud.metastore.v1alpha.MetadataImport) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|createMetadataImport}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateMetadataImportCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|updateMetadataImport}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateMetadataImportCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|exportMetadata}. + * @param error Error, if any + * @param [response] Operation + */ + type ExportMetadataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|restoreService}. + * @param error Error, if any + * @param [response] Operation + */ + type RestoreServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|listBackups}. + * @param error Error, if any + * @param [response] ListBackupsResponse + */ + type ListBackupsCallback = (error: (Error|null), response?: google.cloud.metastore.v1alpha.ListBackupsResponse) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|getBackup}. + * @param error Error, if any + * @param [response] Backup + */ + type GetBackupCallback = (error: (Error|null), response?: google.cloud.metastore.v1alpha.Backup) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|createBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|deleteBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a Service. */ + interface IService { + + /** Service hiveMetastoreConfig */ + hiveMetastoreConfig?: (google.cloud.metastore.v1alpha.IHiveMetastoreConfig|null); + + /** Service name */ + name?: (string|null); + + /** Service createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Service updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Service labels */ + labels?: ({ [k: string]: string }|null); + + /** Service network */ + network?: (string|null); + + /** Service endpointUri */ + endpointUri?: (string|null); + + /** Service port */ + port?: (number|null); + + /** Service state */ + state?: (google.cloud.metastore.v1alpha.Service.State|keyof typeof google.cloud.metastore.v1alpha.Service.State|null); + + /** Service stateMessage */ + stateMessage?: (string|null); + + /** Service artifactGcsUri */ + artifactGcsUri?: (string|null); + + /** Service tier */ + tier?: (google.cloud.metastore.v1alpha.Service.Tier|keyof typeof google.cloud.metastore.v1alpha.Service.Tier|null); + + /** Service metadataIntegration */ + metadataIntegration?: (google.cloud.metastore.v1alpha.IMetadataIntegration|null); + + /** Service maintenanceWindow */ + maintenanceWindow?: (google.cloud.metastore.v1alpha.IMaintenanceWindow|null); + + /** Service uid */ + uid?: (string|null); + + /** Service metadataManagementActivity */ + metadataManagementActivity?: (google.cloud.metastore.v1alpha.IMetadataManagementActivity|null); + + /** Service releaseChannel */ + releaseChannel?: (google.cloud.metastore.v1alpha.Service.ReleaseChannel|keyof typeof google.cloud.metastore.v1alpha.Service.ReleaseChannel|null); + + /** Service encryptionConfig */ + encryptionConfig?: (google.cloud.metastore.v1alpha.IEncryptionConfig|null); + + /** Service networkConfig */ + networkConfig?: (google.cloud.metastore.v1alpha.INetworkConfig|null); + + /** Service databaseType */ + databaseType?: (google.cloud.metastore.v1alpha.Service.DatabaseType|keyof typeof google.cloud.metastore.v1alpha.Service.DatabaseType|null); + + /** Service telemetryConfig */ + telemetryConfig?: (google.cloud.metastore.v1alpha.ITelemetryConfig|null); + } + + /** Represents a Service. */ + class Service implements IService { + + /** + * Constructs a new Service. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IService); + + /** Service hiveMetastoreConfig. */ + public hiveMetastoreConfig?: (google.cloud.metastore.v1alpha.IHiveMetastoreConfig|null); + + /** Service name. */ + public name: string; + + /** Service createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Service updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Service labels. */ + public labels: { [k: string]: string }; + + /** Service network. */ + public network: string; + + /** Service endpointUri. */ + public endpointUri: string; + + /** Service port. */ + public port: number; + + /** Service state. */ + public state: (google.cloud.metastore.v1alpha.Service.State|keyof typeof google.cloud.metastore.v1alpha.Service.State); + + /** Service stateMessage. */ + public stateMessage: string; + + /** Service artifactGcsUri. */ + public artifactGcsUri: string; + + /** Service tier. */ + public tier: (google.cloud.metastore.v1alpha.Service.Tier|keyof typeof google.cloud.metastore.v1alpha.Service.Tier); + + /** Service metadataIntegration. */ + public metadataIntegration?: (google.cloud.metastore.v1alpha.IMetadataIntegration|null); + + /** Service maintenanceWindow. */ + public maintenanceWindow?: (google.cloud.metastore.v1alpha.IMaintenanceWindow|null); + + /** Service uid. */ + public uid: string; + + /** Service metadataManagementActivity. */ + public metadataManagementActivity?: (google.cloud.metastore.v1alpha.IMetadataManagementActivity|null); + + /** Service releaseChannel. */ + public releaseChannel: (google.cloud.metastore.v1alpha.Service.ReleaseChannel|keyof typeof google.cloud.metastore.v1alpha.Service.ReleaseChannel); + + /** Service encryptionConfig. */ + public encryptionConfig?: (google.cloud.metastore.v1alpha.IEncryptionConfig|null); + + /** Service networkConfig. */ + public networkConfig?: (google.cloud.metastore.v1alpha.INetworkConfig|null); + + /** Service databaseType. */ + public databaseType: (google.cloud.metastore.v1alpha.Service.DatabaseType|keyof typeof google.cloud.metastore.v1alpha.Service.DatabaseType); + + /** Service telemetryConfig. */ + public telemetryConfig?: (google.cloud.metastore.v1alpha.ITelemetryConfig|null); + + /** Service metastoreConfig. */ + public metastoreConfig?: "hiveMetastoreConfig"; + + /** + * Creates a new Service instance using the specified properties. + * @param [properties] Properties to set + * @returns Service instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IService): google.cloud.metastore.v1alpha.Service; + + /** + * Encodes the specified Service message. Does not implicitly {@link google.cloud.metastore.v1alpha.Service.verify|verify} messages. + * @param message Service message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Service.verify|verify} messages. + * @param message Service message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Service message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Service + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.Service; + + /** + * Decodes a Service message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Service + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.Service; + + /** + * Verifies a Service message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Service message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Service + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.Service; + + /** + * Creates a plain object from a Service message. Also converts values to other types if specified. + * @param message Service + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.Service, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Service to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Service + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Service { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + SUSPENDING = 3, + SUSPENDED = 4, + UPDATING = 5, + DELETING = 6, + ERROR = 7 + } + + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + DEVELOPER = 1, + ENTERPRISE = 3 + } + + /** ReleaseChannel enum. */ + enum ReleaseChannel { + RELEASE_CHANNEL_UNSPECIFIED = 0, + CANARY = 1, + STABLE = 2 + } + + /** DatabaseType enum. */ + enum DatabaseType { + DATABASE_TYPE_UNSPECIFIED = 0, + MYSQL = 1, + SPANNER = 2 + } + } + + /** Properties of a MetadataIntegration. */ + interface IMetadataIntegration { + + /** MetadataIntegration dataCatalogConfig */ + dataCatalogConfig?: (google.cloud.metastore.v1alpha.IDataCatalogConfig|null); + + /** MetadataIntegration dataplexConfig */ + dataplexConfig?: (google.cloud.metastore.v1alpha.IDataplexConfig|null); + } + + /** Represents a MetadataIntegration. */ + class MetadataIntegration implements IMetadataIntegration { + + /** + * Constructs a new MetadataIntegration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IMetadataIntegration); + + /** MetadataIntegration dataCatalogConfig. */ + public dataCatalogConfig?: (google.cloud.metastore.v1alpha.IDataCatalogConfig|null); + + /** MetadataIntegration dataplexConfig. */ + public dataplexConfig?: (google.cloud.metastore.v1alpha.IDataplexConfig|null); + + /** + * Creates a new MetadataIntegration instance using the specified properties. + * @param [properties] Properties to set + * @returns MetadataIntegration instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IMetadataIntegration): google.cloud.metastore.v1alpha.MetadataIntegration; + + /** + * Encodes the specified MetadataIntegration message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataIntegration.verify|verify} messages. + * @param message MetadataIntegration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IMetadataIntegration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetadataIntegration message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataIntegration.verify|verify} messages. + * @param message MetadataIntegration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IMetadataIntegration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetadataIntegration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetadataIntegration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.MetadataIntegration; + + /** + * Decodes a MetadataIntegration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetadataIntegration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.MetadataIntegration; + + /** + * Verifies a MetadataIntegration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetadataIntegration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetadataIntegration + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.MetadataIntegration; + + /** + * Creates a plain object from a MetadataIntegration message. Also converts values to other types if specified. + * @param message MetadataIntegration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.MetadataIntegration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetadataIntegration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetadataIntegration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataCatalogConfig. */ + interface IDataCatalogConfig { + + /** DataCatalogConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a DataCatalogConfig. */ + class DataCatalogConfig implements IDataCatalogConfig { + + /** + * Constructs a new DataCatalogConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IDataCatalogConfig); + + /** DataCatalogConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new DataCatalogConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DataCatalogConfig instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IDataCatalogConfig): google.cloud.metastore.v1alpha.DataCatalogConfig; + + /** + * Encodes the specified DataCatalogConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.DataCatalogConfig.verify|verify} messages. + * @param message DataCatalogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IDataCatalogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataCatalogConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DataCatalogConfig.verify|verify} messages. + * @param message DataCatalogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IDataCatalogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataCatalogConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataCatalogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.DataCatalogConfig; + + /** + * Decodes a DataCatalogConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataCatalogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.DataCatalogConfig; + + /** + * Verifies a DataCatalogConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataCatalogConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataCatalogConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.DataCatalogConfig; + + /** + * Creates a plain object from a DataCatalogConfig message. Also converts values to other types if specified. + * @param message DataCatalogConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.DataCatalogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataCatalogConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataCatalogConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataplexConfig. */ + interface IDataplexConfig { + + /** DataplexConfig lakeResources */ + lakeResources?: ({ [k: string]: google.cloud.metastore.v1alpha.ILake }|null); + } + + /** Represents a DataplexConfig. */ + class DataplexConfig implements IDataplexConfig { + + /** + * Constructs a new DataplexConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IDataplexConfig); + + /** DataplexConfig lakeResources. */ + public lakeResources: { [k: string]: google.cloud.metastore.v1alpha.ILake }; + + /** + * Creates a new DataplexConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DataplexConfig instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IDataplexConfig): google.cloud.metastore.v1alpha.DataplexConfig; + + /** + * Encodes the specified DataplexConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.DataplexConfig.verify|verify} messages. + * @param message DataplexConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IDataplexConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataplexConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DataplexConfig.verify|verify} messages. + * @param message DataplexConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IDataplexConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataplexConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataplexConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.DataplexConfig; + + /** + * Decodes a DataplexConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataplexConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.DataplexConfig; + + /** + * Verifies a DataplexConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataplexConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataplexConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.DataplexConfig; + + /** + * Creates a plain object from a DataplexConfig message. Also converts values to other types if specified. + * @param message DataplexConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.DataplexConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataplexConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataplexConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Lake. */ + interface ILake { + + /** Lake name */ + name?: (string|null); + } + + /** Represents a Lake. */ + class Lake implements ILake { + + /** + * Constructs a new Lake. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.ILake); + + /** Lake name. */ + public name: string; + + /** + * Creates a new Lake instance using the specified properties. + * @param [properties] Properties to set + * @returns Lake instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.ILake): google.cloud.metastore.v1alpha.Lake; + + /** + * Encodes the specified Lake message. Does not implicitly {@link google.cloud.metastore.v1alpha.Lake.verify|verify} messages. + * @param message Lake message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.ILake, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Lake.verify|verify} messages. + * @param message Lake message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.ILake, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Lake message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.Lake; + + /** + * Decodes a Lake message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.Lake; + + /** + * Verifies a Lake message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Lake message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Lake + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.Lake; + + /** + * Creates a plain object from a Lake message. Also converts values to other types if specified. + * @param message Lake + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.Lake, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Lake to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Lake + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MaintenanceWindow. */ + interface IMaintenanceWindow { + + /** MaintenanceWindow hourOfDay */ + hourOfDay?: (google.protobuf.IInt32Value|null); + + /** MaintenanceWindow dayOfWeek */ + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + } + + /** Represents a MaintenanceWindow. */ + class MaintenanceWindow implements IMaintenanceWindow { + + /** + * Constructs a new MaintenanceWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IMaintenanceWindow); + + /** MaintenanceWindow hourOfDay. */ + public hourOfDay?: (google.protobuf.IInt32Value|null); + + /** MaintenanceWindow dayOfWeek. */ + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + + /** + * Creates a new MaintenanceWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns MaintenanceWindow instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IMaintenanceWindow): google.cloud.metastore.v1alpha.MaintenanceWindow; + + /** + * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.metastore.v1alpha.MaintenanceWindow.verify|verify} messages. + * @param message MaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MaintenanceWindow.verify|verify} messages. + * @param message MaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.MaintenanceWindow; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.MaintenanceWindow; + + /** + * Verifies a MaintenanceWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaintenanceWindow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.MaintenanceWindow; + + /** + * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * @param message MaintenanceWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.MaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaintenanceWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MaintenanceWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HiveMetastoreConfig. */ + interface IHiveMetastoreConfig { + + /** HiveMetastoreConfig version */ + version?: (string|null); + + /** HiveMetastoreConfig configOverrides */ + configOverrides?: ({ [k: string]: string }|null); + + /** HiveMetastoreConfig kerberosConfig */ + kerberosConfig?: (google.cloud.metastore.v1alpha.IKerberosConfig|null); + + /** HiveMetastoreConfig endpointProtocol */ + endpointProtocol?: (google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol|keyof typeof google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol|null); + + /** HiveMetastoreConfig auxiliaryVersions */ + auxiliaryVersions?: ({ [k: string]: google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig }|null); + } + + /** Represents a HiveMetastoreConfig. */ + class HiveMetastoreConfig implements IHiveMetastoreConfig { + + /** + * Constructs a new HiveMetastoreConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IHiveMetastoreConfig); + + /** HiveMetastoreConfig version. */ + public version: string; + + /** HiveMetastoreConfig configOverrides. */ + public configOverrides: { [k: string]: string }; + + /** HiveMetastoreConfig kerberosConfig. */ + public kerberosConfig?: (google.cloud.metastore.v1alpha.IKerberosConfig|null); + + /** HiveMetastoreConfig endpointProtocol. */ + public endpointProtocol: (google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol|keyof typeof google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol); + + /** HiveMetastoreConfig auxiliaryVersions. */ + public auxiliaryVersions: { [k: string]: google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig }; + + /** + * Creates a new HiveMetastoreConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns HiveMetastoreConfig instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IHiveMetastoreConfig): google.cloud.metastore.v1alpha.HiveMetastoreConfig; + + /** + * Encodes the specified HiveMetastoreConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.HiveMetastoreConfig.verify|verify} messages. + * @param message HiveMetastoreConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IHiveMetastoreConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HiveMetastoreConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.HiveMetastoreConfig.verify|verify} messages. + * @param message HiveMetastoreConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IHiveMetastoreConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HiveMetastoreConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HiveMetastoreConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.HiveMetastoreConfig; + + /** + * Decodes a HiveMetastoreConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HiveMetastoreConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.HiveMetastoreConfig; + + /** + * Verifies a HiveMetastoreConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HiveMetastoreConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HiveMetastoreConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.HiveMetastoreConfig; + + /** + * Creates a plain object from a HiveMetastoreConfig message. Also converts values to other types if specified. + * @param message HiveMetastoreConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.HiveMetastoreConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HiveMetastoreConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HiveMetastoreConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace HiveMetastoreConfig { + + /** EndpointProtocol enum. */ + enum EndpointProtocol { + ENDPOINT_PROTOCOL_UNSPECIFIED = 0, + THRIFT = 1, + GRPC = 2 + } + } + + /** Properties of a KerberosConfig. */ + interface IKerberosConfig { + + /** KerberosConfig keytab */ + keytab?: (google.cloud.metastore.v1alpha.ISecret|null); + + /** KerberosConfig principal */ + principal?: (string|null); + + /** KerberosConfig krb5ConfigGcsUri */ + krb5ConfigGcsUri?: (string|null); + } + + /** Represents a KerberosConfig. */ + class KerberosConfig implements IKerberosConfig { + + /** + * Constructs a new KerberosConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IKerberosConfig); + + /** KerberosConfig keytab. */ + public keytab?: (google.cloud.metastore.v1alpha.ISecret|null); + + /** KerberosConfig principal. */ + public principal: string; + + /** KerberosConfig krb5ConfigGcsUri. */ + public krb5ConfigGcsUri: string; + + /** + * Creates a new KerberosConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns KerberosConfig instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IKerberosConfig): google.cloud.metastore.v1alpha.KerberosConfig; + + /** + * Encodes the specified KerberosConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.KerberosConfig.verify|verify} messages. + * @param message KerberosConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IKerberosConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KerberosConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.KerberosConfig.verify|verify} messages. + * @param message KerberosConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IKerberosConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KerberosConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KerberosConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.KerberosConfig; + + /** + * Decodes a KerberosConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KerberosConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.KerberosConfig; + + /** + * Verifies a KerberosConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KerberosConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KerberosConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.KerberosConfig; + + /** + * Creates a plain object from a KerberosConfig message. Also converts values to other types if specified. + * @param message KerberosConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.KerberosConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KerberosConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KerberosConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Secret. */ + interface ISecret { + + /** Secret cloudSecret */ + cloudSecret?: (string|null); + } + + /** Represents a Secret. */ + class Secret implements ISecret { + + /** + * Constructs a new Secret. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.ISecret); + + /** Secret cloudSecret. */ + public cloudSecret?: (string|null); + + /** Secret value. */ + public value?: "cloudSecret"; + + /** + * Creates a new Secret instance using the specified properties. + * @param [properties] Properties to set + * @returns Secret instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.ISecret): google.cloud.metastore.v1alpha.Secret; + + /** + * Encodes the specified Secret message. Does not implicitly {@link google.cloud.metastore.v1alpha.Secret.verify|verify} messages. + * @param message Secret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.ISecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Secret message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Secret.verify|verify} messages. + * @param message Secret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.ISecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Secret message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Secret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.Secret; + + /** + * Decodes a Secret message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Secret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.Secret; + + /** + * Verifies a Secret message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Secret message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Secret + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.Secret; + + /** + * Creates a plain object from a Secret message. Also converts values to other types if specified. + * @param message Secret + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.Secret, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Secret to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Secret + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { + + /** EncryptionConfig kmsKey */ + kmsKey?: (string|null); + } + + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { + + /** + * Constructs a new EncryptionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IEncryptionConfig); + + /** EncryptionConfig kmsKey. */ + public kmsKey: string; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionConfig instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IEncryptionConfig): google.cloud.metastore.v1alpha.EncryptionConfig; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.EncryptionConfig; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.EncryptionConfig; + + /** + * Verifies an EncryptionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.EncryptionConfig; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @param message EncryptionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuxiliaryVersionConfig. */ + interface IAuxiliaryVersionConfig { + + /** AuxiliaryVersionConfig version */ + version?: (string|null); + + /** AuxiliaryVersionConfig configOverrides */ + configOverrides?: ({ [k: string]: string }|null); + + /** AuxiliaryVersionConfig networkConfig */ + networkConfig?: (google.cloud.metastore.v1alpha.INetworkConfig|null); + } + + /** Represents an AuxiliaryVersionConfig. */ + class AuxiliaryVersionConfig implements IAuxiliaryVersionConfig { + + /** + * Constructs a new AuxiliaryVersionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig); + + /** AuxiliaryVersionConfig version. */ + public version: string; + + /** AuxiliaryVersionConfig configOverrides. */ + public configOverrides: { [k: string]: string }; + + /** AuxiliaryVersionConfig networkConfig. */ + public networkConfig?: (google.cloud.metastore.v1alpha.INetworkConfig|null); + + /** + * Creates a new AuxiliaryVersionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuxiliaryVersionConfig instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig): google.cloud.metastore.v1alpha.AuxiliaryVersionConfig; + + /** + * Encodes the specified AuxiliaryVersionConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.verify|verify} messages. + * @param message AuxiliaryVersionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuxiliaryVersionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.verify|verify} messages. + * @param message AuxiliaryVersionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuxiliaryVersionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.AuxiliaryVersionConfig; + + /** + * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuxiliaryVersionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.AuxiliaryVersionConfig; + + /** + * Verifies an AuxiliaryVersionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuxiliaryVersionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuxiliaryVersionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.AuxiliaryVersionConfig; + + /** + * Creates a plain object from an AuxiliaryVersionConfig message. Also converts values to other types if specified. + * @param message AuxiliaryVersionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.AuxiliaryVersionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuxiliaryVersionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuxiliaryVersionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkConfig. */ + interface INetworkConfig { + + /** NetworkConfig consumers */ + consumers?: (google.cloud.metastore.v1alpha.NetworkConfig.IConsumer[]|null); + } + + /** Represents a NetworkConfig. */ + class NetworkConfig implements INetworkConfig { + + /** + * Constructs a new NetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.INetworkConfig); + + /** NetworkConfig consumers. */ + public consumers: google.cloud.metastore.v1alpha.NetworkConfig.IConsumer[]; + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkConfig instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.INetworkConfig): google.cloud.metastore.v1alpha.NetworkConfig; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.NetworkConfig; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.NetworkConfig; + + /** + * Verifies a NetworkConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.NetworkConfig; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @param message NetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkConfig { + + /** Properties of a Consumer. */ + interface IConsumer { + + /** Consumer subnetwork */ + subnetwork?: (string|null); + + /** Consumer endpointUri */ + endpointUri?: (string|null); + } + + /** Represents a Consumer. */ + class Consumer implements IConsumer { + + /** + * Constructs a new Consumer. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.NetworkConfig.IConsumer); + + /** Consumer subnetwork. */ + public subnetwork?: (string|null); + + /** Consumer endpointUri. */ + public endpointUri: string; + + /** Consumer vpcResource. */ + public vpcResource?: "subnetwork"; + + /** + * Creates a new Consumer instance using the specified properties. + * @param [properties] Properties to set + * @returns Consumer instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.NetworkConfig.IConsumer): google.cloud.metastore.v1alpha.NetworkConfig.Consumer; + + /** + * Encodes the specified Consumer message. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.Consumer.verify|verify} messages. + * @param message Consumer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.NetworkConfig.IConsumer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Consumer message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.Consumer.verify|verify} messages. + * @param message Consumer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.NetworkConfig.IConsumer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Consumer message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Consumer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.NetworkConfig.Consumer; + + /** + * Decodes a Consumer message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Consumer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.NetworkConfig.Consumer; + + /** + * Verifies a Consumer message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Consumer message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Consumer + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.NetworkConfig.Consumer; + + /** + * Creates a plain object from a Consumer message. Also converts values to other types if specified. + * @param message Consumer + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.NetworkConfig.Consumer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Consumer to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Consumer + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a TelemetryConfig. */ + interface ITelemetryConfig { + + /** TelemetryConfig logFormat */ + logFormat?: (google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat|keyof typeof google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat|null); + } + + /** Represents a TelemetryConfig. */ + class TelemetryConfig implements ITelemetryConfig { + + /** + * Constructs a new TelemetryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.ITelemetryConfig); + + /** TelemetryConfig logFormat. */ + public logFormat: (google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat|keyof typeof google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat); + + /** + * Creates a new TelemetryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TelemetryConfig instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.ITelemetryConfig): google.cloud.metastore.v1alpha.TelemetryConfig; + + /** + * Encodes the specified TelemetryConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.TelemetryConfig.verify|verify} messages. + * @param message TelemetryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.ITelemetryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TelemetryConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.TelemetryConfig.verify|verify} messages. + * @param message TelemetryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.ITelemetryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TelemetryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TelemetryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.TelemetryConfig; + + /** + * Decodes a TelemetryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TelemetryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.TelemetryConfig; + + /** + * Verifies a TelemetryConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TelemetryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TelemetryConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.TelemetryConfig; + + /** + * Creates a plain object from a TelemetryConfig message. Also converts values to other types if specified. + * @param message TelemetryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.TelemetryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TelemetryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TelemetryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TelemetryConfig { + + /** LogFormat enum. */ + enum LogFormat { + LOG_FORMAT_UNSPECIFIED = 0, + LEGACY = 1, + JSON = 2 + } + } + + /** Properties of a MetadataManagementActivity. */ + interface IMetadataManagementActivity { + + /** MetadataManagementActivity metadataExports */ + metadataExports?: (google.cloud.metastore.v1alpha.IMetadataExport[]|null); + + /** MetadataManagementActivity restores */ + restores?: (google.cloud.metastore.v1alpha.IRestore[]|null); + } + + /** Represents a MetadataManagementActivity. */ + class MetadataManagementActivity implements IMetadataManagementActivity { + + /** + * Constructs a new MetadataManagementActivity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IMetadataManagementActivity); + + /** MetadataManagementActivity metadataExports. */ + public metadataExports: google.cloud.metastore.v1alpha.IMetadataExport[]; + + /** MetadataManagementActivity restores. */ + public restores: google.cloud.metastore.v1alpha.IRestore[]; + + /** + * Creates a new MetadataManagementActivity instance using the specified properties. + * @param [properties] Properties to set + * @returns MetadataManagementActivity instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IMetadataManagementActivity): google.cloud.metastore.v1alpha.MetadataManagementActivity; + + /** + * Encodes the specified MetadataManagementActivity message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataManagementActivity.verify|verify} messages. + * @param message MetadataManagementActivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IMetadataManagementActivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetadataManagementActivity message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataManagementActivity.verify|verify} messages. + * @param message MetadataManagementActivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IMetadataManagementActivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetadataManagementActivity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetadataManagementActivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.MetadataManagementActivity; + + /** + * Decodes a MetadataManagementActivity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetadataManagementActivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.MetadataManagementActivity; + + /** + * Verifies a MetadataManagementActivity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetadataManagementActivity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetadataManagementActivity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.MetadataManagementActivity; + + /** + * Creates a plain object from a MetadataManagementActivity message. Also converts values to other types if specified. + * @param message MetadataManagementActivity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.MetadataManagementActivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetadataManagementActivity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetadataManagementActivity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetadataImport. */ + interface IMetadataImport { + + /** MetadataImport databaseDump */ + databaseDump?: (google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump|null); + + /** MetadataImport name */ + name?: (string|null); + + /** MetadataImport description */ + description?: (string|null); + + /** MetadataImport createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** MetadataImport updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** MetadataImport endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** MetadataImport state */ + state?: (google.cloud.metastore.v1alpha.MetadataImport.State|keyof typeof google.cloud.metastore.v1alpha.MetadataImport.State|null); + } + + /** Represents a MetadataImport. */ + class MetadataImport implements IMetadataImport { + + /** + * Constructs a new MetadataImport. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IMetadataImport); + + /** MetadataImport databaseDump. */ + public databaseDump?: (google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump|null); + + /** MetadataImport name. */ + public name: string; + + /** MetadataImport description. */ + public description: string; + + /** MetadataImport createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** MetadataImport updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** MetadataImport endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** MetadataImport state. */ + public state: (google.cloud.metastore.v1alpha.MetadataImport.State|keyof typeof google.cloud.metastore.v1alpha.MetadataImport.State); + + /** MetadataImport metadata. */ + public metadata?: "databaseDump"; + + /** + * Creates a new MetadataImport instance using the specified properties. + * @param [properties] Properties to set + * @returns MetadataImport instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IMetadataImport): google.cloud.metastore.v1alpha.MetadataImport; + + /** + * Encodes the specified MetadataImport message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.verify|verify} messages. + * @param message MetadataImport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IMetadataImport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetadataImport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.verify|verify} messages. + * @param message MetadataImport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IMetadataImport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetadataImport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetadataImport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.MetadataImport; + + /** + * Decodes a MetadataImport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetadataImport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.MetadataImport; + + /** + * Verifies a MetadataImport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetadataImport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetadataImport + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.MetadataImport; + + /** + * Creates a plain object from a MetadataImport message. Also converts values to other types if specified. + * @param message MetadataImport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.MetadataImport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetadataImport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetadataImport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MetadataImport { + + /** Properties of a DatabaseDump. */ + interface IDatabaseDump { + + /** DatabaseDump databaseType */ + databaseType?: (google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType|keyof typeof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType|null); + + /** DatabaseDump gcsUri */ + gcsUri?: (string|null); + + /** DatabaseDump sourceDatabase */ + sourceDatabase?: (string|null); + + /** DatabaseDump type */ + type?: (google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|null); + } + + /** Represents a DatabaseDump. */ + class DatabaseDump implements IDatabaseDump { + + /** + * Constructs a new DatabaseDump. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump); + + /** DatabaseDump databaseType. */ + public databaseType: (google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType|keyof typeof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType); + + /** DatabaseDump gcsUri. */ + public gcsUri: string; + + /** DatabaseDump sourceDatabase. */ + public sourceDatabase: string; + + /** DatabaseDump type. */ + public type: (google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type); + + /** + * Creates a new DatabaseDump instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseDump instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump): google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump; + + /** + * Encodes the specified DatabaseDump message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.verify|verify} messages. + * @param message DatabaseDump message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseDump message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.verify|verify} messages. + * @param message DatabaseDump message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseDump message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseDump + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump; + + /** + * Decodes a DatabaseDump message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseDump + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump; + + /** + * Verifies a DatabaseDump message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseDump message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseDump + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump; + + /** + * Creates a plain object from a DatabaseDump message. Also converts values to other types if specified. + * @param message DatabaseDump + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseDump to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseDump + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DatabaseDump { + + /** DatabaseType enum. */ + enum DatabaseType { + DATABASE_TYPE_UNSPECIFIED = 0, + MYSQL = 1 + } + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + UPDATING = 3, + FAILED = 4 + } + } + + /** Properties of a MetadataExport. */ + interface IMetadataExport { + + /** MetadataExport destinationGcsUri */ + destinationGcsUri?: (string|null); + + /** MetadataExport startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** MetadataExport endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** MetadataExport state */ + state?: (google.cloud.metastore.v1alpha.MetadataExport.State|keyof typeof google.cloud.metastore.v1alpha.MetadataExport.State|null); + + /** MetadataExport databaseDumpType */ + databaseDumpType?: (google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|null); + } + + /** Represents a MetadataExport. */ + class MetadataExport implements IMetadataExport { + + /** + * Constructs a new MetadataExport. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IMetadataExport); + + /** MetadataExport destinationGcsUri. */ + public destinationGcsUri?: (string|null); + + /** MetadataExport startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** MetadataExport endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** MetadataExport state. */ + public state: (google.cloud.metastore.v1alpha.MetadataExport.State|keyof typeof google.cloud.metastore.v1alpha.MetadataExport.State); + + /** MetadataExport databaseDumpType. */ + public databaseDumpType: (google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type); + + /** MetadataExport destination. */ + public destination?: "destinationGcsUri"; + + /** + * Creates a new MetadataExport instance using the specified properties. + * @param [properties] Properties to set + * @returns MetadataExport instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IMetadataExport): google.cloud.metastore.v1alpha.MetadataExport; + + /** + * Encodes the specified MetadataExport message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataExport.verify|verify} messages. + * @param message MetadataExport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IMetadataExport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetadataExport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataExport.verify|verify} messages. + * @param message MetadataExport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IMetadataExport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetadataExport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetadataExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.MetadataExport; + + /** + * Decodes a MetadataExport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetadataExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.MetadataExport; + + /** + * Verifies a MetadataExport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetadataExport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetadataExport + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.MetadataExport; + + /** + * Creates a plain object from a MetadataExport message. Also converts values to other types if specified. + * @param message MetadataExport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.MetadataExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetadataExport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetadataExport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MetadataExport { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + FAILED = 3, + CANCELLED = 4 + } + } + + /** Properties of a Backup. */ + interface IBackup { + + /** Backup name */ + name?: (string|null); + + /** Backup createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Backup endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Backup state */ + state?: (google.cloud.metastore.v1alpha.Backup.State|keyof typeof google.cloud.metastore.v1alpha.Backup.State|null); + + /** Backup serviceRevision */ + serviceRevision?: (google.cloud.metastore.v1alpha.IService|null); + + /** Backup description */ + description?: (string|null); + + /** Backup restoringServices */ + restoringServices?: (string[]|null); + } + + /** Represents a Backup. */ + class Backup implements IBackup { + + /** + * Constructs a new Backup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IBackup); + + /** Backup name. */ + public name: string; + + /** Backup createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Backup endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Backup state. */ + public state: (google.cloud.metastore.v1alpha.Backup.State|keyof typeof google.cloud.metastore.v1alpha.Backup.State); + + /** Backup serviceRevision. */ + public serviceRevision?: (google.cloud.metastore.v1alpha.IService|null); + + /** Backup description. */ + public description: string; + + /** Backup restoringServices. */ + public restoringServices: string[]; + + /** + * Creates a new Backup instance using the specified properties. + * @param [properties] Properties to set + * @returns Backup instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IBackup): google.cloud.metastore.v1alpha.Backup; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.metastore.v1alpha.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.Backup; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.Backup; + + /** + * Verifies a Backup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Backup + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.Backup; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @param message Backup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Backup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Backup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Backup { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + DELETING = 2, + ACTIVE = 3, + FAILED = 4, + RESTORING = 5 + } + } + + /** Properties of a Restore. */ + interface IRestore { + + /** Restore startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Restore endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Restore state */ + state?: (google.cloud.metastore.v1alpha.Restore.State|keyof typeof google.cloud.metastore.v1alpha.Restore.State|null); + + /** Restore backup */ + backup?: (string|null); + + /** Restore type */ + type?: (google.cloud.metastore.v1alpha.Restore.RestoreType|keyof typeof google.cloud.metastore.v1alpha.Restore.RestoreType|null); + + /** Restore details */ + details?: (string|null); + } + + /** Represents a Restore. */ + class Restore implements IRestore { + + /** + * Constructs a new Restore. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IRestore); + + /** Restore startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Restore endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Restore state. */ + public state: (google.cloud.metastore.v1alpha.Restore.State|keyof typeof google.cloud.metastore.v1alpha.Restore.State); + + /** Restore backup. */ + public backup: string; + + /** Restore type. */ + public type: (google.cloud.metastore.v1alpha.Restore.RestoreType|keyof typeof google.cloud.metastore.v1alpha.Restore.RestoreType); + + /** Restore details. */ + public details: string; + + /** + * Creates a new Restore instance using the specified properties. + * @param [properties] Properties to set + * @returns Restore instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IRestore): google.cloud.metastore.v1alpha.Restore; + + /** + * Encodes the specified Restore message. Does not implicitly {@link google.cloud.metastore.v1alpha.Restore.verify|verify} messages. + * @param message Restore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IRestore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Restore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Restore.verify|verify} messages. + * @param message Restore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IRestore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Restore message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Restore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.Restore; + + /** + * Decodes a Restore message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Restore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.Restore; + + /** + * Verifies a Restore message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Restore message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Restore + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.Restore; + + /** + * Creates a plain object from a Restore message. Also converts values to other types if specified. + * @param message Restore + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.Restore, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Restore to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Restore + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Restore { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + FAILED = 3, + CANCELLED = 4 + } + + /** RestoreType enum. */ + enum RestoreType { + RESTORE_TYPE_UNSPECIFIED = 0, + FULL = 1, + METADATA_ONLY = 2 + } + } + + /** Properties of a ListServicesRequest. */ + interface IListServicesRequest { + + /** ListServicesRequest parent */ + parent?: (string|null); + + /** ListServicesRequest pageSize */ + pageSize?: (number|null); + + /** ListServicesRequest pageToken */ + pageToken?: (string|null); + + /** ListServicesRequest filter */ + filter?: (string|null); + + /** ListServicesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListServicesRequest. */ + class ListServicesRequest implements IListServicesRequest { + + /** + * Constructs a new ListServicesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IListServicesRequest); + + /** ListServicesRequest parent. */ + public parent: string; + + /** ListServicesRequest pageSize. */ + public pageSize: number; + + /** ListServicesRequest pageToken. */ + public pageToken: string; + + /** ListServicesRequest filter. */ + public filter: string; + + /** ListServicesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListServicesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListServicesRequest instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IListServicesRequest): google.cloud.metastore.v1alpha.ListServicesRequest; + + /** + * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesRequest.verify|verify} messages. + * @param message ListServicesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesRequest.verify|verify} messages. + * @param message ListServicesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListServicesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListServicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ListServicesRequest; + + /** + * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListServicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ListServicesRequest; + + /** + * Verifies a ListServicesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListServicesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ListServicesRequest; + + /** + * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. + * @param message ListServicesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.ListServicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListServicesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListServicesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListServicesResponse. */ + interface IListServicesResponse { + + /** ListServicesResponse services */ + services?: (google.cloud.metastore.v1alpha.IService[]|null); + + /** ListServicesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListServicesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListServicesResponse. */ + class ListServicesResponse implements IListServicesResponse { + + /** + * Constructs a new ListServicesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IListServicesResponse); + + /** ListServicesResponse services. */ + public services: google.cloud.metastore.v1alpha.IService[]; + + /** ListServicesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListServicesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListServicesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListServicesResponse instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IListServicesResponse): google.cloud.metastore.v1alpha.ListServicesResponse; + + /** + * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesResponse.verify|verify} messages. + * @param message ListServicesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesResponse.verify|verify} messages. + * @param message ListServicesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListServicesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ListServicesResponse; + + /** + * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ListServicesResponse; + + /** + * Verifies a ListServicesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListServicesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ListServicesResponse; + + /** + * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. + * @param message ListServicesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.ListServicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListServicesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListServicesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetServiceRequest. */ + interface IGetServiceRequest { + + /** GetServiceRequest name */ + name?: (string|null); + } + + /** Represents a GetServiceRequest. */ + class GetServiceRequest implements IGetServiceRequest { + + /** + * Constructs a new GetServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IGetServiceRequest); + + /** GetServiceRequest name. */ + public name: string; + + /** + * Creates a new GetServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetServiceRequest instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IGetServiceRequest): google.cloud.metastore.v1alpha.GetServiceRequest; + + /** + * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.GetServiceRequest.verify|verify} messages. + * @param message GetServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.GetServiceRequest.verify|verify} messages. + * @param message GetServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.GetServiceRequest; + + /** + * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.GetServiceRequest; + + /** + * Verifies a GetServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.GetServiceRequest; + + /** + * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. + * @param message GetServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.GetServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetServiceRequest to JSON. + * @returns JSON object */ - type GetMetadataImportCallback = (error: (Error|null), response?: google.cloud.metastore.v1alpha.MetadataImport) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|createMetadataImport}. - * @param error Error, if any - * @param [response] Operation + * Gets the default type url for GetServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type CreateMetadataImportCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateServiceRequest. */ + interface ICreateServiceRequest { + + /** CreateServiceRequest parent */ + parent?: (string|null); + + /** CreateServiceRequest serviceId */ + serviceId?: (string|null); + + /** CreateServiceRequest service */ + service?: (google.cloud.metastore.v1alpha.IService|null); + + /** CreateServiceRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateServiceRequest. */ + class CreateServiceRequest implements ICreateServiceRequest { /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|updateMetadataImport}. - * @param error Error, if any - * @param [response] Operation + * Constructs a new CreateServiceRequest. + * @param [properties] Properties to set */ - type UpdateMetadataImportCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + constructor(properties?: google.cloud.metastore.v1alpha.ICreateServiceRequest); + + /** CreateServiceRequest parent. */ + public parent: string; + + /** CreateServiceRequest serviceId. */ + public serviceId: string; + + /** CreateServiceRequest service. */ + public service?: (google.cloud.metastore.v1alpha.IService|null); + + /** CreateServiceRequest requestId. */ + public requestId: string; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|exportMetadata}. - * @param error Error, if any - * @param [response] Operation + * Creates a new CreateServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateServiceRequest instance */ - type ExportMetadataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static create(properties?: google.cloud.metastore.v1alpha.ICreateServiceRequest): google.cloud.metastore.v1alpha.CreateServiceRequest; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|restoreService}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateServiceRequest.verify|verify} messages. + * @param message CreateServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type RestoreServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encode(message: google.cloud.metastore.v1alpha.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|listBackups}. - * @param error Error, if any - * @param [response] ListBackupsResponse + * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateServiceRequest.verify|verify} messages. + * @param message CreateServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListBackupsCallback = (error: (Error|null), response?: google.cloud.metastore.v1alpha.ListBackupsResponse) => void; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|getBackup}. - * @param error Error, if any - * @param [response] Backup + * Decodes a CreateServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetBackupCallback = (error: (Error|null), response?: google.cloud.metastore.v1alpha.Backup) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.CreateServiceRequest; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|createBackup}. - * @param error Error, if any - * @param [response] Operation + * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.CreateServiceRequest; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|deleteBackup}. - * @param error Error, if any - * @param [response] Operation + * Verifies a CreateServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type DeleteBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.CreateServiceRequest; + + /** + * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. + * @param message CreateServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.CreateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Service. */ - interface IService { + /** Properties of an UpdateServiceRequest. */ + interface IUpdateServiceRequest { - /** Service hiveMetastoreConfig */ - hiveMetastoreConfig?: (google.cloud.metastore.v1alpha.IHiveMetastoreConfig|null); + /** UpdateServiceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** Service name */ - name?: (string|null); + /** UpdateServiceRequest service */ + service?: (google.cloud.metastore.v1alpha.IService|null); - /** Service createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** UpdateServiceRequest requestId */ + requestId?: (string|null); + } - /** Service updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** Represents an UpdateServiceRequest. */ + class UpdateServiceRequest implements IUpdateServiceRequest { - /** Service labels */ - labels?: ({ [k: string]: string }|null); + /** + * Constructs a new UpdateServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IUpdateServiceRequest); - /** Service network */ - network?: (string|null); + /** UpdateServiceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** Service endpointUri */ - endpointUri?: (string|null); + /** UpdateServiceRequest service. */ + public service?: (google.cloud.metastore.v1alpha.IService|null); - /** Service port */ - port?: (number|null); + /** UpdateServiceRequest requestId. */ + public requestId: string; - /** Service state */ - state?: (google.cloud.metastore.v1alpha.Service.State|keyof typeof google.cloud.metastore.v1alpha.Service.State|null); + /** + * Creates a new UpdateServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateServiceRequest instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IUpdateServiceRequest): google.cloud.metastore.v1alpha.UpdateServiceRequest; - /** Service stateMessage */ - stateMessage?: (string|null); + /** + * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateServiceRequest.verify|verify} messages. + * @param message UpdateServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Service artifactGcsUri */ - artifactGcsUri?: (string|null); + /** + * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateServiceRequest.verify|verify} messages. + * @param message UpdateServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Service tier */ - tier?: (google.cloud.metastore.v1alpha.Service.Tier|keyof typeof google.cloud.metastore.v1alpha.Service.Tier|null); + /** + * Decodes an UpdateServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.UpdateServiceRequest; - /** Service metadataIntegration */ - metadataIntegration?: (google.cloud.metastore.v1alpha.IMetadataIntegration|null); + /** + * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.UpdateServiceRequest; - /** Service maintenanceWindow */ - maintenanceWindow?: (google.cloud.metastore.v1alpha.IMaintenanceWindow|null); + /** + * Verifies an UpdateServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.UpdateServiceRequest; + + /** + * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. + * @param message UpdateServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.UpdateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Service uid */ - uid?: (string|null); + /** Properties of a DeleteServiceRequest. */ + interface IDeleteServiceRequest { - /** Service metadataManagementActivity */ - metadataManagementActivity?: (google.cloud.metastore.v1alpha.IMetadataManagementActivity|null); + /** DeleteServiceRequest name */ + name?: (string|null); - /** Service releaseChannel */ - releaseChannel?: (google.cloud.metastore.v1alpha.Service.ReleaseChannel|keyof typeof google.cloud.metastore.v1alpha.Service.ReleaseChannel|null); + /** DeleteServiceRequest requestId */ + requestId?: (string|null); + } - /** Service encryptionConfig */ - encryptionConfig?: (google.cloud.metastore.v1alpha.IEncryptionConfig|null); + /** Represents a DeleteServiceRequest. */ + class DeleteServiceRequest implements IDeleteServiceRequest { - /** Service networkConfig */ - networkConfig?: (google.cloud.metastore.v1alpha.INetworkConfig|null); + /** + * Constructs a new DeleteServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IDeleteServiceRequest); - /** Service databaseType */ - databaseType?: (google.cloud.metastore.v1alpha.Service.DatabaseType|keyof typeof google.cloud.metastore.v1alpha.Service.DatabaseType|null); - } + /** DeleteServiceRequest name. */ + public name: string; - /** Represents a Service. */ - class Service implements IService { + /** DeleteServiceRequest requestId. */ + public requestId: string; /** - * Constructs a new Service. + * Creates a new DeleteServiceRequest instance using the specified properties. * @param [properties] Properties to set + * @returns DeleteServiceRequest instance */ - constructor(properties?: google.cloud.metastore.v1alpha.IService); + public static create(properties?: google.cloud.metastore.v1alpha.IDeleteServiceRequest): google.cloud.metastore.v1alpha.DeleteServiceRequest; - /** Service hiveMetastoreConfig. */ - public hiveMetastoreConfig?: (google.cloud.metastore.v1alpha.IHiveMetastoreConfig|null); + /** + * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteServiceRequest.verify|verify} messages. + * @param message DeleteServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Service name. */ - public name: string; + /** + * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteServiceRequest.verify|verify} messages. + * @param message DeleteServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Service createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.DeleteServiceRequest; - /** Service updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.DeleteServiceRequest; - /** Service labels. */ - public labels: { [k: string]: string }; + /** + * Verifies a DeleteServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Service network. */ - public network: string; + /** + * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.DeleteServiceRequest; - /** Service endpointUri. */ - public endpointUri: string; + /** + * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. + * @param message DeleteServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.DeleteServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Service port. */ - public port: number; + /** + * Converts this DeleteServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Service state. */ - public state: (google.cloud.metastore.v1alpha.Service.State|keyof typeof google.cloud.metastore.v1alpha.Service.State); + /** + * Gets the default type url for DeleteServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Service stateMessage. */ - public stateMessage: string; + /** Properties of a ListMetadataImportsRequest. */ + interface IListMetadataImportsRequest { - /** Service artifactGcsUri. */ - public artifactGcsUri: string; + /** ListMetadataImportsRequest parent */ + parent?: (string|null); - /** Service tier. */ - public tier: (google.cloud.metastore.v1alpha.Service.Tier|keyof typeof google.cloud.metastore.v1alpha.Service.Tier); + /** ListMetadataImportsRequest pageSize */ + pageSize?: (number|null); - /** Service metadataIntegration. */ - public metadataIntegration?: (google.cloud.metastore.v1alpha.IMetadataIntegration|null); + /** ListMetadataImportsRequest pageToken */ + pageToken?: (string|null); - /** Service maintenanceWindow. */ - public maintenanceWindow?: (google.cloud.metastore.v1alpha.IMaintenanceWindow|null); + /** ListMetadataImportsRequest filter */ + filter?: (string|null); - /** Service uid. */ - public uid: string; + /** ListMetadataImportsRequest orderBy */ + orderBy?: (string|null); + } - /** Service metadataManagementActivity. */ - public metadataManagementActivity?: (google.cloud.metastore.v1alpha.IMetadataManagementActivity|null); + /** Represents a ListMetadataImportsRequest. */ + class ListMetadataImportsRequest implements IListMetadataImportsRequest { - /** Service releaseChannel. */ - public releaseChannel: (google.cloud.metastore.v1alpha.Service.ReleaseChannel|keyof typeof google.cloud.metastore.v1alpha.Service.ReleaseChannel); + /** + * Constructs a new ListMetadataImportsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IListMetadataImportsRequest); - /** Service encryptionConfig. */ - public encryptionConfig?: (google.cloud.metastore.v1alpha.IEncryptionConfig|null); + /** ListMetadataImportsRequest parent. */ + public parent: string; - /** Service networkConfig. */ - public networkConfig?: (google.cloud.metastore.v1alpha.INetworkConfig|null); + /** ListMetadataImportsRequest pageSize. */ + public pageSize: number; - /** Service databaseType. */ - public databaseType: (google.cloud.metastore.v1alpha.Service.DatabaseType|keyof typeof google.cloud.metastore.v1alpha.Service.DatabaseType); + /** ListMetadataImportsRequest pageToken. */ + public pageToken: string; - /** Service metastoreConfig. */ - public metastoreConfig?: "hiveMetastoreConfig"; + /** ListMetadataImportsRequest filter. */ + public filter: string; + + /** ListMetadataImportsRequest orderBy. */ + public orderBy: string; /** - * Creates a new Service instance using the specified properties. + * Creates a new ListMetadataImportsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Service instance + * @returns ListMetadataImportsRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IService): google.cloud.metastore.v1alpha.Service; + public static create(properties?: google.cloud.metastore.v1alpha.IListMetadataImportsRequest): google.cloud.metastore.v1alpha.ListMetadataImportsRequest; /** - * Encodes the specified Service message. Does not implicitly {@link google.cloud.metastore.v1alpha.Service.verify|verify} messages. - * @param message Service message or plain object to encode + * Encodes the specified ListMetadataImportsRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsRequest.verify|verify} messages. + * @param message ListMetadataImportsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IService, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IListMetadataImportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Service.verify|verify} messages. - * @param message Service message or plain object to encode + * Encodes the specified ListMetadataImportsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsRequest.verify|verify} messages. + * @param message ListMetadataImportsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IService, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IListMetadataImportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Service message from the specified reader or buffer. + * Decodes a ListMetadataImportsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Service + * @returns ListMetadataImportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.Service; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ListMetadataImportsRequest; /** - * Decodes a Service message from the specified reader or buffer, length delimited. + * Decodes a ListMetadataImportsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Service + * @returns ListMetadataImportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.Service; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ListMetadataImportsRequest; /** - * Verifies a Service message. + * Verifies a ListMetadataImportsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Service message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetadataImportsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Service + * @returns ListMetadataImportsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.Service; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ListMetadataImportsRequest; /** - * Creates a plain object from a Service message. Also converts values to other types if specified. - * @param message Service + * Creates a plain object from a ListMetadataImportsRequest message. Also converts values to other types if specified. + * @param message ListMetadataImportsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.Service, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Service to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Service - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Service { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - SUSPENDING = 3, - SUSPENDED = 4, - UPDATING = 5, - DELETING = 6, - ERROR = 7 - } - - /** Tier enum. */ - enum Tier { - TIER_UNSPECIFIED = 0, - DEVELOPER = 1, - ENTERPRISE = 3 - } + public static toObject(message: google.cloud.metastore.v1alpha.ListMetadataImportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ReleaseChannel enum. */ - enum ReleaseChannel { - RELEASE_CHANNEL_UNSPECIFIED = 0, - CANARY = 1, - STABLE = 2 - } + /** + * Converts this ListMetadataImportsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** DatabaseType enum. */ - enum DatabaseType { - DATABASE_TYPE_UNSPECIFIED = 0, - MYSQL = 1, - SPANNER = 2 - } + /** + * Gets the default type url for ListMetadataImportsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MetadataIntegration. */ - interface IMetadataIntegration { + /** Properties of a ListMetadataImportsResponse. */ + interface IListMetadataImportsResponse { - /** MetadataIntegration dataCatalogConfig */ - dataCatalogConfig?: (google.cloud.metastore.v1alpha.IDataCatalogConfig|null); + /** ListMetadataImportsResponse metadataImports */ + metadataImports?: (google.cloud.metastore.v1alpha.IMetadataImport[]|null); - /** MetadataIntegration dataplexConfig */ - dataplexConfig?: (google.cloud.metastore.v1alpha.IDataplexConfig|null); + /** ListMetadataImportsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListMetadataImportsResponse unreachable */ + unreachable?: (string[]|null); } - /** Represents a MetadataIntegration. */ - class MetadataIntegration implements IMetadataIntegration { + /** Represents a ListMetadataImportsResponse. */ + class ListMetadataImportsResponse implements IListMetadataImportsResponse { /** - * Constructs a new MetadataIntegration. + * Constructs a new ListMetadataImportsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IMetadataIntegration); + constructor(properties?: google.cloud.metastore.v1alpha.IListMetadataImportsResponse); - /** MetadataIntegration dataCatalogConfig. */ - public dataCatalogConfig?: (google.cloud.metastore.v1alpha.IDataCatalogConfig|null); + /** ListMetadataImportsResponse metadataImports. */ + public metadataImports: google.cloud.metastore.v1alpha.IMetadataImport[]; - /** MetadataIntegration dataplexConfig. */ - public dataplexConfig?: (google.cloud.metastore.v1alpha.IDataplexConfig|null); + /** ListMetadataImportsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListMetadataImportsResponse unreachable. */ + public unreachable: string[]; /** - * Creates a new MetadataIntegration instance using the specified properties. + * Creates a new ListMetadataImportsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns MetadataIntegration instance + * @returns ListMetadataImportsResponse instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IMetadataIntegration): google.cloud.metastore.v1alpha.MetadataIntegration; + public static create(properties?: google.cloud.metastore.v1alpha.IListMetadataImportsResponse): google.cloud.metastore.v1alpha.ListMetadataImportsResponse; /** - * Encodes the specified MetadataIntegration message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataIntegration.verify|verify} messages. - * @param message MetadataIntegration message or plain object to encode + * Encodes the specified ListMetadataImportsResponse message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsResponse.verify|verify} messages. + * @param message ListMetadataImportsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IMetadataIntegration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IListMetadataImportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetadataIntegration message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataIntegration.verify|verify} messages. - * @param message MetadataIntegration message or plain object to encode + * Encodes the specified ListMetadataImportsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsResponse.verify|verify} messages. + * @param message ListMetadataImportsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IMetadataIntegration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IListMetadataImportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetadataIntegration message from the specified reader or buffer. + * Decodes a ListMetadataImportsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetadataIntegration + * @returns ListMetadataImportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.MetadataIntegration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ListMetadataImportsResponse; /** - * Decodes a MetadataIntegration message from the specified reader or buffer, length delimited. + * Decodes a ListMetadataImportsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetadataIntegration + * @returns ListMetadataImportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.MetadataIntegration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ListMetadataImportsResponse; /** - * Verifies a MetadataIntegration message. + * Verifies a ListMetadataImportsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetadataIntegration message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetadataImportsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetadataIntegration + * @returns ListMetadataImportsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.MetadataIntegration; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ListMetadataImportsResponse; /** - * Creates a plain object from a MetadataIntegration message. Also converts values to other types if specified. - * @param message MetadataIntegration + * Creates a plain object from a ListMetadataImportsResponse message. Also converts values to other types if specified. + * @param message ListMetadataImportsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.MetadataIntegration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.ListMetadataImportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetadataIntegration to JSON. + * Converts this ListMetadataImportsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MetadataIntegration + * Gets the default type url for ListMetadataImportsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DataCatalogConfig. */ - interface IDataCatalogConfig { + /** Properties of a GetMetadataImportRequest. */ + interface IGetMetadataImportRequest { - /** DataCatalogConfig enabled */ - enabled?: (boolean|null); + /** GetMetadataImportRequest name */ + name?: (string|null); } - /** Represents a DataCatalogConfig. */ - class DataCatalogConfig implements IDataCatalogConfig { + /** Represents a GetMetadataImportRequest. */ + class GetMetadataImportRequest implements IGetMetadataImportRequest { /** - * Constructs a new DataCatalogConfig. + * Constructs a new GetMetadataImportRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IDataCatalogConfig); + constructor(properties?: google.cloud.metastore.v1alpha.IGetMetadataImportRequest); - /** DataCatalogConfig enabled. */ - public enabled: boolean; + /** GetMetadataImportRequest name. */ + public name: string; /** - * Creates a new DataCatalogConfig instance using the specified properties. + * Creates a new GetMetadataImportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DataCatalogConfig instance + * @returns GetMetadataImportRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IDataCatalogConfig): google.cloud.metastore.v1alpha.DataCatalogConfig; + public static create(properties?: google.cloud.metastore.v1alpha.IGetMetadataImportRequest): google.cloud.metastore.v1alpha.GetMetadataImportRequest; /** - * Encodes the specified DataCatalogConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.DataCatalogConfig.verify|verify} messages. - * @param message DataCatalogConfig message or plain object to encode + * Encodes the specified GetMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.GetMetadataImportRequest.verify|verify} messages. + * @param message GetMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IDataCatalogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IGetMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DataCatalogConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DataCatalogConfig.verify|verify} messages. - * @param message DataCatalogConfig message or plain object to encode + * Encodes the specified GetMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.GetMetadataImportRequest.verify|verify} messages. + * @param message GetMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IDataCatalogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IGetMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DataCatalogConfig message from the specified reader or buffer. + * Decodes a GetMetadataImportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DataCatalogConfig + * @returns GetMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.DataCatalogConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.GetMetadataImportRequest; /** - * Decodes a DataCatalogConfig message from the specified reader or buffer, length delimited. + * Decodes a GetMetadataImportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DataCatalogConfig + * @returns GetMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.DataCatalogConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.GetMetadataImportRequest; /** - * Verifies a DataCatalogConfig message. + * Verifies a GetMetadataImportRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DataCatalogConfig message from a plain object. Also converts values to their respective internal types. + * Creates a GetMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DataCatalogConfig + * @returns GetMetadataImportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.DataCatalogConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.GetMetadataImportRequest; /** - * Creates a plain object from a DataCatalogConfig message. Also converts values to other types if specified. - * @param message DataCatalogConfig + * Creates a plain object from a GetMetadataImportRequest message. Also converts values to other types if specified. + * @param message GetMetadataImportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.DataCatalogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.GetMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DataCatalogConfig to JSON. + * Converts this GetMetadataImportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DataCatalogConfig + * Gets the default type url for GetMetadataImportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DataplexConfig. */ - interface IDataplexConfig { + /** Properties of a CreateMetadataImportRequest. */ + interface ICreateMetadataImportRequest { - /** DataplexConfig lakeResources */ - lakeResources?: ({ [k: string]: google.cloud.metastore.v1alpha.ILake }|null); + /** CreateMetadataImportRequest parent */ + parent?: (string|null); + + /** CreateMetadataImportRequest metadataImportId */ + metadataImportId?: (string|null); + + /** CreateMetadataImportRequest metadataImport */ + metadataImport?: (google.cloud.metastore.v1alpha.IMetadataImport|null); + + /** CreateMetadataImportRequest requestId */ + requestId?: (string|null); } - /** Represents a DataplexConfig. */ - class DataplexConfig implements IDataplexConfig { + /** Represents a CreateMetadataImportRequest. */ + class CreateMetadataImportRequest implements ICreateMetadataImportRequest { /** - * Constructs a new DataplexConfig. + * Constructs a new CreateMetadataImportRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IDataplexConfig); + constructor(properties?: google.cloud.metastore.v1alpha.ICreateMetadataImportRequest); - /** DataplexConfig lakeResources. */ - public lakeResources: { [k: string]: google.cloud.metastore.v1alpha.ILake }; + /** CreateMetadataImportRequest parent. */ + public parent: string; + + /** CreateMetadataImportRequest metadataImportId. */ + public metadataImportId: string; + + /** CreateMetadataImportRequest metadataImport. */ + public metadataImport?: (google.cloud.metastore.v1alpha.IMetadataImport|null); + + /** CreateMetadataImportRequest requestId. */ + public requestId: string; /** - * Creates a new DataplexConfig instance using the specified properties. + * Creates a new CreateMetadataImportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DataplexConfig instance + * @returns CreateMetadataImportRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IDataplexConfig): google.cloud.metastore.v1alpha.DataplexConfig; + public static create(properties?: google.cloud.metastore.v1alpha.ICreateMetadataImportRequest): google.cloud.metastore.v1alpha.CreateMetadataImportRequest; /** - * Encodes the specified DataplexConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.DataplexConfig.verify|verify} messages. - * @param message DataplexConfig message or plain object to encode + * Encodes the specified CreateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateMetadataImportRequest.verify|verify} messages. + * @param message CreateMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IDataplexConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.ICreateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DataplexConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DataplexConfig.verify|verify} messages. - * @param message DataplexConfig message or plain object to encode + * Encodes the specified CreateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateMetadataImportRequest.verify|verify} messages. + * @param message CreateMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IDataplexConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.ICreateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DataplexConfig message from the specified reader or buffer. + * Decodes a CreateMetadataImportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DataplexConfig + * @returns CreateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.DataplexConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.CreateMetadataImportRequest; /** - * Decodes a DataplexConfig message from the specified reader or buffer, length delimited. + * Decodes a CreateMetadataImportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DataplexConfig + * @returns CreateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.DataplexConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.CreateMetadataImportRequest; /** - * Verifies a DataplexConfig message. + * Verifies a CreateMetadataImportRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DataplexConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CreateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DataplexConfig + * @returns CreateMetadataImportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.DataplexConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.CreateMetadataImportRequest; /** - * Creates a plain object from a DataplexConfig message. Also converts values to other types if specified. - * @param message DataplexConfig + * Creates a plain object from a CreateMetadataImportRequest message. Also converts values to other types if specified. + * @param message CreateMetadataImportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.DataplexConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.CreateMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DataplexConfig to JSON. + * Converts this CreateMetadataImportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DataplexConfig + * Gets the default type url for CreateMetadataImportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Lake. */ - interface ILake { + /** Properties of an UpdateMetadataImportRequest. */ + interface IUpdateMetadataImportRequest { - /** Lake name */ - name?: (string|null); + /** UpdateMetadataImportRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateMetadataImportRequest metadataImport */ + metadataImport?: (google.cloud.metastore.v1alpha.IMetadataImport|null); + + /** UpdateMetadataImportRequest requestId */ + requestId?: (string|null); } - /** Represents a Lake. */ - class Lake implements ILake { + /** Represents an UpdateMetadataImportRequest. */ + class UpdateMetadataImportRequest implements IUpdateMetadataImportRequest { /** - * Constructs a new Lake. + * Constructs a new UpdateMetadataImportRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.ILake); + constructor(properties?: google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest); - /** Lake name. */ - public name: string; + /** UpdateMetadataImportRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateMetadataImportRequest metadataImport. */ + public metadataImport?: (google.cloud.metastore.v1alpha.IMetadataImport|null); + + /** UpdateMetadataImportRequest requestId. */ + public requestId: string; /** - * Creates a new Lake instance using the specified properties. + * Creates a new UpdateMetadataImportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Lake instance + * @returns UpdateMetadataImportRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.ILake): google.cloud.metastore.v1alpha.Lake; + public static create(properties?: google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest): google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; /** - * Encodes the specified Lake message. Does not implicitly {@link google.cloud.metastore.v1alpha.Lake.verify|verify} messages. - * @param message Lake message or plain object to encode + * Encodes the specified UpdateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.verify|verify} messages. + * @param message UpdateMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.ILake, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Lake.verify|verify} messages. - * @param message Lake message or plain object to encode + * Encodes the specified UpdateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.verify|verify} messages. + * @param message UpdateMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.ILake, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Lake message from the specified reader or buffer. + * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Lake + * @returns UpdateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.Lake; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; /** - * Decodes a Lake message from the specified reader or buffer, length delimited. + * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Lake + * @returns UpdateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.Lake; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; /** - * Verifies a Lake message. + * Verifies an UpdateMetadataImportRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Lake message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Lake + * @returns UpdateMetadataImportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.Lake; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; /** - * Creates a plain object from a Lake message. Also converts values to other types if specified. - * @param message Lake + * Creates a plain object from an UpdateMetadataImportRequest message. Also converts values to other types if specified. + * @param message UpdateMetadataImportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.Lake, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.UpdateMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Lake to JSON. + * Converts this UpdateMetadataImportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Lake + * Gets the default type url for UpdateMetadataImportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MaintenanceWindow. */ - interface IMaintenanceWindow { + /** Properties of a ListBackupsRequest. */ + interface IListBackupsRequest { - /** MaintenanceWindow hourOfDay */ - hourOfDay?: (google.protobuf.IInt32Value|null); + /** ListBackupsRequest parent */ + parent?: (string|null); - /** MaintenanceWindow dayOfWeek */ - dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + /** ListBackupsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupsRequest filter */ + filter?: (string|null); + + /** ListBackupsRequest orderBy */ + orderBy?: (string|null); } - /** Represents a MaintenanceWindow. */ - class MaintenanceWindow implements IMaintenanceWindow { + /** Represents a ListBackupsRequest. */ + class ListBackupsRequest implements IListBackupsRequest { /** - * Constructs a new MaintenanceWindow. + * Constructs a new ListBackupsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IMaintenanceWindow); + constructor(properties?: google.cloud.metastore.v1alpha.IListBackupsRequest); - /** MaintenanceWindow hourOfDay. */ - public hourOfDay?: (google.protobuf.IInt32Value|null); + /** ListBackupsRequest parent. */ + public parent: string; - /** MaintenanceWindow dayOfWeek. */ - public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + /** ListBackupsRequest pageSize. */ + public pageSize: number; + + /** ListBackupsRequest pageToken. */ + public pageToken: string; + + /** ListBackupsRequest filter. */ + public filter: string; + + /** ListBackupsRequest orderBy. */ + public orderBy: string; /** - * Creates a new MaintenanceWindow instance using the specified properties. + * Creates a new ListBackupsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns MaintenanceWindow instance + * @returns ListBackupsRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IMaintenanceWindow): google.cloud.metastore.v1alpha.MaintenanceWindow; + public static create(properties?: google.cloud.metastore.v1alpha.IListBackupsRequest): google.cloud.metastore.v1alpha.ListBackupsRequest; /** - * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.metastore.v1alpha.MaintenanceWindow.verify|verify} messages. - * @param message MaintenanceWindow message or plain object to encode + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MaintenanceWindow.verify|verify} messages. - * @param message MaintenanceWindow message or plain object to encode + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MaintenanceWindow message from the specified reader or buffer. + * Decodes a ListBackupsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MaintenanceWindow + * @returns ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.MaintenanceWindow; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ListBackupsRequest; /** - * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MaintenanceWindow + * @returns ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.MaintenanceWindow; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ListBackupsRequest; /** - * Verifies a MaintenanceWindow message. + * Verifies a ListBackupsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MaintenanceWindow + * @returns ListBackupsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.MaintenanceWindow; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ListBackupsRequest; /** - * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. - * @param message MaintenanceWindow + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @param message ListBackupsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.MaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MaintenanceWindow to JSON. + * Converts this ListBackupsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MaintenanceWindow + * Gets the default type url for ListBackupsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a HiveMetastoreConfig. */ - interface IHiveMetastoreConfig { - - /** HiveMetastoreConfig version */ - version?: (string|null); - - /** HiveMetastoreConfig configOverrides */ - configOverrides?: ({ [k: string]: string }|null); + /** Properties of a ListBackupsResponse. */ + interface IListBackupsResponse { - /** HiveMetastoreConfig kerberosConfig */ - kerberosConfig?: (google.cloud.metastore.v1alpha.IKerberosConfig|null); + /** ListBackupsResponse backups */ + backups?: (google.cloud.metastore.v1alpha.IBackup[]|null); - /** HiveMetastoreConfig endpointProtocol */ - endpointProtocol?: (google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol|keyof typeof google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol|null); + /** ListBackupsResponse nextPageToken */ + nextPageToken?: (string|null); - /** HiveMetastoreConfig auxiliaryVersions */ - auxiliaryVersions?: ({ [k: string]: google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig }|null); + /** ListBackupsResponse unreachable */ + unreachable?: (string[]|null); } - /** Represents a HiveMetastoreConfig. */ - class HiveMetastoreConfig implements IHiveMetastoreConfig { + /** Represents a ListBackupsResponse. */ + class ListBackupsResponse implements IListBackupsResponse { /** - * Constructs a new HiveMetastoreConfig. + * Constructs a new ListBackupsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IHiveMetastoreConfig); - - /** HiveMetastoreConfig version. */ - public version: string; - - /** HiveMetastoreConfig configOverrides. */ - public configOverrides: { [k: string]: string }; + constructor(properties?: google.cloud.metastore.v1alpha.IListBackupsResponse); - /** HiveMetastoreConfig kerberosConfig. */ - public kerberosConfig?: (google.cloud.metastore.v1alpha.IKerberosConfig|null); + /** ListBackupsResponse backups. */ + public backups: google.cloud.metastore.v1alpha.IBackup[]; - /** HiveMetastoreConfig endpointProtocol. */ - public endpointProtocol: (google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol|keyof typeof google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol); + /** ListBackupsResponse nextPageToken. */ + public nextPageToken: string; - /** HiveMetastoreConfig auxiliaryVersions. */ - public auxiliaryVersions: { [k: string]: google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig }; + /** ListBackupsResponse unreachable. */ + public unreachable: string[]; /** - * Creates a new HiveMetastoreConfig instance using the specified properties. + * Creates a new ListBackupsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns HiveMetastoreConfig instance + * @returns ListBackupsResponse instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IHiveMetastoreConfig): google.cloud.metastore.v1alpha.HiveMetastoreConfig; + public static create(properties?: google.cloud.metastore.v1alpha.IListBackupsResponse): google.cloud.metastore.v1alpha.ListBackupsResponse; /** - * Encodes the specified HiveMetastoreConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.HiveMetastoreConfig.verify|verify} messages. - * @param message HiveMetastoreConfig message or plain object to encode + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IHiveMetastoreConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HiveMetastoreConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.HiveMetastoreConfig.verify|verify} messages. - * @param message HiveMetastoreConfig message or plain object to encode + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IHiveMetastoreConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HiveMetastoreConfig message from the specified reader or buffer. + * Decodes a ListBackupsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HiveMetastoreConfig + * @returns ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.HiveMetastoreConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ListBackupsResponse; /** - * Decodes a HiveMetastoreConfig message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HiveMetastoreConfig + * @returns ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.HiveMetastoreConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ListBackupsResponse; /** - * Verifies a HiveMetastoreConfig message. + * Verifies a ListBackupsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HiveMetastoreConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HiveMetastoreConfig + * @returns ListBackupsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.HiveMetastoreConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ListBackupsResponse; /** - * Creates a plain object from a HiveMetastoreConfig message. Also converts values to other types if specified. - * @param message HiveMetastoreConfig + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * @param message ListBackupsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.HiveMetastoreConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HiveMetastoreConfig to JSON. + * Converts this ListBackupsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for HiveMetastoreConfig + * Gets the default type url for ListBackupsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace HiveMetastoreConfig { - - /** EndpointProtocol enum. */ - enum EndpointProtocol { - ENDPOINT_PROTOCOL_UNSPECIFIED = 0, - THRIFT = 1, - GRPC = 2 - } - } - - /** Properties of a KerberosConfig. */ - interface IKerberosConfig { - - /** KerberosConfig keytab */ - keytab?: (google.cloud.metastore.v1alpha.ISecret|null); - - /** KerberosConfig principal */ - principal?: (string|null); + /** Properties of a GetBackupRequest. */ + interface IGetBackupRequest { - /** KerberosConfig krb5ConfigGcsUri */ - krb5ConfigGcsUri?: (string|null); + /** GetBackupRequest name */ + name?: (string|null); } - /** Represents a KerberosConfig. */ - class KerberosConfig implements IKerberosConfig { + /** Represents a GetBackupRequest. */ + class GetBackupRequest implements IGetBackupRequest { /** - * Constructs a new KerberosConfig. + * Constructs a new GetBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IKerberosConfig); - - /** KerberosConfig keytab. */ - public keytab?: (google.cloud.metastore.v1alpha.ISecret|null); - - /** KerberosConfig principal. */ - public principal: string; + constructor(properties?: google.cloud.metastore.v1alpha.IGetBackupRequest); - /** KerberosConfig krb5ConfigGcsUri. */ - public krb5ConfigGcsUri: string; + /** GetBackupRequest name. */ + public name: string; /** - * Creates a new KerberosConfig instance using the specified properties. + * Creates a new GetBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns KerberosConfig instance + * @returns GetBackupRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IKerberosConfig): google.cloud.metastore.v1alpha.KerberosConfig; + public static create(properties?: google.cloud.metastore.v1alpha.IGetBackupRequest): google.cloud.metastore.v1alpha.GetBackupRequest; /** - * Encodes the specified KerberosConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.KerberosConfig.verify|verify} messages. - * @param message KerberosConfig message or plain object to encode + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IKerberosConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified KerberosConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.KerberosConfig.verify|verify} messages. - * @param message KerberosConfig message or plain object to encode + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IKerberosConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a KerberosConfig message from the specified reader or buffer. + * Decodes a GetBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns KerberosConfig + * @returns GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.KerberosConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.GetBackupRequest; /** - * Decodes a KerberosConfig message from the specified reader or buffer, length delimited. + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns KerberosConfig + * @returns GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.KerberosConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.GetBackupRequest; /** - * Verifies a KerberosConfig message. + * Verifies a GetBackupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a KerberosConfig message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns KerberosConfig + * @returns GetBackupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.KerberosConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.GetBackupRequest; /** - * Creates a plain object from a KerberosConfig message. Also converts values to other types if specified. - * @param message KerberosConfig + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @param message GetBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.KerberosConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this KerberosConfig to JSON. + * Converts this GetBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for KerberosConfig + * Gets the default type url for GetBackupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Secret. */ - interface ISecret { + /** Properties of a CreateBackupRequest. */ + interface ICreateBackupRequest { - /** Secret cloudSecret */ - cloudSecret?: (string|null); + /** CreateBackupRequest parent */ + parent?: (string|null); + + /** CreateBackupRequest backupId */ + backupId?: (string|null); + + /** CreateBackupRequest backup */ + backup?: (google.cloud.metastore.v1alpha.IBackup|null); + + /** CreateBackupRequest requestId */ + requestId?: (string|null); } - /** Represents a Secret. */ - class Secret implements ISecret { + /** Represents a CreateBackupRequest. */ + class CreateBackupRequest implements ICreateBackupRequest { /** - * Constructs a new Secret. + * Constructs a new CreateBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.ISecret); + constructor(properties?: google.cloud.metastore.v1alpha.ICreateBackupRequest); - /** Secret cloudSecret. */ - public cloudSecret?: (string|null); + /** CreateBackupRequest parent. */ + public parent: string; - /** Secret value. */ - public value?: "cloudSecret"; + /** CreateBackupRequest backupId. */ + public backupId: string; + + /** CreateBackupRequest backup. */ + public backup?: (google.cloud.metastore.v1alpha.IBackup|null); + + /** CreateBackupRequest requestId. */ + public requestId: string; /** - * Creates a new Secret instance using the specified properties. + * Creates a new CreateBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Secret instance + * @returns CreateBackupRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.ISecret): google.cloud.metastore.v1alpha.Secret; + public static create(properties?: google.cloud.metastore.v1alpha.ICreateBackupRequest): google.cloud.metastore.v1alpha.CreateBackupRequest; /** - * Encodes the specified Secret message. Does not implicitly {@link google.cloud.metastore.v1alpha.Secret.verify|verify} messages. - * @param message Secret message or plain object to encode + * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateBackupRequest.verify|verify} messages. + * @param message CreateBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.ISecret, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Secret message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Secret.verify|verify} messages. - * @param message Secret message or plain object to encode + * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateBackupRequest.verify|verify} messages. + * @param message CreateBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.ISecret, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Secret message from the specified reader or buffer. + * Decodes a CreateBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Secret + * @returns CreateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.Secret; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.CreateBackupRequest; /** - * Decodes a Secret message from the specified reader or buffer, length delimited. + * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Secret + * @returns CreateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.Secret; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.CreateBackupRequest; /** - * Verifies a Secret message. + * Verifies a CreateBackupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Secret message from a plain object. Also converts values to their respective internal types. + * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Secret + * @returns CreateBackupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.Secret; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.CreateBackupRequest; /** - * Creates a plain object from a Secret message. Also converts values to other types if specified. - * @param message Secret + * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. + * @param message CreateBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.Secret, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.CreateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Secret to JSON. + * Converts this CreateBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Secret + * Gets the default type url for CreateBackupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EncryptionConfig. */ - interface IEncryptionConfig { + /** Properties of a DeleteBackupRequest. */ + interface IDeleteBackupRequest { - /** EncryptionConfig kmsKey */ - kmsKey?: (string|null); + /** DeleteBackupRequest name */ + name?: (string|null); + + /** DeleteBackupRequest requestId */ + requestId?: (string|null); } - /** Represents an EncryptionConfig. */ - class EncryptionConfig implements IEncryptionConfig { + /** Represents a DeleteBackupRequest. */ + class DeleteBackupRequest implements IDeleteBackupRequest { /** - * Constructs a new EncryptionConfig. + * Constructs a new DeleteBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IEncryptionConfig); + constructor(properties?: google.cloud.metastore.v1alpha.IDeleteBackupRequest); - /** EncryptionConfig kmsKey. */ - public kmsKey: string; + /** DeleteBackupRequest name. */ + public name: string; + + /** DeleteBackupRequest requestId. */ + public requestId: string; /** - * Creates a new EncryptionConfig instance using the specified properties. + * Creates a new DeleteBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns EncryptionConfig instance + * @returns DeleteBackupRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IEncryptionConfig): google.cloud.metastore.v1alpha.EncryptionConfig; + public static create(properties?: google.cloud.metastore.v1alpha.IDeleteBackupRequest): google.cloud.metastore.v1alpha.DeleteBackupRequest; /** - * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.EncryptionConfig.verify|verify} messages. - * @param message EncryptionConfig message or plain object to encode + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.EncryptionConfig.verify|verify} messages. - * @param message EncryptionConfig message or plain object to encode + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EncryptionConfig message from the specified reader or buffer. + * Decodes a DeleteBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EncryptionConfig + * @returns DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.EncryptionConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.DeleteBackupRequest; /** - * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EncryptionConfig + * @returns DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.EncryptionConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.DeleteBackupRequest; /** - * Verifies an EncryptionConfig message. + * Verifies a DeleteBackupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EncryptionConfig + * @returns DeleteBackupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.EncryptionConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.DeleteBackupRequest; /** - * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. - * @param message EncryptionConfig + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * @param message DeleteBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EncryptionConfig to JSON. + * Converts this DeleteBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EncryptionConfig + * Gets the default type url for DeleteBackupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AuxiliaryVersionConfig. */ - interface IAuxiliaryVersionConfig { + /** Properties of an ExportMetadataRequest. */ + interface IExportMetadataRequest { - /** AuxiliaryVersionConfig version */ - version?: (string|null); + /** ExportMetadataRequest destinationGcsFolder */ + destinationGcsFolder?: (string|null); - /** AuxiliaryVersionConfig configOverrides */ - configOverrides?: ({ [k: string]: string }|null); + /** ExportMetadataRequest service */ + service?: (string|null); - /** AuxiliaryVersionConfig networkConfig */ - networkConfig?: (google.cloud.metastore.v1alpha.INetworkConfig|null); + /** ExportMetadataRequest requestId */ + requestId?: (string|null); + + /** ExportMetadataRequest databaseDumpType */ + databaseDumpType?: (google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|null); } - /** Represents an AuxiliaryVersionConfig. */ - class AuxiliaryVersionConfig implements IAuxiliaryVersionConfig { + /** Represents an ExportMetadataRequest. */ + class ExportMetadataRequest implements IExportMetadataRequest { /** - * Constructs a new AuxiliaryVersionConfig. + * Constructs a new ExportMetadataRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig); + constructor(properties?: google.cloud.metastore.v1alpha.IExportMetadataRequest); - /** AuxiliaryVersionConfig version. */ - public version: string; + /** ExportMetadataRequest destinationGcsFolder. */ + public destinationGcsFolder?: (string|null); - /** AuxiliaryVersionConfig configOverrides. */ - public configOverrides: { [k: string]: string }; + /** ExportMetadataRequest service. */ + public service: string; - /** AuxiliaryVersionConfig networkConfig. */ - public networkConfig?: (google.cloud.metastore.v1alpha.INetworkConfig|null); + /** ExportMetadataRequest requestId. */ + public requestId: string; + + /** ExportMetadataRequest databaseDumpType. */ + public databaseDumpType: (google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type); + + /** ExportMetadataRequest destination. */ + public destination?: "destinationGcsFolder"; /** - * Creates a new AuxiliaryVersionConfig instance using the specified properties. + * Creates a new ExportMetadataRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AuxiliaryVersionConfig instance + * @returns ExportMetadataRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig): google.cloud.metastore.v1alpha.AuxiliaryVersionConfig; + public static create(properties?: google.cloud.metastore.v1alpha.IExportMetadataRequest): google.cloud.metastore.v1alpha.ExportMetadataRequest; /** - * Encodes the specified AuxiliaryVersionConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.verify|verify} messages. - * @param message AuxiliaryVersionConfig message or plain object to encode + * Encodes the specified ExportMetadataRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ExportMetadataRequest.verify|verify} messages. + * @param message ExportMetadataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IExportMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AuxiliaryVersionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.verify|verify} messages. - * @param message AuxiliaryVersionConfig message or plain object to encode + * Encodes the specified ExportMetadataRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ExportMetadataRequest.verify|verify} messages. + * @param message ExportMetadataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IExportMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer. + * Decodes an ExportMetadataRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AuxiliaryVersionConfig + * @returns ExportMetadataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.AuxiliaryVersionConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ExportMetadataRequest; /** - * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer, length delimited. + * Decodes an ExportMetadataRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AuxiliaryVersionConfig + * @returns ExportMetadataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.AuxiliaryVersionConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ExportMetadataRequest; /** - * Verifies an AuxiliaryVersionConfig message. + * Verifies an ExportMetadataRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AuxiliaryVersionConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ExportMetadataRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AuxiliaryVersionConfig + * @returns ExportMetadataRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.AuxiliaryVersionConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ExportMetadataRequest; /** - * Creates a plain object from an AuxiliaryVersionConfig message. Also converts values to other types if specified. - * @param message AuxiliaryVersionConfig + * Creates a plain object from an ExportMetadataRequest message. Also converts values to other types if specified. + * @param message ExportMetadataRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.AuxiliaryVersionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.ExportMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AuxiliaryVersionConfig to JSON. + * Converts this ExportMetadataRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AuxiliaryVersionConfig + * Gets the default type url for ExportMetadataRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NetworkConfig. */ - interface INetworkConfig { + /** Properties of a RestoreServiceRequest. */ + interface IRestoreServiceRequest { - /** NetworkConfig consumers */ - consumers?: (google.cloud.metastore.v1alpha.NetworkConfig.IConsumer[]|null); + /** RestoreServiceRequest service */ + service?: (string|null); + + /** RestoreServiceRequest backup */ + backup?: (string|null); + + /** RestoreServiceRequest restoreType */ + restoreType?: (google.cloud.metastore.v1alpha.Restore.RestoreType|keyof typeof google.cloud.metastore.v1alpha.Restore.RestoreType|null); + + /** RestoreServiceRequest requestId */ + requestId?: (string|null); } - /** Represents a NetworkConfig. */ - class NetworkConfig implements INetworkConfig { + /** Represents a RestoreServiceRequest. */ + class RestoreServiceRequest implements IRestoreServiceRequest { /** - * Constructs a new NetworkConfig. + * Constructs a new RestoreServiceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.INetworkConfig); + constructor(properties?: google.cloud.metastore.v1alpha.IRestoreServiceRequest); - /** NetworkConfig consumers. */ - public consumers: google.cloud.metastore.v1alpha.NetworkConfig.IConsumer[]; + /** RestoreServiceRequest service. */ + public service: string; + + /** RestoreServiceRequest backup. */ + public backup: string; + + /** RestoreServiceRequest restoreType. */ + public restoreType: (google.cloud.metastore.v1alpha.Restore.RestoreType|keyof typeof google.cloud.metastore.v1alpha.Restore.RestoreType); + + /** RestoreServiceRequest requestId. */ + public requestId: string; /** - * Creates a new NetworkConfig instance using the specified properties. + * Creates a new RestoreServiceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns NetworkConfig instance + * @returns RestoreServiceRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.INetworkConfig): google.cloud.metastore.v1alpha.NetworkConfig; + public static create(properties?: google.cloud.metastore.v1alpha.IRestoreServiceRequest): google.cloud.metastore.v1alpha.RestoreServiceRequest; /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode + * Encodes the specified RestoreServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.RestoreServiceRequest.verify|verify} messages. + * @param message RestoreServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IRestoreServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode + * Encodes the specified RestoreServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.RestoreServiceRequest.verify|verify} messages. + * @param message RestoreServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IRestoreServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NetworkConfig message from the specified reader or buffer. + * Decodes a RestoreServiceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NetworkConfig + * @returns RestoreServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.NetworkConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.RestoreServiceRequest; /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * Decodes a RestoreServiceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NetworkConfig + * @returns RestoreServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.NetworkConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.RestoreServiceRequest; /** - * Verifies a NetworkConfig message. + * Verifies a RestoreServiceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreServiceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NetworkConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.NetworkConfig; - - /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @param message NetworkConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.metastore.v1alpha.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkConfig to JSON. - * @returns JSON object + * @returns RestoreServiceRequest */ - public toJSON(): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.RestoreServiceRequest; /** - * Gets the default type url for NetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkConfig { - - /** Properties of a Consumer. */ - interface IConsumer { - - /** Consumer subnetwork */ - subnetwork?: (string|null); - - /** Consumer endpointUri */ - endpointUri?: (string|null); - } - - /** Represents a Consumer. */ - class Consumer implements IConsumer { - - /** - * Constructs a new Consumer. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.metastore.v1alpha.NetworkConfig.IConsumer); - - /** Consumer subnetwork. */ - public subnetwork?: (string|null); - - /** Consumer endpointUri. */ - public endpointUri: string; - - /** Consumer vpcResource. */ - public vpcResource?: "subnetwork"; - - /** - * Creates a new Consumer instance using the specified properties. - * @param [properties] Properties to set - * @returns Consumer instance - */ - public static create(properties?: google.cloud.metastore.v1alpha.NetworkConfig.IConsumer): google.cloud.metastore.v1alpha.NetworkConfig.Consumer; - - /** - * Encodes the specified Consumer message. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.Consumer.verify|verify} messages. - * @param message Consumer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.metastore.v1alpha.NetworkConfig.IConsumer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Consumer message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.Consumer.verify|verify} messages. - * @param message Consumer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.NetworkConfig.IConsumer, writer?: $protobuf.Writer): $protobuf.Writer; + * Creates a plain object from a RestoreServiceRequest message. Also converts values to other types if specified. + * @param message RestoreServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.RestoreServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a Consumer message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Consumer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.NetworkConfig.Consumer; + /** + * Converts this RestoreServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a Consumer message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Consumer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.NetworkConfig.Consumer; + /** + * Gets the default type url for RestoreServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Verifies a Consumer message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { - /** - * Creates a Consumer message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Consumer - */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.NetworkConfig.Consumer; + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a plain object from a Consumer message. Also converts values to other types if specified. - * @param message Consumer - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.metastore.v1alpha.NetworkConfig.Consumer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** - * Converts this Consumer to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** OperationMetadata target */ + target?: (string|null); - /** - * Gets the default type url for Consumer - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** OperationMetadata verb */ + verb?: (string|null); - /** Properties of a MetadataManagementActivity. */ - interface IMetadataManagementActivity { + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); - /** MetadataManagementActivity metadataExports */ - metadataExports?: (google.cloud.metastore.v1alpha.IMetadataExport[]|null); + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); - /** MetadataManagementActivity restores */ - restores?: (google.cloud.metastore.v1alpha.IRestore[]|null); + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); } - /** Represents a MetadataManagementActivity. */ - class MetadataManagementActivity implements IMetadataManagementActivity { + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { /** - * Constructs a new MetadataManagementActivity. + * Constructs a new OperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IMetadataManagementActivity); + constructor(properties?: google.cloud.metastore.v1alpha.IOperationMetadata); - /** MetadataManagementActivity metadataExports. */ - public metadataExports: google.cloud.metastore.v1alpha.IMetadataExport[]; + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** MetadataManagementActivity restores. */ - public restores: google.cloud.metastore.v1alpha.IRestore[]; + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; /** - * Creates a new MetadataManagementActivity instance using the specified properties. + * Creates a new OperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns MetadataManagementActivity instance + * @returns OperationMetadata instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IMetadataManagementActivity): google.cloud.metastore.v1alpha.MetadataManagementActivity; + public static create(properties?: google.cloud.metastore.v1alpha.IOperationMetadata): google.cloud.metastore.v1alpha.OperationMetadata; /** - * Encodes the specified MetadataManagementActivity message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataManagementActivity.verify|verify} messages. - * @param message MetadataManagementActivity message or plain object to encode + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.metastore.v1alpha.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IMetadataManagementActivity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetadataManagementActivity message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataManagementActivity.verify|verify} messages. - * @param message MetadataManagementActivity message or plain object to encode + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IMetadataManagementActivity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetadataManagementActivity message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetadataManagementActivity + * @returns OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.MetadataManagementActivity; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.OperationMetadata; /** - * Decodes a MetadataManagementActivity message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetadataManagementActivity + * @returns OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.MetadataManagementActivity; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.OperationMetadata; /** - * Verifies a MetadataManagementActivity message. + * Verifies an OperationMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetadataManagementActivity message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetadataManagementActivity + * @returns OperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.MetadataManagementActivity; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.OperationMetadata; /** - * Creates a plain object from a MetadataManagementActivity message. Also converts values to other types if specified. - * @param message MetadataManagementActivity + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.MetadataManagementActivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetadataManagementActivity to JSON. + * Converts this OperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MetadataManagementActivity + * Gets the default type url for OperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MetadataImport. */ - interface IMetadataImport { - - /** MetadataImport databaseDump */ - databaseDump?: (google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump|null); - - /** MetadataImport name */ - name?: (string|null); - - /** MetadataImport description */ - description?: (string|null); - - /** MetadataImport createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** MetadataImport updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** MetadataImport endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** Properties of a LocationMetadata. */ + interface ILocationMetadata { - /** MetadataImport state */ - state?: (google.cloud.metastore.v1alpha.MetadataImport.State|keyof typeof google.cloud.metastore.v1alpha.MetadataImport.State|null); + /** LocationMetadata supportedHiveMetastoreVersions */ + supportedHiveMetastoreVersions?: (google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion[]|null); } - /** Represents a MetadataImport. */ - class MetadataImport implements IMetadataImport { + /** Represents a LocationMetadata. */ + class LocationMetadata implements ILocationMetadata { /** - * Constructs a new MetadataImport. + * Constructs a new LocationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IMetadataImport); - - /** MetadataImport databaseDump. */ - public databaseDump?: (google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump|null); - - /** MetadataImport name. */ - public name: string; - - /** MetadataImport description. */ - public description: string; - - /** MetadataImport createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** MetadataImport updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** MetadataImport endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** MetadataImport state. */ - public state: (google.cloud.metastore.v1alpha.MetadataImport.State|keyof typeof google.cloud.metastore.v1alpha.MetadataImport.State); + constructor(properties?: google.cloud.metastore.v1alpha.ILocationMetadata); - /** MetadataImport metadata. */ - public metadata?: "databaseDump"; + /** LocationMetadata supportedHiveMetastoreVersions. */ + public supportedHiveMetastoreVersions: google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion[]; /** - * Creates a new MetadataImport instance using the specified properties. + * Creates a new LocationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns MetadataImport instance + * @returns LocationMetadata instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IMetadataImport): google.cloud.metastore.v1alpha.MetadataImport; + public static create(properties?: google.cloud.metastore.v1alpha.ILocationMetadata): google.cloud.metastore.v1alpha.LocationMetadata; /** - * Encodes the specified MetadataImport message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.verify|verify} messages. - * @param message MetadataImport message or plain object to encode + * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.verify|verify} messages. + * @param message LocationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IMetadataImport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetadataImport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.verify|verify} messages. - * @param message MetadataImport message or plain object to encode + * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.verify|verify} messages. + * @param message LocationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IMetadataImport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetadataImport message from the specified reader or buffer. + * Decodes a LocationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetadataImport + * @returns LocationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.MetadataImport; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.LocationMetadata; /** - * Decodes a MetadataImport message from the specified reader or buffer, length delimited. + * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetadataImport + * @returns LocationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.MetadataImport; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.LocationMetadata; /** - * Verifies a MetadataImport message. + * Verifies a LocationMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetadataImport message from a plain object. Also converts values to their respective internal types. + * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetadataImport + * @returns LocationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.MetadataImport; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.LocationMetadata; /** - * Creates a plain object from a MetadataImport message. Also converts values to other types if specified. - * @param message MetadataImport + * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. + * @param message LocationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.MetadataImport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.LocationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetadataImport to JSON. + * Converts this LocationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MetadataImport + * Gets the default type url for LocationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace MetadataImport { - - /** Properties of a DatabaseDump. */ - interface IDatabaseDump { - - /** DatabaseDump databaseType */ - databaseType?: (google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType|keyof typeof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType|null); + namespace LocationMetadata { - /** DatabaseDump gcsUri */ - gcsUri?: (string|null); + /** Properties of a HiveMetastoreVersion. */ + interface IHiveMetastoreVersion { - /** DatabaseDump sourceDatabase */ - sourceDatabase?: (string|null); + /** HiveMetastoreVersion version */ + version?: (string|null); - /** DatabaseDump type */ - type?: (google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|null); + /** HiveMetastoreVersion isDefault */ + isDefault?: (boolean|null); } - /** Represents a DatabaseDump. */ - class DatabaseDump implements IDatabaseDump { + /** Represents a HiveMetastoreVersion. */ + class HiveMetastoreVersion implements IHiveMetastoreVersion { /** - * Constructs a new DatabaseDump. + * Constructs a new HiveMetastoreVersion. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump); - - /** DatabaseDump databaseType. */ - public databaseType: (google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType|keyof typeof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType); - - /** DatabaseDump gcsUri. */ - public gcsUri: string; + constructor(properties?: google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion); - /** DatabaseDump sourceDatabase. */ - public sourceDatabase: string; + /** HiveMetastoreVersion version. */ + public version: string; - /** DatabaseDump type. */ - public type: (google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type); + /** HiveMetastoreVersion isDefault. */ + public isDefault: boolean; /** - * Creates a new DatabaseDump instance using the specified properties. + * Creates a new HiveMetastoreVersion instance using the specified properties. * @param [properties] Properties to set - * @returns DatabaseDump instance + * @returns HiveMetastoreVersion instance */ - public static create(properties?: google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump): google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump; + public static create(properties?: google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion): google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion; /** - * Encodes the specified DatabaseDump message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.verify|verify} messages. - * @param message DatabaseDump message or plain object to encode + * Encodes the specified HiveMetastoreVersion message. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. + * @param message HiveMetastoreVersion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DatabaseDump message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.verify|verify} messages. - * @param message DatabaseDump message or plain object to encode + * Encodes the specified HiveMetastoreVersion message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. + * @param message HiveMetastoreVersion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DatabaseDump message from the specified reader or buffer. + * Decodes a HiveMetastoreVersion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DatabaseDump + * @returns HiveMetastoreVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion; /** - * Decodes a DatabaseDump message from the specified reader or buffer, length delimited. + * Decodes a HiveMetastoreVersion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DatabaseDump + * @returns HiveMetastoreVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion; /** - * Verifies a DatabaseDump message. + * Verifies a HiveMetastoreVersion message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DatabaseDump message from a plain object. Also converts values to their respective internal types. + * Creates a HiveMetastoreVersion message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DatabaseDump + * @returns HiveMetastoreVersion */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion; /** - * Creates a plain object from a DatabaseDump message. Also converts values to other types if specified. - * @param message DatabaseDump + * Creates a plain object from a HiveMetastoreVersion message. Also converts values to other types if specified. + * @param message HiveMetastoreVersion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DatabaseDump to JSON. + * Converts this HiveMetastoreVersion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DatabaseDump + * Gets the default type url for HiveMetastoreVersion * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - namespace DatabaseDump { + /** Properties of a DatabaseDumpSpec. */ + interface IDatabaseDumpSpec { + } - /** DatabaseType enum. */ - enum DatabaseType { - DATABASE_TYPE_UNSPECIFIED = 0, - MYSQL = 1 - } - } + /** Represents a DatabaseDumpSpec. */ + class DatabaseDumpSpec implements IDatabaseDumpSpec { - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - SUCCEEDED = 2, - UPDATING = 3, - FAILED = 4 - } - } + /** + * Constructs a new DatabaseDumpSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IDatabaseDumpSpec); - /** Properties of a MetadataExport. */ - interface IMetadataExport { + /** + * Creates a new DatabaseDumpSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseDumpSpec instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IDatabaseDumpSpec): google.cloud.metastore.v1alpha.DatabaseDumpSpec; - /** MetadataExport destinationGcsUri */ - destinationGcsUri?: (string|null); + /** + * Encodes the specified DatabaseDumpSpec message. Does not implicitly {@link google.cloud.metastore.v1alpha.DatabaseDumpSpec.verify|verify} messages. + * @param message DatabaseDumpSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IDatabaseDumpSpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** MetadataExport startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified DatabaseDumpSpec message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DatabaseDumpSpec.verify|verify} messages. + * @param message DatabaseDumpSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IDatabaseDumpSpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** MetadataExport endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes a DatabaseDumpSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseDumpSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.DatabaseDumpSpec; - /** MetadataExport state */ - state?: (google.cloud.metastore.v1alpha.MetadataExport.State|keyof typeof google.cloud.metastore.v1alpha.MetadataExport.State|null); + /** + * Decodes a DatabaseDumpSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseDumpSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.DatabaseDumpSpec; - /** MetadataExport databaseDumpType */ - databaseDumpType?: (google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|null); - } + /** + * Verifies a DatabaseDumpSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a MetadataExport. */ - class MetadataExport implements IMetadataExport { + /** + * Creates a DatabaseDumpSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseDumpSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.DatabaseDumpSpec; /** - * Constructs a new MetadataExport. - * @param [properties] Properties to set + * Creates a plain object from a DatabaseDumpSpec message. Also converts values to other types if specified. + * @param message DatabaseDumpSpec + * @param [options] Conversion options + * @returns Plain object */ - constructor(properties?: google.cloud.metastore.v1alpha.IMetadataExport); + public static toObject(message: google.cloud.metastore.v1alpha.DatabaseDumpSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MetadataExport destinationGcsUri. */ - public destinationGcsUri?: (string|null); + /** + * Converts this DatabaseDumpSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** MetadataExport startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** + * Gets the default type url for DatabaseDumpSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** MetadataExport endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + namespace DatabaseDumpSpec { - /** MetadataExport state. */ - public state: (google.cloud.metastore.v1alpha.MetadataExport.State|keyof typeof google.cloud.metastore.v1alpha.MetadataExport.State); + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + MYSQL = 1, + AVRO = 2 + } + } - /** MetadataExport databaseDumpType. */ - public databaseDumpType: (google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type); + /** Represents a DataprocMetastoreFederation */ + class DataprocMetastoreFederation extends $protobuf.rpc.Service { + + /** + * Constructs a new DataprocMetastoreFederation service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new DataprocMetastoreFederation service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataprocMetastoreFederation; + + /** + * Calls ListFederations. + * @param request ListFederationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFederationsResponse + */ + public listFederations(request: google.cloud.metastore.v1alpha.IListFederationsRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastoreFederation.ListFederationsCallback): void; + + /** + * Calls ListFederations. + * @param request ListFederationsRequest message or plain object + * @returns Promise + */ + public listFederations(request: google.cloud.metastore.v1alpha.IListFederationsRequest): Promise; - /** MetadataExport destination. */ - public destination?: "destinationGcsUri"; + /** + * Calls GetFederation. + * @param request GetFederationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Federation + */ + public getFederation(request: google.cloud.metastore.v1alpha.IGetFederationRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastoreFederation.GetFederationCallback): void; /** - * Creates a new MetadataExport instance using the specified properties. - * @param [properties] Properties to set - * @returns MetadataExport instance + * Calls GetFederation. + * @param request GetFederationRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.metastore.v1alpha.IMetadataExport): google.cloud.metastore.v1alpha.MetadataExport; + public getFederation(request: google.cloud.metastore.v1alpha.IGetFederationRequest): Promise; /** - * Encodes the specified MetadataExport message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataExport.verify|verify} messages. - * @param message MetadataExport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateFederation. + * @param request CreateFederationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encode(message: google.cloud.metastore.v1alpha.IMetadataExport, writer?: $protobuf.Writer): $protobuf.Writer; + public createFederation(request: google.cloud.metastore.v1alpha.ICreateFederationRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastoreFederation.CreateFederationCallback): void; /** - * Encodes the specified MetadataExport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataExport.verify|verify} messages. - * @param message MetadataExport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateFederation. + * @param request CreateFederationRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IMetadataExport, writer?: $protobuf.Writer): $protobuf.Writer; + public createFederation(request: google.cloud.metastore.v1alpha.ICreateFederationRequest): Promise; /** - * Decodes a MetadataExport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetadataExport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateFederation. + * @param request UpdateFederationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.MetadataExport; + public updateFederation(request: google.cloud.metastore.v1alpha.IUpdateFederationRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastoreFederation.UpdateFederationCallback): void; /** - * Decodes a MetadataExport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetadataExport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateFederation. + * @param request UpdateFederationRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.MetadataExport; + public updateFederation(request: google.cloud.metastore.v1alpha.IUpdateFederationRequest): Promise; /** - * Verifies a MetadataExport message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls DeleteFederation. + * @param request DeleteFederationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static verify(message: { [k: string]: any }): (string|null); + public deleteFederation(request: google.cloud.metastore.v1alpha.IDeleteFederationRequest, callback: google.cloud.metastore.v1alpha.DataprocMetastoreFederation.DeleteFederationCallback): void; /** - * Creates a MetadataExport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetadataExport + * Calls DeleteFederation. + * @param request DeleteFederationRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.MetadataExport; + public deleteFederation(request: google.cloud.metastore.v1alpha.IDeleteFederationRequest): Promise; + } + + namespace DataprocMetastoreFederation { /** - * Creates a plain object from a MetadataExport message. Also converts values to other types if specified. - * @param message MetadataExport - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastoreFederation|listFederations}. + * @param error Error, if any + * @param [response] ListFederationsResponse */ - public static toObject(message: google.cloud.metastore.v1alpha.MetadataExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type ListFederationsCallback = (error: (Error|null), response?: google.cloud.metastore.v1alpha.ListFederationsResponse) => void; /** - * Converts this MetadataExport to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastoreFederation|getFederation}. + * @param error Error, if any + * @param [response] Federation */ - public toJSON(): { [k: string]: any }; + type GetFederationCallback = (error: (Error|null), response?: google.cloud.metastore.v1alpha.Federation) => void; /** - * Gets the default type url for MetadataExport - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastoreFederation|createFederation}. + * @param error Error, if any + * @param [response] Operation */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + type CreateFederationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - namespace MetadataExport { + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastoreFederation|updateFederation}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateFederationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - SUCCEEDED = 2, - FAILED = 3, - CANCELLED = 4 - } + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastoreFederation|deleteFederation}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteFederationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } - /** Properties of a Backup. */ - interface IBackup { + /** Properties of a Federation. */ + interface IFederation { - /** Backup name */ + /** Federation name */ name?: (string|null); - /** Backup createTime */ + /** Federation createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** Backup endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** Federation updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** Backup state */ - state?: (google.cloud.metastore.v1alpha.Backup.State|keyof typeof google.cloud.metastore.v1alpha.Backup.State|null); + /** Federation labels */ + labels?: ({ [k: string]: string }|null); - /** Backup serviceRevision */ - serviceRevision?: (google.cloud.metastore.v1alpha.IService|null); + /** Federation version */ + version?: (string|null); - /** Backup description */ - description?: (string|null); + /** Federation backendMetastores */ + backendMetastores?: ({ [k: string]: google.cloud.metastore.v1alpha.IBackendMetastore }|null); - /** Backup restoringServices */ - restoringServices?: (string[]|null); + /** Federation endpointUri */ + endpointUri?: (string|null); + + /** Federation state */ + state?: (google.cloud.metastore.v1alpha.Federation.State|keyof typeof google.cloud.metastore.v1alpha.Federation.State|null); + + /** Federation stateMessage */ + stateMessage?: (string|null); + + /** Federation uid */ + uid?: (string|null); } - /** Represents a Backup. */ - class Backup implements IBackup { + /** Represents a Federation. */ + class Federation implements IFederation { /** - * Constructs a new Backup. + * Constructs a new Federation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IBackup); + constructor(properties?: google.cloud.metastore.v1alpha.IFederation); - /** Backup name. */ + /** Federation name. */ public name: string; - /** Backup createTime. */ + /** Federation createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** Backup endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** Federation updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** Backup state. */ - public state: (google.cloud.metastore.v1alpha.Backup.State|keyof typeof google.cloud.metastore.v1alpha.Backup.State); + /** Federation labels. */ + public labels: { [k: string]: string }; - /** Backup serviceRevision. */ - public serviceRevision?: (google.cloud.metastore.v1alpha.IService|null); + /** Federation version. */ + public version: string; - /** Backup description. */ - public description: string; + /** Federation backendMetastores. */ + public backendMetastores: { [k: string]: google.cloud.metastore.v1alpha.IBackendMetastore }; - /** Backup restoringServices. */ - public restoringServices: string[]; + /** Federation endpointUri. */ + public endpointUri: string; + + /** Federation state. */ + public state: (google.cloud.metastore.v1alpha.Federation.State|keyof typeof google.cloud.metastore.v1alpha.Federation.State); + + /** Federation stateMessage. */ + public stateMessage: string; + + /** Federation uid. */ + public uid: string; /** - * Creates a new Backup instance using the specified properties. + * Creates a new Federation instance using the specified properties. * @param [properties] Properties to set - * @returns Backup instance + * @returns Federation instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IBackup): google.cloud.metastore.v1alpha.Backup; + public static create(properties?: google.cloud.metastore.v1alpha.IFederation): google.cloud.metastore.v1alpha.Federation; /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.metastore.v1alpha.Backup.verify|verify} messages. - * @param message Backup message or plain object to encode + * Encodes the specified Federation message. Does not implicitly {@link google.cloud.metastore.v1alpha.Federation.verify|verify} messages. + * @param message Federation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IFederation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Backup.verify|verify} messages. - * @param message Backup message or plain object to encode + * Encodes the specified Federation message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Federation.verify|verify} messages. + * @param message Federation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IFederation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Backup message from the specified reader or buffer. + * Decodes a Federation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Backup + * @returns Federation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.Backup; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.Federation; /** - * Decodes a Backup message from the specified reader or buffer, length delimited. + * Decodes a Federation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Backup + * @returns Federation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.Backup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.Federation; /** - * Verifies a Backup message. + * Verifies a Federation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * Creates a Federation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Backup + * @returns Federation */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.Backup; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.Federation; /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. - * @param message Backup + * Creates a plain object from a Federation message. Also converts values to other types if specified. + * @param message Federation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.Federation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Backup to JSON. + * Converts this Federation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Backup + * Gets the default type url for Federation * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Backup { + namespace Federation { /** State enum. */ enum State { STATE_UNSPECIFIED = 0, CREATING = 1, - DELETING = 2, - ACTIVE = 3, - FAILED = 4, - RESTORING = 5 + ACTIVE = 2, + UPDATING = 3, + DELETING = 4, + ERROR = 5 } } - /** Properties of a Restore. */ - interface IRestore { - - /** Restore startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** Restore endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** Restore state */ - state?: (google.cloud.metastore.v1alpha.Restore.State|keyof typeof google.cloud.metastore.v1alpha.Restore.State|null); - - /** Restore backup */ - backup?: (string|null); + /** Properties of a BackendMetastore. */ + interface IBackendMetastore { - /** Restore type */ - type?: (google.cloud.metastore.v1alpha.Restore.RestoreType|keyof typeof google.cloud.metastore.v1alpha.Restore.RestoreType|null); + /** BackendMetastore name */ + name?: (string|null); - /** Restore details */ - details?: (string|null); + /** BackendMetastore metastoreType */ + metastoreType?: (google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType|keyof typeof google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType|null); } - /** Represents a Restore. */ - class Restore implements IRestore { + /** Represents a BackendMetastore. */ + class BackendMetastore implements IBackendMetastore { /** - * Constructs a new Restore. + * Constructs a new BackendMetastore. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IRestore); - - /** Restore startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** Restore endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.metastore.v1alpha.IBackendMetastore); - /** Restore state. */ - public state: (google.cloud.metastore.v1alpha.Restore.State|keyof typeof google.cloud.metastore.v1alpha.Restore.State); - - /** Restore backup. */ - public backup: string; - - /** Restore type. */ - public type: (google.cloud.metastore.v1alpha.Restore.RestoreType|keyof typeof google.cloud.metastore.v1alpha.Restore.RestoreType); + /** BackendMetastore name. */ + public name: string; - /** Restore details. */ - public details: string; + /** BackendMetastore metastoreType. */ + public metastoreType: (google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType|keyof typeof google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType); /** - * Creates a new Restore instance using the specified properties. + * Creates a new BackendMetastore instance using the specified properties. * @param [properties] Properties to set - * @returns Restore instance + * @returns BackendMetastore instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IRestore): google.cloud.metastore.v1alpha.Restore; + public static create(properties?: google.cloud.metastore.v1alpha.IBackendMetastore): google.cloud.metastore.v1alpha.BackendMetastore; /** - * Encodes the specified Restore message. Does not implicitly {@link google.cloud.metastore.v1alpha.Restore.verify|verify} messages. - * @param message Restore message or plain object to encode + * Encodes the specified BackendMetastore message. Does not implicitly {@link google.cloud.metastore.v1alpha.BackendMetastore.verify|verify} messages. + * @param message BackendMetastore message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IRestore, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IBackendMetastore, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Restore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Restore.verify|verify} messages. - * @param message Restore message or plain object to encode + * Encodes the specified BackendMetastore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.BackendMetastore.verify|verify} messages. + * @param message BackendMetastore message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IRestore, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IBackendMetastore, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Restore message from the specified reader or buffer. + * Decodes a BackendMetastore message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Restore + * @returns BackendMetastore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.Restore; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.BackendMetastore; /** - * Decodes a Restore message from the specified reader or buffer, length delimited. + * Decodes a BackendMetastore message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Restore + * @returns BackendMetastore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.Restore; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.BackendMetastore; /** - * Verifies a Restore message. + * Verifies a BackendMetastore message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Restore message from a plain object. Also converts values to their respective internal types. + * Creates a BackendMetastore message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Restore + * @returns BackendMetastore */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.Restore; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.BackendMetastore; /** - * Creates a plain object from a Restore message. Also converts values to other types if specified. - * @param message Restore + * Creates a plain object from a BackendMetastore message. Also converts values to other types if specified. + * @param message BackendMetastore * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.Restore, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.BackendMetastore, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Restore to JSON. + * Converts this BackendMetastore to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Restore + * Gets the default type url for BackendMetastore * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Restore { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - SUCCEEDED = 2, - FAILED = 3, - CANCELLED = 4 - } + namespace BackendMetastore { - /** RestoreType enum. */ - enum RestoreType { - RESTORE_TYPE_UNSPECIFIED = 0, - FULL = 1, - METADATA_ONLY = 2 + /** MetastoreType enum. */ + enum MetastoreType { + METASTORE_TYPE_UNSPECIFIED = 0, + BIGQUERY = 2, + DATAPROC_METASTORE = 3 } } - /** Properties of a ListServicesRequest. */ - interface IListServicesRequest { + /** Properties of a ListFederationsRequest. */ + interface IListFederationsRequest { - /** ListServicesRequest parent */ + /** ListFederationsRequest parent */ parent?: (string|null); - /** ListServicesRequest pageSize */ + /** ListFederationsRequest pageSize */ pageSize?: (number|null); - /** ListServicesRequest pageToken */ + /** ListFederationsRequest pageToken */ pageToken?: (string|null); - /** ListServicesRequest filter */ + /** ListFederationsRequest filter */ filter?: (string|null); - /** ListServicesRequest orderBy */ + /** ListFederationsRequest orderBy */ orderBy?: (string|null); } - /** Represents a ListServicesRequest. */ - class ListServicesRequest implements IListServicesRequest { + /** Represents a ListFederationsRequest. */ + class ListFederationsRequest implements IListFederationsRequest { /** - * Constructs a new ListServicesRequest. + * Constructs a new ListFederationsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IListServicesRequest); + constructor(properties?: google.cloud.metastore.v1alpha.IListFederationsRequest); - /** ListServicesRequest parent. */ + /** ListFederationsRequest parent. */ public parent: string; - /** ListServicesRequest pageSize. */ + /** ListFederationsRequest pageSize. */ public pageSize: number; - /** ListServicesRequest pageToken. */ + /** ListFederationsRequest pageToken. */ public pageToken: string; - /** ListServicesRequest filter. */ + /** ListFederationsRequest filter. */ public filter: string; - /** ListServicesRequest orderBy. */ + /** ListFederationsRequest orderBy. */ public orderBy: string; /** - * Creates a new ListServicesRequest instance using the specified properties. + * Creates a new ListFederationsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListServicesRequest instance + * @returns ListFederationsRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IListServicesRequest): google.cloud.metastore.v1alpha.ListServicesRequest; + public static create(properties?: google.cloud.metastore.v1alpha.IListFederationsRequest): google.cloud.metastore.v1alpha.ListFederationsRequest; /** - * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesRequest.verify|verify} messages. - * @param message ListServicesRequest message or plain object to encode + * Encodes the specified ListFederationsRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListFederationsRequest.verify|verify} messages. + * @param message ListFederationsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IListFederationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesRequest.verify|verify} messages. - * @param message ListServicesRequest message or plain object to encode + * Encodes the specified ListFederationsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListFederationsRequest.verify|verify} messages. + * @param message ListFederationsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IListFederationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListServicesRequest message from the specified reader or buffer. + * Decodes a ListFederationsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListServicesRequest + * @returns ListFederationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ListServicesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ListFederationsRequest; /** - * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFederationsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListServicesRequest + * @returns ListFederationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ListServicesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ListFederationsRequest; /** - * Verifies a ListServicesRequest message. + * Verifies a ListFederationsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFederationsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListServicesRequest + * @returns ListFederationsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ListServicesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ListFederationsRequest; /** - * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. - * @param message ListServicesRequest + * Creates a plain object from a ListFederationsRequest message. Also converts values to other types if specified. + * @param message ListFederationsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.ListServicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.ListFederationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListServicesRequest to JSON. + * Converts this ListFederationsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListServicesRequest + * Gets the default type url for ListFederationsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListServicesResponse. */ - interface IListServicesResponse { + /** Properties of a ListFederationsResponse. */ + interface IListFederationsResponse { - /** ListServicesResponse services */ - services?: (google.cloud.metastore.v1alpha.IService[]|null); + /** ListFederationsResponse federations */ + federations?: (google.cloud.metastore.v1alpha.IFederation[]|null); - /** ListServicesResponse nextPageToken */ + /** ListFederationsResponse nextPageToken */ nextPageToken?: (string|null); - /** ListServicesResponse unreachable */ + /** ListFederationsResponse unreachable */ unreachable?: (string[]|null); } - /** Represents a ListServicesResponse. */ - class ListServicesResponse implements IListServicesResponse { + /** Represents a ListFederationsResponse. */ + class ListFederationsResponse implements IListFederationsResponse { /** - * Constructs a new ListServicesResponse. + * Constructs a new ListFederationsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IListServicesResponse); + constructor(properties?: google.cloud.metastore.v1alpha.IListFederationsResponse); - /** ListServicesResponse services. */ - public services: google.cloud.metastore.v1alpha.IService[]; + /** ListFederationsResponse federations. */ + public federations: google.cloud.metastore.v1alpha.IFederation[]; - /** ListServicesResponse nextPageToken. */ + /** ListFederationsResponse nextPageToken. */ public nextPageToken: string; - /** ListServicesResponse unreachable. */ + /** ListFederationsResponse unreachable. */ public unreachable: string[]; /** - * Creates a new ListServicesResponse instance using the specified properties. + * Creates a new ListFederationsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListServicesResponse instance + * @returns ListFederationsResponse instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IListServicesResponse): google.cloud.metastore.v1alpha.ListServicesResponse; + public static create(properties?: google.cloud.metastore.v1alpha.IListFederationsResponse): google.cloud.metastore.v1alpha.ListFederationsResponse; /** - * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesResponse.verify|verify} messages. - * @param message ListServicesResponse message or plain object to encode + * Encodes the specified ListFederationsResponse message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListFederationsResponse.verify|verify} messages. + * @param message ListFederationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IListFederationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesResponse.verify|verify} messages. - * @param message ListServicesResponse message or plain object to encode + * Encodes the specified ListFederationsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListFederationsResponse.verify|verify} messages. + * @param message ListFederationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IListFederationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListServicesResponse message from the specified reader or buffer. + * Decodes a ListFederationsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListServicesResponse + * @returns ListFederationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ListServicesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ListFederationsResponse; /** - * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListFederationsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListServicesResponse + * @returns ListFederationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ListServicesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ListFederationsResponse; /** - * Verifies a ListServicesResponse message. + * Verifies a ListFederationsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListFederationsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListServicesResponse + * @returns ListFederationsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ListServicesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ListFederationsResponse; /** - * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. - * @param message ListServicesResponse + * Creates a plain object from a ListFederationsResponse message. Also converts values to other types if specified. + * @param message ListFederationsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.ListServicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.ListFederationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListServicesResponse to JSON. + * Converts this ListFederationsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListServicesResponse + * Gets the default type url for ListFederationsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetServiceRequest. */ - interface IGetServiceRequest { + /** Properties of a GetFederationRequest. */ + interface IGetFederationRequest { - /** GetServiceRequest name */ + /** GetFederationRequest name */ name?: (string|null); } - /** Represents a GetServiceRequest. */ - class GetServiceRequest implements IGetServiceRequest { + /** Represents a GetFederationRequest. */ + class GetFederationRequest implements IGetFederationRequest { /** - * Constructs a new GetServiceRequest. + * Constructs a new GetFederationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IGetServiceRequest); + constructor(properties?: google.cloud.metastore.v1alpha.IGetFederationRequest); - /** GetServiceRequest name. */ + /** GetFederationRequest name. */ public name: string; /** - * Creates a new GetServiceRequest instance using the specified properties. + * Creates a new GetFederationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetServiceRequest instance + * @returns GetFederationRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IGetServiceRequest): google.cloud.metastore.v1alpha.GetServiceRequest; + public static create(properties?: google.cloud.metastore.v1alpha.IGetFederationRequest): google.cloud.metastore.v1alpha.GetFederationRequest; /** - * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.GetServiceRequest.verify|verify} messages. - * @param message GetServiceRequest message or plain object to encode + * Encodes the specified GetFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.GetFederationRequest.verify|verify} messages. + * @param message GetFederationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IGetFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.GetServiceRequest.verify|verify} messages. - * @param message GetServiceRequest message or plain object to encode + * Encodes the specified GetFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.GetFederationRequest.verify|verify} messages. + * @param message GetFederationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IGetFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetServiceRequest message from the specified reader or buffer. + * Decodes a GetFederationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetServiceRequest + * @returns GetFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.GetServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.GetFederationRequest; /** - * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a GetFederationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetServiceRequest + * @returns GetFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.GetServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.GetFederationRequest; /** - * Verifies a GetServiceRequest message. + * Verifies a GetFederationRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetFederationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetServiceRequest + * @returns GetFederationRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.GetServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.GetFederationRequest; /** - * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. - * @param message GetServiceRequest + * Creates a plain object from a GetFederationRequest message. Also converts values to other types if specified. + * @param message GetFederationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.GetServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.GetFederationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetServiceRequest to JSON. + * Converts this GetFederationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetServiceRequest + * Gets the default type url for GetFederationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateServiceRequest. */ - interface ICreateServiceRequest { + /** Properties of a CreateFederationRequest. */ + interface ICreateFederationRequest { - /** CreateServiceRequest parent */ + /** CreateFederationRequest parent */ parent?: (string|null); - /** CreateServiceRequest serviceId */ - serviceId?: (string|null); + /** CreateFederationRequest federationId */ + federationId?: (string|null); - /** CreateServiceRequest service */ - service?: (google.cloud.metastore.v1alpha.IService|null); + /** CreateFederationRequest federation */ + federation?: (google.cloud.metastore.v1alpha.IFederation|null); - /** CreateServiceRequest requestId */ + /** CreateFederationRequest requestId */ requestId?: (string|null); } - /** Represents a CreateServiceRequest. */ - class CreateServiceRequest implements ICreateServiceRequest { + /** Represents a CreateFederationRequest. */ + class CreateFederationRequest implements ICreateFederationRequest { /** - * Constructs a new CreateServiceRequest. + * Constructs a new CreateFederationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.ICreateServiceRequest); + constructor(properties?: google.cloud.metastore.v1alpha.ICreateFederationRequest); - /** CreateServiceRequest parent. */ + /** CreateFederationRequest parent. */ public parent: string; - /** CreateServiceRequest serviceId. */ - public serviceId: string; + /** CreateFederationRequest federationId. */ + public federationId: string; - /** CreateServiceRequest service. */ - public service?: (google.cloud.metastore.v1alpha.IService|null); + /** CreateFederationRequest federation. */ + public federation?: (google.cloud.metastore.v1alpha.IFederation|null); - /** CreateServiceRequest requestId. */ + /** CreateFederationRequest requestId. */ public requestId: string; /** - * Creates a new CreateServiceRequest instance using the specified properties. + * Creates a new CreateFederationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateServiceRequest instance + * @returns CreateFederationRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.ICreateServiceRequest): google.cloud.metastore.v1alpha.CreateServiceRequest; + public static create(properties?: google.cloud.metastore.v1alpha.ICreateFederationRequest): google.cloud.metastore.v1alpha.CreateFederationRequest; /** - * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateServiceRequest.verify|verify} messages. - * @param message CreateServiceRequest message or plain object to encode + * Encodes the specified CreateFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateFederationRequest.verify|verify} messages. + * @param message CreateFederationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.ICreateFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateServiceRequest.verify|verify} messages. - * @param message CreateServiceRequest message or plain object to encode + * Encodes the specified CreateFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateFederationRequest.verify|verify} messages. + * @param message CreateFederationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.ICreateFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer. + * Decodes a CreateFederationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateServiceRequest + * @returns CreateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.CreateServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.CreateFederationRequest; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFederationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateServiceRequest + * @returns CreateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.CreateServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.CreateFederationRequest; /** - * Verifies a CreateServiceRequest message. + * Verifies a CreateFederationRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFederationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateServiceRequest + * @returns CreateFederationRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.CreateServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.CreateFederationRequest; /** - * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. - * @param message CreateServiceRequest + * Creates a plain object from a CreateFederationRequest message. Also converts values to other types if specified. + * @param message CreateFederationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.CreateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.CreateFederationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateServiceRequest to JSON. + * Converts this CreateFederationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateServiceRequest + * Gets the default type url for CreateFederationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateServiceRequest. */ - interface IUpdateServiceRequest { + /** Properties of an UpdateFederationRequest. */ + interface IUpdateFederationRequest { - /** UpdateServiceRequest updateMask */ + /** UpdateFederationRequest updateMask */ updateMask?: (google.protobuf.IFieldMask|null); - /** UpdateServiceRequest service */ - service?: (google.cloud.metastore.v1alpha.IService|null); + /** UpdateFederationRequest federation */ + federation?: (google.cloud.metastore.v1alpha.IFederation|null); - /** UpdateServiceRequest requestId */ + /** UpdateFederationRequest requestId */ requestId?: (string|null); } - /** Represents an UpdateServiceRequest. */ - class UpdateServiceRequest implements IUpdateServiceRequest { + /** Represents an UpdateFederationRequest. */ + class UpdateFederationRequest implements IUpdateFederationRequest { /** - * Constructs a new UpdateServiceRequest. + * Constructs a new UpdateFederationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IUpdateServiceRequest); + constructor(properties?: google.cloud.metastore.v1alpha.IUpdateFederationRequest); - /** UpdateServiceRequest updateMask. */ + /** UpdateFederationRequest updateMask. */ public updateMask?: (google.protobuf.IFieldMask|null); - /** UpdateServiceRequest service. */ - public service?: (google.cloud.metastore.v1alpha.IService|null); + /** UpdateFederationRequest federation. */ + public federation?: (google.cloud.metastore.v1alpha.IFederation|null); - /** UpdateServiceRequest requestId. */ + /** UpdateFederationRequest requestId. */ public requestId: string; /** - * Creates a new UpdateServiceRequest instance using the specified properties. + * Creates a new UpdateFederationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateServiceRequest instance + * @returns UpdateFederationRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IUpdateServiceRequest): google.cloud.metastore.v1alpha.UpdateServiceRequest; + public static create(properties?: google.cloud.metastore.v1alpha.IUpdateFederationRequest): google.cloud.metastore.v1alpha.UpdateFederationRequest; /** - * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateServiceRequest.verify|verify} messages. - * @param message UpdateServiceRequest message or plain object to encode + * Encodes the specified UpdateFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateFederationRequest.verify|verify} messages. + * @param message UpdateFederationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IUpdateFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateServiceRequest.verify|verify} messages. - * @param message UpdateServiceRequest message or plain object to encode + * Encodes the specified UpdateFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateFederationRequest.verify|verify} messages. + * @param message UpdateFederationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IUpdateFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer. + * Decodes an UpdateFederationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateServiceRequest + * @returns UpdateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.UpdateServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.UpdateFederationRequest; /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateFederationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateServiceRequest + * @returns UpdateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.UpdateServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.UpdateFederationRequest; /** - * Verifies an UpdateServiceRequest message. + * Verifies an UpdateFederationRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFederationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateServiceRequest + * @returns UpdateFederationRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.UpdateServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.UpdateFederationRequest; /** - * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. - * @param message UpdateServiceRequest + * Creates a plain object from an UpdateFederationRequest message. Also converts values to other types if specified. + * @param message UpdateFederationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.UpdateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.UpdateFederationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateServiceRequest to JSON. + * Converts this UpdateFederationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateServiceRequest + * Gets the default type url for UpdateFederationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteServiceRequest. */ - interface IDeleteServiceRequest { + /** Properties of a DeleteFederationRequest. */ + interface IDeleteFederationRequest { - /** DeleteServiceRequest name */ + /** DeleteFederationRequest name */ name?: (string|null); - /** DeleteServiceRequest requestId */ + /** DeleteFederationRequest requestId */ requestId?: (string|null); } - /** Represents a DeleteServiceRequest. */ - class DeleteServiceRequest implements IDeleteServiceRequest { + /** Represents a DeleteFederationRequest. */ + class DeleteFederationRequest implements IDeleteFederationRequest { /** - * Constructs a new DeleteServiceRequest. + * Constructs a new DeleteFederationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IDeleteServiceRequest); + constructor(properties?: google.cloud.metastore.v1alpha.IDeleteFederationRequest); - /** DeleteServiceRequest name. */ + /** DeleteFederationRequest name. */ public name: string; - /** DeleteServiceRequest requestId. */ + /** DeleteFederationRequest requestId. */ public requestId: string; /** - * Creates a new DeleteServiceRequest instance using the specified properties. + * Creates a new DeleteFederationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteServiceRequest instance + * @returns DeleteFederationRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IDeleteServiceRequest): google.cloud.metastore.v1alpha.DeleteServiceRequest; + public static create(properties?: google.cloud.metastore.v1alpha.IDeleteFederationRequest): google.cloud.metastore.v1alpha.DeleteFederationRequest; /** - * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteServiceRequest.verify|verify} messages. - * @param message DeleteServiceRequest message or plain object to encode + * Encodes the specified DeleteFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteFederationRequest.verify|verify} messages. + * @param message DeleteFederationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1alpha.IDeleteFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteServiceRequest.verify|verify} messages. - * @param message DeleteServiceRequest message or plain object to encode + * Encodes the specified DeleteFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteFederationRequest.verify|verify} messages. + * @param message DeleteFederationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IDeleteFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * Decodes a DeleteFederationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteServiceRequest + * @returns DeleteFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.DeleteServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.DeleteFederationRequest; /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFederationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteServiceRequest + * @returns DeleteFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.DeleteServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.DeleteFederationRequest; /** - * Verifies a DeleteServiceRequest message. + * Verifies a DeleteFederationRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFederationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteServiceRequest + * @returns DeleteFederationRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.DeleteServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.DeleteFederationRequest; /** - * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. - * @param message DeleteServiceRequest + * Creates a plain object from a DeleteFederationRequest message. Also converts values to other types if specified. + * @param message DeleteFederationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.DeleteServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1alpha.DeleteFederationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteServiceRequest to JSON. + * Converts this DeleteFederationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteServiceRequest + * Gets the default type url for DeleteFederationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - /** Properties of a ListMetadataImportsRequest. */ - interface IListMetadataImportsRequest { - - /** ListMetadataImportsRequest parent */ - parent?: (string|null); + /** Namespace v1beta. */ + namespace v1beta { - /** ListMetadataImportsRequest pageSize */ - pageSize?: (number|null); + /** Represents a DataprocMetastore */ + class DataprocMetastore extends $protobuf.rpc.Service { - /** ListMetadataImportsRequest pageToken */ - pageToken?: (string|null); + /** + * Constructs a new DataprocMetastore service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** ListMetadataImportsRequest filter */ - filter?: (string|null); + /** + * Creates new DataprocMetastore service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataprocMetastore; - /** ListMetadataImportsRequest orderBy */ - orderBy?: (string|null); - } + /** + * Calls ListServices. + * @param request ListServicesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListServicesResponse + */ + public listServices(request: google.cloud.metastore.v1beta.IListServicesRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.ListServicesCallback): void; - /** Represents a ListMetadataImportsRequest. */ - class ListMetadataImportsRequest implements IListMetadataImportsRequest { + /** + * Calls ListServices. + * @param request ListServicesRequest message or plain object + * @returns Promise + */ + public listServices(request: google.cloud.metastore.v1beta.IListServicesRequest): Promise; /** - * Constructs a new ListMetadataImportsRequest. - * @param [properties] Properties to set + * Calls GetService. + * @param request GetServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Service */ - constructor(properties?: google.cloud.metastore.v1alpha.IListMetadataImportsRequest); - - /** ListMetadataImportsRequest parent. */ - public parent: string; - - /** ListMetadataImportsRequest pageSize. */ - public pageSize: number; - - /** ListMetadataImportsRequest pageToken. */ - public pageToken: string; + public getService(request: google.cloud.metastore.v1beta.IGetServiceRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.GetServiceCallback): void; - /** ListMetadataImportsRequest filter. */ - public filter: string; + /** + * Calls GetService. + * @param request GetServiceRequest message or plain object + * @returns Promise + */ + public getService(request: google.cloud.metastore.v1beta.IGetServiceRequest): Promise; - /** ListMetadataImportsRequest orderBy. */ - public orderBy: string; + /** + * Calls CreateService. + * @param request CreateServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createService(request: google.cloud.metastore.v1beta.ICreateServiceRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.CreateServiceCallback): void; /** - * Creates a new ListMetadataImportsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMetadataImportsRequest instance + * Calls CreateService. + * @param request CreateServiceRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.metastore.v1alpha.IListMetadataImportsRequest): google.cloud.metastore.v1alpha.ListMetadataImportsRequest; + public createService(request: google.cloud.metastore.v1beta.ICreateServiceRequest): Promise; /** - * Encodes the specified ListMetadataImportsRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsRequest.verify|verify} messages. - * @param message ListMetadataImportsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateService. + * @param request UpdateServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encode(message: google.cloud.metastore.v1alpha.IListMetadataImportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public updateService(request: google.cloud.metastore.v1beta.IUpdateServiceRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.UpdateServiceCallback): void; /** - * Encodes the specified ListMetadataImportsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsRequest.verify|verify} messages. - * @param message ListMetadataImportsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateService. + * @param request UpdateServiceRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IListMetadataImportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public updateService(request: google.cloud.metastore.v1beta.IUpdateServiceRequest): Promise; /** - * Decodes a ListMetadataImportsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMetadataImportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteService. + * @param request DeleteServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ListMetadataImportsRequest; + public deleteService(request: google.cloud.metastore.v1beta.IDeleteServiceRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.DeleteServiceCallback): void; /** - * Decodes a ListMetadataImportsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMetadataImportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteService. + * @param request DeleteServiceRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ListMetadataImportsRequest; + public deleteService(request: google.cloud.metastore.v1beta.IDeleteServiceRequest): Promise; /** - * Verifies a ListMetadataImportsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListMetadataImports. + * @param request ListMetadataImportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMetadataImportsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public listMetadataImports(request: google.cloud.metastore.v1beta.IListMetadataImportsRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImportsCallback): void; /** - * Creates a ListMetadataImportsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMetadataImportsRequest + * Calls ListMetadataImports. + * @param request ListMetadataImportsRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ListMetadataImportsRequest; + public listMetadataImports(request: google.cloud.metastore.v1beta.IListMetadataImportsRequest): Promise; /** - * Creates a plain object from a ListMetadataImportsRequest message. Also converts values to other types if specified. - * @param message ListMetadataImportsRequest - * @param [options] Conversion options - * @returns Plain object + * Calls GetMetadataImport. + * @param request GetMetadataImportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MetadataImport */ - public static toObject(message: google.cloud.metastore.v1alpha.ListMetadataImportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public getMetadataImport(request: google.cloud.metastore.v1beta.IGetMetadataImportRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.GetMetadataImportCallback): void; /** - * Converts this ListMetadataImportsRequest to JSON. - * @returns JSON object + * Calls GetMetadataImport. + * @param request GetMetadataImportRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public getMetadataImport(request: google.cloud.metastore.v1beta.IGetMetadataImportRequest): Promise; /** - * Gets the default type url for ListMetadataImportsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls CreateMetadataImport. + * @param request CreateMetadataImportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + public createMetadataImport(request: google.cloud.metastore.v1beta.ICreateMetadataImportRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.CreateMetadataImportCallback): void; - /** Properties of a ListMetadataImportsResponse. */ - interface IListMetadataImportsResponse { + /** + * Calls CreateMetadataImport. + * @param request CreateMetadataImportRequest message or plain object + * @returns Promise + */ + public createMetadataImport(request: google.cloud.metastore.v1beta.ICreateMetadataImportRequest): Promise; - /** ListMetadataImportsResponse metadataImports */ - metadataImports?: (google.cloud.metastore.v1alpha.IMetadataImport[]|null); + /** + * Calls UpdateMetadataImport. + * @param request UpdateMetadataImportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateMetadataImport(request: google.cloud.metastore.v1beta.IUpdateMetadataImportRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.UpdateMetadataImportCallback): void; - /** ListMetadataImportsResponse nextPageToken */ - nextPageToken?: (string|null); + /** + * Calls UpdateMetadataImport. + * @param request UpdateMetadataImportRequest message or plain object + * @returns Promise + */ + public updateMetadataImport(request: google.cloud.metastore.v1beta.IUpdateMetadataImportRequest): Promise; - /** ListMetadataImportsResponse unreachable */ - unreachable?: (string[]|null); - } + /** + * Calls ExportMetadata. + * @param request ExportMetadataRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public exportMetadata(request: google.cloud.metastore.v1beta.IExportMetadataRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.ExportMetadataCallback): void; - /** Represents a ListMetadataImportsResponse. */ - class ListMetadataImportsResponse implements IListMetadataImportsResponse { + /** + * Calls ExportMetadata. + * @param request ExportMetadataRequest message or plain object + * @returns Promise + */ + public exportMetadata(request: google.cloud.metastore.v1beta.IExportMetadataRequest): Promise; /** - * Constructs a new ListMetadataImportsResponse. - * @param [properties] Properties to set + * Calls RestoreService. + * @param request RestoreServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - constructor(properties?: google.cloud.metastore.v1alpha.IListMetadataImportsResponse); + public restoreService(request: google.cloud.metastore.v1beta.IRestoreServiceRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.RestoreServiceCallback): void; - /** ListMetadataImportsResponse metadataImports. */ - public metadataImports: google.cloud.metastore.v1alpha.IMetadataImport[]; + /** + * Calls RestoreService. + * @param request RestoreServiceRequest message or plain object + * @returns Promise + */ + public restoreService(request: google.cloud.metastore.v1beta.IRestoreServiceRequest): Promise; - /** ListMetadataImportsResponse nextPageToken. */ - public nextPageToken: string; + /** + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupsResponse + */ + public listBackups(request: google.cloud.metastore.v1beta.IListBackupsRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.ListBackupsCallback): void; - /** ListMetadataImportsResponse unreachable. */ - public unreachable: string[]; + /** + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @returns Promise + */ + public listBackups(request: google.cloud.metastore.v1beta.IListBackupsRequest): Promise; /** - * Creates a new ListMetadataImportsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMetadataImportsResponse instance + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Backup */ - public static create(properties?: google.cloud.metastore.v1alpha.IListMetadataImportsResponse): google.cloud.metastore.v1alpha.ListMetadataImportsResponse; + public getBackup(request: google.cloud.metastore.v1beta.IGetBackupRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.GetBackupCallback): void; /** - * Encodes the specified ListMetadataImportsResponse message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsResponse.verify|verify} messages. - * @param message ListMetadataImportsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.metastore.v1alpha.IListMetadataImportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public getBackup(request: google.cloud.metastore.v1beta.IGetBackupRequest): Promise; /** - * Encodes the specified ListMetadataImportsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsResponse.verify|verify} messages. - * @param message ListMetadataImportsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateBackup. + * @param request CreateBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IListMetadataImportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public createBackup(request: google.cloud.metastore.v1beta.ICreateBackupRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.CreateBackupCallback): void; /** - * Decodes a ListMetadataImportsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMetadataImportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateBackup. + * @param request CreateBackupRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ListMetadataImportsResponse; + public createBackup(request: google.cloud.metastore.v1beta.ICreateBackupRequest): Promise; /** - * Decodes a ListMetadataImportsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMetadataImportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ListMetadataImportsResponse; + public deleteBackup(request: google.cloud.metastore.v1beta.IDeleteBackupRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.DeleteBackupCallback): void; /** - * Verifies a ListMetadataImportsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public deleteBackup(request: google.cloud.metastore.v1beta.IDeleteBackupRequest): Promise; + } + + namespace DataprocMetastore { /** - * Creates a ListMetadataImportsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMetadataImportsResponse + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|listServices}. + * @param error Error, if any + * @param [response] ListServicesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ListMetadataImportsResponse; + type ListServicesCallback = (error: (Error|null), response?: google.cloud.metastore.v1beta.ListServicesResponse) => void; /** - * Creates a plain object from a ListMetadataImportsResponse message. Also converts values to other types if specified. - * @param message ListMetadataImportsResponse - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|getService}. + * @param error Error, if any + * @param [response] Service */ - public static toObject(message: google.cloud.metastore.v1alpha.ListMetadataImportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetServiceCallback = (error: (Error|null), response?: google.cloud.metastore.v1beta.Service) => void; /** - * Converts this ListMetadataImportsResponse to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|createService}. + * @param error Error, if any + * @param [response] Operation */ - public toJSON(): { [k: string]: any }; + type CreateServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Gets the default type url for ListMetadataImportsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|updateService}. + * @param error Error, if any + * @param [response] Operation */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetMetadataImportRequest. */ - interface IGetMetadataImportRequest { - - /** GetMetadataImportRequest name */ - name?: (string|null); - } - - /** Represents a GetMetadataImportRequest. */ - class GetMetadataImportRequest implements IGetMetadataImportRequest { + type UpdateServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Constructs a new GetMetadataImportRequest. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|deleteService}. + * @param error Error, if any + * @param [response] Operation */ - constructor(properties?: google.cloud.metastore.v1alpha.IGetMetadataImportRequest); - - /** GetMetadataImportRequest name. */ - public name: string; + type DeleteServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a new GetMetadataImportRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetMetadataImportRequest instance + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|listMetadataImports}. + * @param error Error, if any + * @param [response] ListMetadataImportsResponse */ - public static create(properties?: google.cloud.metastore.v1alpha.IGetMetadataImportRequest): google.cloud.metastore.v1alpha.GetMetadataImportRequest; + type ListMetadataImportsCallback = (error: (Error|null), response?: google.cloud.metastore.v1beta.ListMetadataImportsResponse) => void; /** - * Encodes the specified GetMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.GetMetadataImportRequest.verify|verify} messages. - * @param message GetMetadataImportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|getMetadataImport}. + * @param error Error, if any + * @param [response] MetadataImport */ - public static encode(message: google.cloud.metastore.v1alpha.IGetMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type GetMetadataImportCallback = (error: (Error|null), response?: google.cloud.metastore.v1beta.MetadataImport) => void; /** - * Encodes the specified GetMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.GetMetadataImportRequest.verify|verify} messages. - * @param message GetMetadataImportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|createMetadataImport}. + * @param error Error, if any + * @param [response] Operation */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IGetMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type CreateMetadataImportCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Decodes a GetMetadataImportRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetMetadataImportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|updateMetadataImport}. + * @param error Error, if any + * @param [response] Operation */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.GetMetadataImportRequest; + type UpdateMetadataImportCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Decodes a GetMetadataImportRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetMetadataImportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|exportMetadata}. + * @param error Error, if any + * @param [response] Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.GetMetadataImportRequest; + type ExportMetadataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Verifies a GetMetadataImportRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|restoreService}. + * @param error Error, if any + * @param [response] Operation */ - public static verify(message: { [k: string]: any }): (string|null); + type RestoreServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a GetMetadataImportRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetMetadataImportRequest + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|listBackups}. + * @param error Error, if any + * @param [response] ListBackupsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.GetMetadataImportRequest; + type ListBackupsCallback = (error: (Error|null), response?: google.cloud.metastore.v1beta.ListBackupsResponse) => void; /** - * Creates a plain object from a GetMetadataImportRequest message. Also converts values to other types if specified. - * @param message GetMetadataImportRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|getBackup}. + * @param error Error, if any + * @param [response] Backup */ - public static toObject(message: google.cloud.metastore.v1alpha.GetMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetBackupCallback = (error: (Error|null), response?: google.cloud.metastore.v1beta.Backup) => void; /** - * Converts this GetMetadataImportRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|createBackup}. + * @param error Error, if any + * @param [response] Operation */ - public toJSON(): { [k: string]: any }; + type CreateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Gets the default type url for GetMetadataImportRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|deleteBackup}. + * @param error Error, if any + * @param [response] Operation */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type DeleteBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } - /** Properties of a CreateMetadataImportRequest. */ - interface ICreateMetadataImportRequest { + /** Properties of a Service. */ + interface IService { - /** CreateMetadataImportRequest parent */ - parent?: (string|null); + /** Service hiveMetastoreConfig */ + hiveMetastoreConfig?: (google.cloud.metastore.v1beta.IHiveMetastoreConfig|null); - /** CreateMetadataImportRequest metadataImportId */ - metadataImportId?: (string|null); + /** Service name */ + name?: (string|null); - /** CreateMetadataImportRequest metadataImport */ - metadataImport?: (google.cloud.metastore.v1alpha.IMetadataImport|null); + /** Service createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** CreateMetadataImportRequest requestId */ - requestId?: (string|null); - } + /** Service updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** Represents a CreateMetadataImportRequest. */ - class CreateMetadataImportRequest implements ICreateMetadataImportRequest { + /** Service labels */ + labels?: ({ [k: string]: string }|null); - /** - * Constructs a new CreateMetadataImportRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.metastore.v1alpha.ICreateMetadataImportRequest); + /** Service network */ + network?: (string|null); - /** CreateMetadataImportRequest parent. */ - public parent: string; + /** Service endpointUri */ + endpointUri?: (string|null); - /** CreateMetadataImportRequest metadataImportId. */ - public metadataImportId: string; + /** Service port */ + port?: (number|null); - /** CreateMetadataImportRequest metadataImport. */ - public metadataImport?: (google.cloud.metastore.v1alpha.IMetadataImport|null); + /** Service state */ + state?: (google.cloud.metastore.v1beta.Service.State|keyof typeof google.cloud.metastore.v1beta.Service.State|null); - /** CreateMetadataImportRequest requestId. */ - public requestId: string; + /** Service stateMessage */ + stateMessage?: (string|null); + + /** Service artifactGcsUri */ + artifactGcsUri?: (string|null); + + /** Service tier */ + tier?: (google.cloud.metastore.v1beta.Service.Tier|keyof typeof google.cloud.metastore.v1beta.Service.Tier|null); + + /** Service metadataIntegration */ + metadataIntegration?: (google.cloud.metastore.v1beta.IMetadataIntegration|null); + + /** Service maintenanceWindow */ + maintenanceWindow?: (google.cloud.metastore.v1beta.IMaintenanceWindow|null); + + /** Service uid */ + uid?: (string|null); + + /** Service metadataManagementActivity */ + metadataManagementActivity?: (google.cloud.metastore.v1beta.IMetadataManagementActivity|null); + + /** Service releaseChannel */ + releaseChannel?: (google.cloud.metastore.v1beta.Service.ReleaseChannel|keyof typeof google.cloud.metastore.v1beta.Service.ReleaseChannel|null); + + /** Service encryptionConfig */ + encryptionConfig?: (google.cloud.metastore.v1beta.IEncryptionConfig|null); + + /** Service networkConfig */ + networkConfig?: (google.cloud.metastore.v1beta.INetworkConfig|null); + + /** Service databaseType */ + databaseType?: (google.cloud.metastore.v1beta.Service.DatabaseType|keyof typeof google.cloud.metastore.v1beta.Service.DatabaseType|null); + + /** Service telemetryConfig */ + telemetryConfig?: (google.cloud.metastore.v1beta.ITelemetryConfig|null); + } + + /** Represents a Service. */ + class Service implements IService { /** - * Creates a new CreateMetadataImportRequest instance using the specified properties. + * Constructs a new Service. * @param [properties] Properties to set - * @returns CreateMetadataImportRequest instance */ - public static create(properties?: google.cloud.metastore.v1alpha.ICreateMetadataImportRequest): google.cloud.metastore.v1alpha.CreateMetadataImportRequest; + constructor(properties?: google.cloud.metastore.v1beta.IService); - /** - * Encodes the specified CreateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateMetadataImportRequest.verify|verify} messages. - * @param message CreateMetadataImportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.metastore.v1alpha.ICreateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Service hiveMetastoreConfig. */ + public hiveMetastoreConfig?: (google.cloud.metastore.v1beta.IHiveMetastoreConfig|null); - /** - * Encodes the specified CreateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateMetadataImportRequest.verify|verify} messages. - * @param message CreateMetadataImportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.ICreateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Service name. */ + public name: string; - /** - * Decodes a CreateMetadataImportRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateMetadataImportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.CreateMetadataImportRequest; + /** Service createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Service updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Service labels. */ + public labels: { [k: string]: string }; - /** - * Decodes a CreateMetadataImportRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateMetadataImportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.CreateMetadataImportRequest; + /** Service network. */ + public network: string; - /** - * Verifies a CreateMetadataImportRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Service endpointUri. */ + public endpointUri: string; - /** - * Creates a CreateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateMetadataImportRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.CreateMetadataImportRequest; + /** Service port. */ + public port: number; - /** - * Creates a plain object from a CreateMetadataImportRequest message. Also converts values to other types if specified. - * @param message CreateMetadataImportRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.metastore.v1alpha.CreateMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Service state. */ + public state: (google.cloud.metastore.v1beta.Service.State|keyof typeof google.cloud.metastore.v1beta.Service.State); - /** - * Converts this CreateMetadataImportRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Service stateMessage. */ + public stateMessage: string; - /** - * Gets the default type url for CreateMetadataImportRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Service artifactGcsUri. */ + public artifactGcsUri: string; - /** Properties of an UpdateMetadataImportRequest. */ - interface IUpdateMetadataImportRequest { + /** Service tier. */ + public tier: (google.cloud.metastore.v1beta.Service.Tier|keyof typeof google.cloud.metastore.v1beta.Service.Tier); - /** UpdateMetadataImportRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Service metadataIntegration. */ + public metadataIntegration?: (google.cloud.metastore.v1beta.IMetadataIntegration|null); - /** UpdateMetadataImportRequest metadataImport */ - metadataImport?: (google.cloud.metastore.v1alpha.IMetadataImport|null); + /** Service maintenanceWindow. */ + public maintenanceWindow?: (google.cloud.metastore.v1beta.IMaintenanceWindow|null); - /** UpdateMetadataImportRequest requestId */ - requestId?: (string|null); - } + /** Service uid. */ + public uid: string; - /** Represents an UpdateMetadataImportRequest. */ - class UpdateMetadataImportRequest implements IUpdateMetadataImportRequest { + /** Service metadataManagementActivity. */ + public metadataManagementActivity?: (google.cloud.metastore.v1beta.IMetadataManagementActivity|null); - /** - * Constructs a new UpdateMetadataImportRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest); + /** Service releaseChannel. */ + public releaseChannel: (google.cloud.metastore.v1beta.Service.ReleaseChannel|keyof typeof google.cloud.metastore.v1beta.Service.ReleaseChannel); - /** UpdateMetadataImportRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** Service encryptionConfig. */ + public encryptionConfig?: (google.cloud.metastore.v1beta.IEncryptionConfig|null); - /** UpdateMetadataImportRequest metadataImport. */ - public metadataImport?: (google.cloud.metastore.v1alpha.IMetadataImport|null); + /** Service networkConfig. */ + public networkConfig?: (google.cloud.metastore.v1beta.INetworkConfig|null); - /** UpdateMetadataImportRequest requestId. */ - public requestId: string; + /** Service databaseType. */ + public databaseType: (google.cloud.metastore.v1beta.Service.DatabaseType|keyof typeof google.cloud.metastore.v1beta.Service.DatabaseType); + + /** Service telemetryConfig. */ + public telemetryConfig?: (google.cloud.metastore.v1beta.ITelemetryConfig|null); + + /** Service metastoreConfig. */ + public metastoreConfig?: "hiveMetastoreConfig"; /** - * Creates a new UpdateMetadataImportRequest instance using the specified properties. + * Creates a new Service instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateMetadataImportRequest instance + * @returns Service instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest): google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; + public static create(properties?: google.cloud.metastore.v1beta.IService): google.cloud.metastore.v1beta.Service; /** - * Encodes the specified UpdateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.verify|verify} messages. - * @param message UpdateMetadataImportRequest message or plain object to encode + * Encodes the specified Service message. Does not implicitly {@link google.cloud.metastore.v1beta.Service.verify|verify} messages. + * @param message Service message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IService, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.verify|verify} messages. - * @param message UpdateMetadataImportRequest message or plain object to encode + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Service.verify|verify} messages. + * @param message Service message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IService, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer. + * Decodes a Service message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateMetadataImportRequest + * @returns Service * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.Service; /** - * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer, length delimited. + * Decodes a Service message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateMetadataImportRequest + * @returns Service * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.Service; /** - * Verifies an UpdateMetadataImportRequest message. + * Verifies a Service message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Service message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateMetadataImportRequest + * @returns Service */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.Service; /** - * Creates a plain object from an UpdateMetadataImportRequest message. Also converts values to other types if specified. - * @param message UpdateMetadataImportRequest + * Creates a plain object from a Service message. Also converts values to other types if specified. + * @param message Service * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.UpdateMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.Service, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateMetadataImportRequest to JSON. + * Converts this Service to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateMetadataImportRequest + * Gets the default type url for Service * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBackupsRequest. */ - interface IListBackupsRequest { + namespace Service { - /** ListBackupsRequest parent */ - parent?: (string|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + SUSPENDING = 3, + SUSPENDED = 4, + UPDATING = 5, + DELETING = 6, + ERROR = 7 + } - /** ListBackupsRequest pageSize */ - pageSize?: (number|null); + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + DEVELOPER = 1, + ENTERPRISE = 3 + } - /** ListBackupsRequest pageToken */ - pageToken?: (string|null); + /** ReleaseChannel enum. */ + enum ReleaseChannel { + RELEASE_CHANNEL_UNSPECIFIED = 0, + CANARY = 1, + STABLE = 2 + } - /** ListBackupsRequest filter */ - filter?: (string|null); + /** DatabaseType enum. */ + enum DatabaseType { + DATABASE_TYPE_UNSPECIFIED = 0, + MYSQL = 1, + SPANNER = 2 + } + } - /** ListBackupsRequest orderBy */ - orderBy?: (string|null); + /** Properties of a MetadataIntegration. */ + interface IMetadataIntegration { + + /** MetadataIntegration dataCatalogConfig */ + dataCatalogConfig?: (google.cloud.metastore.v1beta.IDataCatalogConfig|null); + + /** MetadataIntegration dataplexConfig */ + dataplexConfig?: (google.cloud.metastore.v1beta.IDataplexConfig|null); } - /** Represents a ListBackupsRequest. */ - class ListBackupsRequest implements IListBackupsRequest { + /** Represents a MetadataIntegration. */ + class MetadataIntegration implements IMetadataIntegration { /** - * Constructs a new ListBackupsRequest. + * Constructs a new MetadataIntegration. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IListBackupsRequest); - - /** ListBackupsRequest parent. */ - public parent: string; - - /** ListBackupsRequest pageSize. */ - public pageSize: number; - - /** ListBackupsRequest pageToken. */ - public pageToken: string; + constructor(properties?: google.cloud.metastore.v1beta.IMetadataIntegration); - /** ListBackupsRequest filter. */ - public filter: string; + /** MetadataIntegration dataCatalogConfig. */ + public dataCatalogConfig?: (google.cloud.metastore.v1beta.IDataCatalogConfig|null); - /** ListBackupsRequest orderBy. */ - public orderBy: string; + /** MetadataIntegration dataplexConfig. */ + public dataplexConfig?: (google.cloud.metastore.v1beta.IDataplexConfig|null); /** - * Creates a new ListBackupsRequest instance using the specified properties. + * Creates a new MetadataIntegration instance using the specified properties. * @param [properties] Properties to set - * @returns ListBackupsRequest instance + * @returns MetadataIntegration instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IListBackupsRequest): google.cloud.metastore.v1alpha.ListBackupsRequest; + public static create(properties?: google.cloud.metastore.v1beta.IMetadataIntegration): google.cloud.metastore.v1beta.MetadataIntegration; /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsRequest.verify|verify} messages. - * @param message ListBackupsRequest message or plain object to encode + * Encodes the specified MetadataIntegration message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataIntegration.verify|verify} messages. + * @param message MetadataIntegration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IMetadataIntegration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsRequest.verify|verify} messages. - * @param message ListBackupsRequest message or plain object to encode + * Encodes the specified MetadataIntegration message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataIntegration.verify|verify} messages. + * @param message MetadataIntegration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IMetadataIntegration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. + * Decodes a MetadataIntegration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBackupsRequest + * @returns MetadataIntegration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ListBackupsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.MetadataIntegration; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * Decodes a MetadataIntegration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBackupsRequest + * @returns MetadataIntegration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ListBackupsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.MetadataIntegration; /** - * Verifies a ListBackupsRequest message. + * Verifies a MetadataIntegration message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MetadataIntegration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBackupsRequest + * @returns MetadataIntegration */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ListBackupsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.MetadataIntegration; /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. - * @param message ListBackupsRequest + * Creates a plain object from a MetadataIntegration message. Also converts values to other types if specified. + * @param message MetadataIntegration * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.MetadataIntegration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBackupsRequest to JSON. + * Converts this MetadataIntegration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListBackupsRequest + * Gets the default type url for MetadataIntegration * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBackupsResponse. */ - interface IListBackupsResponse { - - /** ListBackupsResponse backups */ - backups?: (google.cloud.metastore.v1alpha.IBackup[]|null); - - /** ListBackupsResponse nextPageToken */ - nextPageToken?: (string|null); + /** Properties of a DataCatalogConfig. */ + interface IDataCatalogConfig { - /** ListBackupsResponse unreachable */ - unreachable?: (string[]|null); + /** DataCatalogConfig enabled */ + enabled?: (boolean|null); } - /** Represents a ListBackupsResponse. */ - class ListBackupsResponse implements IListBackupsResponse { + /** Represents a DataCatalogConfig. */ + class DataCatalogConfig implements IDataCatalogConfig { /** - * Constructs a new ListBackupsResponse. + * Constructs a new DataCatalogConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IListBackupsResponse); - - /** ListBackupsResponse backups. */ - public backups: google.cloud.metastore.v1alpha.IBackup[]; - - /** ListBackupsResponse nextPageToken. */ - public nextPageToken: string; + constructor(properties?: google.cloud.metastore.v1beta.IDataCatalogConfig); - /** ListBackupsResponse unreachable. */ - public unreachable: string[]; + /** DataCatalogConfig enabled. */ + public enabled: boolean; /** - * Creates a new ListBackupsResponse instance using the specified properties. + * Creates a new DataCatalogConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ListBackupsResponse instance + * @returns DataCatalogConfig instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IListBackupsResponse): google.cloud.metastore.v1alpha.ListBackupsResponse; + public static create(properties?: google.cloud.metastore.v1beta.IDataCatalogConfig): google.cloud.metastore.v1beta.DataCatalogConfig; /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsResponse.verify|verify} messages. - * @param message ListBackupsResponse message or plain object to encode + * Encodes the specified DataCatalogConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.DataCatalogConfig.verify|verify} messages. + * @param message DataCatalogConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IDataCatalogConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsResponse.verify|verify} messages. - * @param message ListBackupsResponse message or plain object to encode + * Encodes the specified DataCatalogConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DataCatalogConfig.verify|verify} messages. + * @param message DataCatalogConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IDataCatalogConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. + * Decodes a DataCatalogConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBackupsResponse + * @returns DataCatalogConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ListBackupsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.DataCatalogConfig; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * Decodes a DataCatalogConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBackupsResponse + * @returns DataCatalogConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ListBackupsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.DataCatalogConfig; /** - * Verifies a ListBackupsResponse message. + * Verifies a DataCatalogConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DataCatalogConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBackupsResponse + * @returns DataCatalogConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ListBackupsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.DataCatalogConfig; /** - * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. - * @param message ListBackupsResponse + * Creates a plain object from a DataCatalogConfig message. Also converts values to other types if specified. + * @param message DataCatalogConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.DataCatalogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBackupsResponse to JSON. + * Converts this DataCatalogConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListBackupsResponse + * Gets the default type url for DataCatalogConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetBackupRequest. */ - interface IGetBackupRequest { + /** Properties of a DataplexConfig. */ + interface IDataplexConfig { - /** GetBackupRequest name */ - name?: (string|null); + /** DataplexConfig lakeResources */ + lakeResources?: ({ [k: string]: google.cloud.metastore.v1beta.ILake }|null); } - /** Represents a GetBackupRequest. */ - class GetBackupRequest implements IGetBackupRequest { + /** Represents a DataplexConfig. */ + class DataplexConfig implements IDataplexConfig { /** - * Constructs a new GetBackupRequest. + * Constructs a new DataplexConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IGetBackupRequest); + constructor(properties?: google.cloud.metastore.v1beta.IDataplexConfig); - /** GetBackupRequest name. */ - public name: string; + /** DataplexConfig lakeResources. */ + public lakeResources: { [k: string]: google.cloud.metastore.v1beta.ILake }; /** - * Creates a new GetBackupRequest instance using the specified properties. + * Creates a new DataplexConfig instance using the specified properties. * @param [properties] Properties to set - * @returns GetBackupRequest instance + * @returns DataplexConfig instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IGetBackupRequest): google.cloud.metastore.v1alpha.GetBackupRequest; + public static create(properties?: google.cloud.metastore.v1beta.IDataplexConfig): google.cloud.metastore.v1beta.DataplexConfig; /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.GetBackupRequest.verify|verify} messages. - * @param message GetBackupRequest message or plain object to encode + * Encodes the specified DataplexConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.DataplexConfig.verify|verify} messages. + * @param message DataplexConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IDataplexConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.GetBackupRequest.verify|verify} messages. - * @param message GetBackupRequest message or plain object to encode + * Encodes the specified DataplexConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DataplexConfig.verify|verify} messages. + * @param message DataplexConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IDataplexConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetBackupRequest message from the specified reader or buffer. + * Decodes a DataplexConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetBackupRequest + * @returns DataplexConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.GetBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.DataplexConfig; /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a DataplexConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetBackupRequest + * @returns DataplexConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.GetBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.DataplexConfig; /** - * Verifies a GetBackupRequest message. + * Verifies a DataplexConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DataplexConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetBackupRequest + * @returns DataplexConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.GetBackupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.DataplexConfig; /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. - * @param message GetBackupRequest + * Creates a plain object from a DataplexConfig message. Also converts values to other types if specified. + * @param message DataplexConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.DataplexConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetBackupRequest to JSON. + * Converts this DataplexConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetBackupRequest + * Gets the default type url for DataplexConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateBackupRequest. */ - interface ICreateBackupRequest { - - /** CreateBackupRequest parent */ - parent?: (string|null); - - /** CreateBackupRequest backupId */ - backupId?: (string|null); - - /** CreateBackupRequest backup */ - backup?: (google.cloud.metastore.v1alpha.IBackup|null); + /** Properties of a Lake. */ + interface ILake { - /** CreateBackupRequest requestId */ - requestId?: (string|null); + /** Lake name */ + name?: (string|null); } - /** Represents a CreateBackupRequest. */ - class CreateBackupRequest implements ICreateBackupRequest { + /** Represents a Lake. */ + class Lake implements ILake { /** - * Constructs a new CreateBackupRequest. + * Constructs a new Lake. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.ICreateBackupRequest); - - /** CreateBackupRequest parent. */ - public parent: string; - - /** CreateBackupRequest backupId. */ - public backupId: string; + constructor(properties?: google.cloud.metastore.v1beta.ILake); - /** CreateBackupRequest backup. */ - public backup?: (google.cloud.metastore.v1alpha.IBackup|null); - - /** CreateBackupRequest requestId. */ - public requestId: string; + /** Lake name. */ + public name: string; /** - * Creates a new CreateBackupRequest instance using the specified properties. + * Creates a new Lake instance using the specified properties. * @param [properties] Properties to set - * @returns CreateBackupRequest instance + * @returns Lake instance */ - public static create(properties?: google.cloud.metastore.v1alpha.ICreateBackupRequest): google.cloud.metastore.v1alpha.CreateBackupRequest; + public static create(properties?: google.cloud.metastore.v1beta.ILake): google.cloud.metastore.v1beta.Lake; /** - * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateBackupRequest.verify|verify} messages. - * @param message CreateBackupRequest message or plain object to encode + * Encodes the specified Lake message. Does not implicitly {@link google.cloud.metastore.v1beta.Lake.verify|verify} messages. + * @param message Lake message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.ILake, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateBackupRequest.verify|verify} messages. - * @param message CreateBackupRequest message or plain object to encode + * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Lake.verify|verify} messages. + * @param message Lake message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.ILake, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateBackupRequest message from the specified reader or buffer. + * Decodes a Lake message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateBackupRequest + * @returns Lake * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.CreateBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.Lake; /** - * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a Lake message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateBackupRequest + * @returns Lake * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.CreateBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.Lake; /** - * Verifies a CreateBackupRequest message. + * Verifies a Lake message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Lake message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateBackupRequest + * @returns Lake */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.CreateBackupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.Lake; /** - * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. - * @param message CreateBackupRequest + * Creates a plain object from a Lake message. Also converts values to other types if specified. + * @param message Lake * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.CreateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.Lake, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateBackupRequest to JSON. + * Converts this Lake to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateBackupRequest + * Gets the default type url for Lake * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteBackupRequest. */ - interface IDeleteBackupRequest { + /** Properties of a MaintenanceWindow. */ + interface IMaintenanceWindow { - /** DeleteBackupRequest name */ - name?: (string|null); + /** MaintenanceWindow hourOfDay */ + hourOfDay?: (google.protobuf.IInt32Value|null); - /** DeleteBackupRequest requestId */ - requestId?: (string|null); + /** MaintenanceWindow dayOfWeek */ + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); } - /** Represents a DeleteBackupRequest. */ - class DeleteBackupRequest implements IDeleteBackupRequest { + /** Represents a MaintenanceWindow. */ + class MaintenanceWindow implements IMaintenanceWindow { /** - * Constructs a new DeleteBackupRequest. + * Constructs a new MaintenanceWindow. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IDeleteBackupRequest); + constructor(properties?: google.cloud.metastore.v1beta.IMaintenanceWindow); - /** DeleteBackupRequest name. */ - public name: string; + /** MaintenanceWindow hourOfDay. */ + public hourOfDay?: (google.protobuf.IInt32Value|null); - /** DeleteBackupRequest requestId. */ - public requestId: string; + /** MaintenanceWindow dayOfWeek. */ + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); /** - * Creates a new DeleteBackupRequest instance using the specified properties. + * Creates a new MaintenanceWindow instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteBackupRequest instance + * @returns MaintenanceWindow instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IDeleteBackupRequest): google.cloud.metastore.v1alpha.DeleteBackupRequest; + public static create(properties?: google.cloud.metastore.v1beta.IMaintenanceWindow): google.cloud.metastore.v1beta.MaintenanceWindow; /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteBackupRequest.verify|verify} messages. - * @param message DeleteBackupRequest message or plain object to encode + * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.metastore.v1beta.MaintenanceWindow.verify|verify} messages. + * @param message MaintenanceWindow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteBackupRequest.verify|verify} messages. - * @param message DeleteBackupRequest message or plain object to encode + * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MaintenanceWindow.verify|verify} messages. + * @param message MaintenanceWindow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * Decodes a MaintenanceWindow message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteBackupRequest + * @returns MaintenanceWindow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.DeleteBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.MaintenanceWindow; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteBackupRequest + * @returns MaintenanceWindow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.DeleteBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.MaintenanceWindow; /** - * Verifies a DeleteBackupRequest message. + * Verifies a MaintenanceWindow message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteBackupRequest + * @returns MaintenanceWindow */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.DeleteBackupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.MaintenanceWindow; /** - * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. - * @param message DeleteBackupRequest + * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * @param message MaintenanceWindow * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.MaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteBackupRequest to JSON. + * Converts this MaintenanceWindow to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteBackupRequest + * Gets the default type url for MaintenanceWindow * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExportMetadataRequest. */ - interface IExportMetadataRequest { + /** Properties of a HiveMetastoreConfig. */ + interface IHiveMetastoreConfig { - /** ExportMetadataRequest destinationGcsFolder */ - destinationGcsFolder?: (string|null); + /** HiveMetastoreConfig version */ + version?: (string|null); - /** ExportMetadataRequest service */ - service?: (string|null); + /** HiveMetastoreConfig configOverrides */ + configOverrides?: ({ [k: string]: string }|null); - /** ExportMetadataRequest requestId */ - requestId?: (string|null); + /** HiveMetastoreConfig kerberosConfig */ + kerberosConfig?: (google.cloud.metastore.v1beta.IKerberosConfig|null); - /** ExportMetadataRequest databaseDumpType */ - databaseDumpType?: (google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|null); + /** HiveMetastoreConfig endpointProtocol */ + endpointProtocol?: (google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol|keyof typeof google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol|null); + + /** HiveMetastoreConfig auxiliaryVersions */ + auxiliaryVersions?: ({ [k: string]: google.cloud.metastore.v1beta.IAuxiliaryVersionConfig }|null); } - /** Represents an ExportMetadataRequest. */ - class ExportMetadataRequest implements IExportMetadataRequest { + /** Represents a HiveMetastoreConfig. */ + class HiveMetastoreConfig implements IHiveMetastoreConfig { /** - * Constructs a new ExportMetadataRequest. + * Constructs a new HiveMetastoreConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IExportMetadataRequest); + constructor(properties?: google.cloud.metastore.v1beta.IHiveMetastoreConfig); - /** ExportMetadataRequest destinationGcsFolder. */ - public destinationGcsFolder?: (string|null); + /** HiveMetastoreConfig version. */ + public version: string; - /** ExportMetadataRequest service. */ - public service: string; + /** HiveMetastoreConfig configOverrides. */ + public configOverrides: { [k: string]: string }; - /** ExportMetadataRequest requestId. */ - public requestId: string; + /** HiveMetastoreConfig kerberosConfig. */ + public kerberosConfig?: (google.cloud.metastore.v1beta.IKerberosConfig|null); - /** ExportMetadataRequest databaseDumpType. */ - public databaseDumpType: (google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type); + /** HiveMetastoreConfig endpointProtocol. */ + public endpointProtocol: (google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol|keyof typeof google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol); - /** ExportMetadataRequest destination. */ - public destination?: "destinationGcsFolder"; + /** HiveMetastoreConfig auxiliaryVersions. */ + public auxiliaryVersions: { [k: string]: google.cloud.metastore.v1beta.IAuxiliaryVersionConfig }; /** - * Creates a new ExportMetadataRequest instance using the specified properties. + * Creates a new HiveMetastoreConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ExportMetadataRequest instance + * @returns HiveMetastoreConfig instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IExportMetadataRequest): google.cloud.metastore.v1alpha.ExportMetadataRequest; + public static create(properties?: google.cloud.metastore.v1beta.IHiveMetastoreConfig): google.cloud.metastore.v1beta.HiveMetastoreConfig; /** - * Encodes the specified ExportMetadataRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ExportMetadataRequest.verify|verify} messages. - * @param message ExportMetadataRequest message or plain object to encode + * Encodes the specified HiveMetastoreConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.HiveMetastoreConfig.verify|verify} messages. + * @param message HiveMetastoreConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IExportMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IHiveMetastoreConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportMetadataRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ExportMetadataRequest.verify|verify} messages. - * @param message ExportMetadataRequest message or plain object to encode + * Encodes the specified HiveMetastoreConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.HiveMetastoreConfig.verify|verify} messages. + * @param message HiveMetastoreConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IExportMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IHiveMetastoreConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportMetadataRequest message from the specified reader or buffer. + * Decodes a HiveMetastoreConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportMetadataRequest + * @returns HiveMetastoreConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.ExportMetadataRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.HiveMetastoreConfig; /** - * Decodes an ExportMetadataRequest message from the specified reader or buffer, length delimited. + * Decodes a HiveMetastoreConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportMetadataRequest + * @returns HiveMetastoreConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.ExportMetadataRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.HiveMetastoreConfig; /** - * Verifies an ExportMetadataRequest message. + * Verifies a HiveMetastoreConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExportMetadataRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HiveMetastoreConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportMetadataRequest + * @returns HiveMetastoreConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ExportMetadataRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.HiveMetastoreConfig; /** - * Creates a plain object from an ExportMetadataRequest message. Also converts values to other types if specified. - * @param message ExportMetadataRequest + * Creates a plain object from a HiveMetastoreConfig message. Also converts values to other types if specified. + * @param message HiveMetastoreConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.ExportMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.HiveMetastoreConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportMetadataRequest to JSON. + * Converts this HiveMetastoreConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExportMetadataRequest + * Gets the default type url for HiveMetastoreConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RestoreServiceRequest. */ - interface IRestoreServiceRequest { + namespace HiveMetastoreConfig { - /** RestoreServiceRequest service */ - service?: (string|null); + /** EndpointProtocol enum. */ + enum EndpointProtocol { + ENDPOINT_PROTOCOL_UNSPECIFIED = 0, + THRIFT = 1, + GRPC = 2 + } + } - /** RestoreServiceRequest backup */ - backup?: (string|null); + /** Properties of a KerberosConfig. */ + interface IKerberosConfig { - /** RestoreServiceRequest restoreType */ - restoreType?: (google.cloud.metastore.v1alpha.Restore.RestoreType|keyof typeof google.cloud.metastore.v1alpha.Restore.RestoreType|null); + /** KerberosConfig keytab */ + keytab?: (google.cloud.metastore.v1beta.ISecret|null); - /** RestoreServiceRequest requestId */ - requestId?: (string|null); + /** KerberosConfig principal */ + principal?: (string|null); + + /** KerberosConfig krb5ConfigGcsUri */ + krb5ConfigGcsUri?: (string|null); } - /** Represents a RestoreServiceRequest. */ - class RestoreServiceRequest implements IRestoreServiceRequest { + /** Represents a KerberosConfig. */ + class KerberosConfig implements IKerberosConfig { /** - * Constructs a new RestoreServiceRequest. + * Constructs a new KerberosConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IRestoreServiceRequest); - - /** RestoreServiceRequest service. */ - public service: string; + constructor(properties?: google.cloud.metastore.v1beta.IKerberosConfig); - /** RestoreServiceRequest backup. */ - public backup: string; + /** KerberosConfig keytab. */ + public keytab?: (google.cloud.metastore.v1beta.ISecret|null); - /** RestoreServiceRequest restoreType. */ - public restoreType: (google.cloud.metastore.v1alpha.Restore.RestoreType|keyof typeof google.cloud.metastore.v1alpha.Restore.RestoreType); + /** KerberosConfig principal. */ + public principal: string; - /** RestoreServiceRequest requestId. */ - public requestId: string; + /** KerberosConfig krb5ConfigGcsUri. */ + public krb5ConfigGcsUri: string; /** - * Creates a new RestoreServiceRequest instance using the specified properties. + * Creates a new KerberosConfig instance using the specified properties. * @param [properties] Properties to set - * @returns RestoreServiceRequest instance + * @returns KerberosConfig instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IRestoreServiceRequest): google.cloud.metastore.v1alpha.RestoreServiceRequest; + public static create(properties?: google.cloud.metastore.v1beta.IKerberosConfig): google.cloud.metastore.v1beta.KerberosConfig; /** - * Encodes the specified RestoreServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.RestoreServiceRequest.verify|verify} messages. - * @param message RestoreServiceRequest message or plain object to encode + * Encodes the specified KerberosConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.KerberosConfig.verify|verify} messages. + * @param message KerberosConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IRestoreServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IKerberosConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RestoreServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.RestoreServiceRequest.verify|verify} messages. - * @param message RestoreServiceRequest message or plain object to encode + * Encodes the specified KerberosConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.KerberosConfig.verify|verify} messages. + * @param message KerberosConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IRestoreServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IKerberosConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RestoreServiceRequest message from the specified reader or buffer. + * Decodes a KerberosConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RestoreServiceRequest + * @returns KerberosConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.RestoreServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.KerberosConfig; /** - * Decodes a RestoreServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a KerberosConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RestoreServiceRequest + * @returns KerberosConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.RestoreServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.KerberosConfig; /** - * Verifies a RestoreServiceRequest message. + * Verifies a KerberosConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RestoreServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a KerberosConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RestoreServiceRequest + * @returns KerberosConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.RestoreServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.KerberosConfig; /** - * Creates a plain object from a RestoreServiceRequest message. Also converts values to other types if specified. - * @param message RestoreServiceRequest + * Creates a plain object from a KerberosConfig message. Also converts values to other types if specified. + * @param message KerberosConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.RestoreServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.KerberosConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RestoreServiceRequest to JSON. + * Converts this KerberosConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RestoreServiceRequest + * Gets the default type url for KerberosConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { - - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target */ - target?: (string|null); - - /** OperationMetadata verb */ - verb?: (string|null); - - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); - - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); + /** Properties of a Secret. */ + interface ISecret { - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); + /** Secret cloudSecret */ + cloudSecret?: (string|null); } - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** Represents a Secret. */ + class Secret implements ISecret { /** - * Constructs a new OperationMetadata. + * Constructs a new Secret. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IOperationMetadata); - - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target. */ - public target: string; - - /** OperationMetadata verb. */ - public verb: string; - - /** OperationMetadata statusMessage. */ - public statusMessage: string; + constructor(properties?: google.cloud.metastore.v1beta.ISecret); - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; + /** Secret cloudSecret. */ + public cloudSecret?: (string|null); - /** OperationMetadata apiVersion. */ - public apiVersion: string; + /** Secret value. */ + public value?: "cloudSecret"; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new Secret instance using the specified properties. * @param [properties] Properties to set - * @returns OperationMetadata instance + * @returns Secret instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IOperationMetadata): google.cloud.metastore.v1alpha.OperationMetadata; + public static create(properties?: google.cloud.metastore.v1beta.ISecret): google.cloud.metastore.v1beta.Secret; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.metastore.v1alpha.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified Secret message. Does not implicitly {@link google.cloud.metastore.v1beta.Secret.verify|verify} messages. + * @param message Secret message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.ISecret, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified Secret message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Secret.verify|verify} messages. + * @param message Secret message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.ISecret, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a Secret message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperationMetadata + * @returns Secret * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.Secret; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a Secret message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperationMetadata + * @returns Secret * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.Secret; /** - * Verifies an OperationMetadata message. + * Verifies a Secret message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a Secret message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperationMetadata + * @returns Secret */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.Secret; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata + * Creates a plain object from a Secret message. Also converts values to other types if specified. + * @param message Secret * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.Secret, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperationMetadata to JSON. + * Converts this Secret to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for Secret * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LocationMetadata. */ - interface ILocationMetadata { + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { - /** LocationMetadata supportedHiveMetastoreVersions */ - supportedHiveMetastoreVersions?: (google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion[]|null); + /** EncryptionConfig kmsKey */ + kmsKey?: (string|null); } - /** Represents a LocationMetadata. */ - class LocationMetadata implements ILocationMetadata { + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { /** - * Constructs a new LocationMetadata. + * Constructs a new EncryptionConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.ILocationMetadata); + constructor(properties?: google.cloud.metastore.v1beta.IEncryptionConfig); - /** LocationMetadata supportedHiveMetastoreVersions. */ - public supportedHiveMetastoreVersions: google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion[]; + /** EncryptionConfig kmsKey. */ + public kmsKey: string; /** - * Creates a new LocationMetadata instance using the specified properties. + * Creates a new EncryptionConfig instance using the specified properties. * @param [properties] Properties to set - * @returns LocationMetadata instance + * @returns EncryptionConfig instance */ - public static create(properties?: google.cloud.metastore.v1alpha.ILocationMetadata): google.cloud.metastore.v1alpha.LocationMetadata; + public static create(properties?: google.cloud.metastore.v1beta.IEncryptionConfig): google.cloud.metastore.v1beta.EncryptionConfig; /** - * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.verify|verify} messages. - * @param message LocationMetadata message or plain object to encode + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.verify|verify} messages. - * @param message LocationMetadata message or plain object to encode + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LocationMetadata message from the specified reader or buffer. + * Decodes an EncryptionConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LocationMetadata + * @returns EncryptionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.LocationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.EncryptionConfig; /** - * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LocationMetadata + * @returns EncryptionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.LocationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.EncryptionConfig; /** - * Verifies a LocationMetadata message. + * Verifies an EncryptionConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LocationMetadata + * @returns EncryptionConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.LocationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.EncryptionConfig; /** - * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. - * @param message LocationMetadata + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @param message EncryptionConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.LocationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LocationMetadata to JSON. + * Converts this EncryptionConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LocationMetadata + * Gets the default type url for EncryptionConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace LocationMetadata { - - /** Properties of a HiveMetastoreVersion. */ - interface IHiveMetastoreVersion { - - /** HiveMetastoreVersion version */ - version?: (string|null); - - /** HiveMetastoreVersion isDefault */ - isDefault?: (boolean|null); - } - - /** Represents a HiveMetastoreVersion. */ - class HiveMetastoreVersion implements IHiveMetastoreVersion { - - /** - * Constructs a new HiveMetastoreVersion. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion); - - /** HiveMetastoreVersion version. */ - public version: string; - - /** HiveMetastoreVersion isDefault. */ - public isDefault: boolean; - - /** - * Creates a new HiveMetastoreVersion instance using the specified properties. - * @param [properties] Properties to set - * @returns HiveMetastoreVersion instance - */ - public static create(properties?: google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion): google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion; - - /** - * Encodes the specified HiveMetastoreVersion message. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. - * @param message HiveMetastoreVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HiveMetastoreVersion message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. - * @param message HiveMetastoreVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HiveMetastoreVersion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HiveMetastoreVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion; - - /** - * Decodes a HiveMetastoreVersion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HiveMetastoreVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion; - - /** - * Verifies a HiveMetastoreVersion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HiveMetastoreVersion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HiveMetastoreVersion - */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion; - - /** - * Creates a plain object from a HiveMetastoreVersion message. Also converts values to other types if specified. - * @param message HiveMetastoreVersion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of an AuxiliaryVersionConfig. */ + interface IAuxiliaryVersionConfig { - /** - * Converts this HiveMetastoreVersion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** AuxiliaryVersionConfig version */ + version?: (string|null); - /** - * Gets the default type url for HiveMetastoreVersion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** AuxiliaryVersionConfig configOverrides */ + configOverrides?: ({ [k: string]: string }|null); - /** Properties of a DatabaseDumpSpec. */ - interface IDatabaseDumpSpec { + /** AuxiliaryVersionConfig networkConfig */ + networkConfig?: (google.cloud.metastore.v1beta.INetworkConfig|null); } - /** Represents a DatabaseDumpSpec. */ - class DatabaseDumpSpec implements IDatabaseDumpSpec { + /** Represents an AuxiliaryVersionConfig. */ + class AuxiliaryVersionConfig implements IAuxiliaryVersionConfig { /** - * Constructs a new DatabaseDumpSpec. + * Constructs a new AuxiliaryVersionConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1alpha.IDatabaseDumpSpec); + constructor(properties?: google.cloud.metastore.v1beta.IAuxiliaryVersionConfig); + + /** AuxiliaryVersionConfig version. */ + public version: string; + + /** AuxiliaryVersionConfig configOverrides. */ + public configOverrides: { [k: string]: string }; + + /** AuxiliaryVersionConfig networkConfig. */ + public networkConfig?: (google.cloud.metastore.v1beta.INetworkConfig|null); /** - * Creates a new DatabaseDumpSpec instance using the specified properties. + * Creates a new AuxiliaryVersionConfig instance using the specified properties. * @param [properties] Properties to set - * @returns DatabaseDumpSpec instance + * @returns AuxiliaryVersionConfig instance */ - public static create(properties?: google.cloud.metastore.v1alpha.IDatabaseDumpSpec): google.cloud.metastore.v1alpha.DatabaseDumpSpec; + public static create(properties?: google.cloud.metastore.v1beta.IAuxiliaryVersionConfig): google.cloud.metastore.v1beta.AuxiliaryVersionConfig; /** - * Encodes the specified DatabaseDumpSpec message. Does not implicitly {@link google.cloud.metastore.v1alpha.DatabaseDumpSpec.verify|verify} messages. - * @param message DatabaseDumpSpec message or plain object to encode + * Encodes the specified AuxiliaryVersionConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.AuxiliaryVersionConfig.verify|verify} messages. + * @param message AuxiliaryVersionConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1alpha.IDatabaseDumpSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IAuxiliaryVersionConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DatabaseDumpSpec message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DatabaseDumpSpec.verify|verify} messages. - * @param message DatabaseDumpSpec message or plain object to encode + * Encodes the specified AuxiliaryVersionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.AuxiliaryVersionConfig.verify|verify} messages. + * @param message AuxiliaryVersionConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1alpha.IDatabaseDumpSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IAuxiliaryVersionConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DatabaseDumpSpec message from the specified reader or buffer. + * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DatabaseDumpSpec + * @returns AuxiliaryVersionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1alpha.DatabaseDumpSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.AuxiliaryVersionConfig; /** - * Decodes a DatabaseDumpSpec message from the specified reader or buffer, length delimited. + * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DatabaseDumpSpec + * @returns AuxiliaryVersionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1alpha.DatabaseDumpSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.AuxiliaryVersionConfig; /** - * Verifies a DatabaseDumpSpec message. + * Verifies an AuxiliaryVersionConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DatabaseDumpSpec message from a plain object. Also converts values to their respective internal types. + * Creates an AuxiliaryVersionConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DatabaseDumpSpec + * @returns AuxiliaryVersionConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.DatabaseDumpSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.AuxiliaryVersionConfig; /** - * Creates a plain object from a DatabaseDumpSpec message. Also converts values to other types if specified. - * @param message DatabaseDumpSpec + * Creates a plain object from an AuxiliaryVersionConfig message. Also converts values to other types if specified. + * @param message AuxiliaryVersionConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1alpha.DatabaseDumpSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.AuxiliaryVersionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DatabaseDumpSpec to JSON. + * Converts this AuxiliaryVersionConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DatabaseDumpSpec + * Gets the default type url for AuxiliaryVersionConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace DatabaseDumpSpec { + /** Properties of a NetworkConfig. */ + interface INetworkConfig { - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - MYSQL = 1, - AVRO = 2 - } + /** NetworkConfig consumers */ + consumers?: (google.cloud.metastore.v1beta.NetworkConfig.IConsumer[]|null); } - } - /** Namespace v1beta. */ - namespace v1beta { + /** Represents a NetworkConfig. */ + class NetworkConfig implements INetworkConfig { - /** Represents a DataprocMetastore */ - class DataprocMetastore extends $protobuf.rpc.Service { + /** + * Constructs a new NetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1beta.INetworkConfig); + + /** NetworkConfig consumers. */ + public consumers: google.cloud.metastore.v1beta.NetworkConfig.IConsumer[]; /** - * Constructs a new DataprocMetastore service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Creates a new NetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkConfig instance */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + public static create(properties?: google.cloud.metastore.v1beta.INetworkConfig): google.cloud.metastore.v1beta.NetworkConfig; /** - * Creates new DataprocMetastore service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataprocMetastore; + public static encode(message: google.cloud.metastore.v1beta.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListServices. - * @param request ListServicesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListServicesResponse + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listServices(request: google.cloud.metastore.v1beta.IListServicesRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.ListServicesCallback): void; + public static encodeDelimited(message: google.cloud.metastore.v1beta.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListServices. - * @param request ListServicesRequest message or plain object - * @returns Promise + * Decodes a NetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listServices(request: google.cloud.metastore.v1beta.IListServicesRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.NetworkConfig; /** - * Calls GetService. - * @param request GetServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Service + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getService(request: google.cloud.metastore.v1beta.IGetServiceRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.GetServiceCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.NetworkConfig; /** - * Calls GetService. - * @param request GetServiceRequest message or plain object - * @returns Promise + * Verifies a NetworkConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getService(request: google.cloud.metastore.v1beta.IGetServiceRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateService. - * @param request CreateServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkConfig */ - public createService(request: google.cloud.metastore.v1beta.ICreateServiceRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.CreateServiceCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.NetworkConfig; /** - * Calls CreateService. - * @param request CreateServiceRequest message or plain object - * @returns Promise + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @param message NetworkConfig + * @param [options] Conversion options + * @returns Plain object */ - public createService(request: google.cloud.metastore.v1beta.ICreateServiceRequest): Promise; + public static toObject(message: google.cloud.metastore.v1beta.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateService. - * @param request UpdateServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Converts this NetworkConfig to JSON. + * @returns JSON object */ - public updateService(request: google.cloud.metastore.v1beta.IUpdateServiceRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.UpdateServiceCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls UpdateService. - * @param request UpdateServiceRequest message or plain object - * @returns Promise + * Gets the default type url for NetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public updateService(request: google.cloud.metastore.v1beta.IUpdateServiceRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkConfig { + + /** Properties of a Consumer. */ + interface IConsumer { + + /** Consumer subnetwork */ + subnetwork?: (string|null); + + /** Consumer endpointUri */ + endpointUri?: (string|null); + } + + /** Represents a Consumer. */ + class Consumer implements IConsumer { + + /** + * Constructs a new Consumer. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1beta.NetworkConfig.IConsumer); + + /** Consumer subnetwork. */ + public subnetwork?: (string|null); + + /** Consumer endpointUri. */ + public endpointUri: string; + + /** Consumer vpcResource. */ + public vpcResource?: "subnetwork"; + + /** + * Creates a new Consumer instance using the specified properties. + * @param [properties] Properties to set + * @returns Consumer instance + */ + public static create(properties?: google.cloud.metastore.v1beta.NetworkConfig.IConsumer): google.cloud.metastore.v1beta.NetworkConfig.Consumer; + + /** + * Encodes the specified Consumer message. Does not implicitly {@link google.cloud.metastore.v1beta.NetworkConfig.Consumer.verify|verify} messages. + * @param message Consumer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1beta.NetworkConfig.IConsumer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Consumer message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.NetworkConfig.Consumer.verify|verify} messages. + * @param message Consumer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1beta.NetworkConfig.IConsumer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Consumer message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Consumer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.NetworkConfig.Consumer; + + /** + * Decodes a Consumer message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Consumer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.NetworkConfig.Consumer; + + /** + * Verifies a Consumer message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Consumer message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Consumer + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.NetworkConfig.Consumer; + + /** + * Creates a plain object from a Consumer message. Also converts values to other types if specified. + * @param message Consumer + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1beta.NetworkConfig.Consumer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Consumer to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Consumer + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a TelemetryConfig. */ + interface ITelemetryConfig { + + /** TelemetryConfig logFormat */ + logFormat?: (google.cloud.metastore.v1beta.TelemetryConfig.LogFormat|keyof typeof google.cloud.metastore.v1beta.TelemetryConfig.LogFormat|null); + } + + /** Represents a TelemetryConfig. */ + class TelemetryConfig implements ITelemetryConfig { /** - * Calls DeleteService. - * @param request DeleteServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Constructs a new TelemetryConfig. + * @param [properties] Properties to set */ - public deleteService(request: google.cloud.metastore.v1beta.IDeleteServiceRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.DeleteServiceCallback): void; + constructor(properties?: google.cloud.metastore.v1beta.ITelemetryConfig); + + /** TelemetryConfig logFormat. */ + public logFormat: (google.cloud.metastore.v1beta.TelemetryConfig.LogFormat|keyof typeof google.cloud.metastore.v1beta.TelemetryConfig.LogFormat); /** - * Calls DeleteService. - * @param request DeleteServiceRequest message or plain object - * @returns Promise + * Creates a new TelemetryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TelemetryConfig instance */ - public deleteService(request: google.cloud.metastore.v1beta.IDeleteServiceRequest): Promise; + public static create(properties?: google.cloud.metastore.v1beta.ITelemetryConfig): google.cloud.metastore.v1beta.TelemetryConfig; /** - * Calls ListMetadataImports. - * @param request ListMetadataImportsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMetadataImportsResponse + * Encodes the specified TelemetryConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.TelemetryConfig.verify|verify} messages. + * @param message TelemetryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listMetadataImports(request: google.cloud.metastore.v1beta.IListMetadataImportsRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImportsCallback): void; + public static encode(message: google.cloud.metastore.v1beta.ITelemetryConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListMetadataImports. - * @param request ListMetadataImportsRequest message or plain object - * @returns Promise + * Encodes the specified TelemetryConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.TelemetryConfig.verify|verify} messages. + * @param message TelemetryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listMetadataImports(request: google.cloud.metastore.v1beta.IListMetadataImportsRequest): Promise; + public static encodeDelimited(message: google.cloud.metastore.v1beta.ITelemetryConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetMetadataImport. - * @param request GetMetadataImportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MetadataImport + * Decodes a TelemetryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TelemetryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getMetadataImport(request: google.cloud.metastore.v1beta.IGetMetadataImportRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.GetMetadataImportCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.TelemetryConfig; /** - * Calls GetMetadataImport. - * @param request GetMetadataImportRequest message or plain object - * @returns Promise + * Decodes a TelemetryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TelemetryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getMetadataImport(request: google.cloud.metastore.v1beta.IGetMetadataImportRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.TelemetryConfig; /** - * Calls CreateMetadataImport. - * @param request CreateMetadataImportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Verifies a TelemetryConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createMetadataImport(request: google.cloud.metastore.v1beta.ICreateMetadataImportRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.CreateMetadataImportCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateMetadataImport. - * @param request CreateMetadataImportRequest message or plain object - * @returns Promise + * Creates a TelemetryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TelemetryConfig */ - public createMetadataImport(request: google.cloud.metastore.v1beta.ICreateMetadataImportRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.TelemetryConfig; /** - * Calls UpdateMetadataImport. - * @param request UpdateMetadataImportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a plain object from a TelemetryConfig message. Also converts values to other types if specified. + * @param message TelemetryConfig + * @param [options] Conversion options + * @returns Plain object */ - public updateMetadataImport(request: google.cloud.metastore.v1beta.IUpdateMetadataImportRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.UpdateMetadataImportCallback): void; + public static toObject(message: google.cloud.metastore.v1beta.TelemetryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateMetadataImport. - * @param request UpdateMetadataImportRequest message or plain object - * @returns Promise + * Converts this TelemetryConfig to JSON. + * @returns JSON object */ - public updateMetadataImport(request: google.cloud.metastore.v1beta.IUpdateMetadataImportRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls ExportMetadata. - * @param request ExportMetadataRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Gets the default type url for TelemetryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public exportMetadata(request: google.cloud.metastore.v1beta.IExportMetadataRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.ExportMetadataCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TelemetryConfig { + + /** LogFormat enum. */ + enum LogFormat { + LOG_FORMAT_UNSPECIFIED = 0, + LEGACY = 1, + JSON = 2 + } + } + + /** Properties of a MetadataManagementActivity. */ + interface IMetadataManagementActivity { + + /** MetadataManagementActivity metadataExports */ + metadataExports?: (google.cloud.metastore.v1beta.IMetadataExport[]|null); + + /** MetadataManagementActivity restores */ + restores?: (google.cloud.metastore.v1beta.IRestore[]|null); + } + + /** Represents a MetadataManagementActivity. */ + class MetadataManagementActivity implements IMetadataManagementActivity { /** - * Calls ExportMetadata. - * @param request ExportMetadataRequest message or plain object - * @returns Promise + * Constructs a new MetadataManagementActivity. + * @param [properties] Properties to set */ - public exportMetadata(request: google.cloud.metastore.v1beta.IExportMetadataRequest): Promise; + constructor(properties?: google.cloud.metastore.v1beta.IMetadataManagementActivity); + + /** MetadataManagementActivity metadataExports. */ + public metadataExports: google.cloud.metastore.v1beta.IMetadataExport[]; + + /** MetadataManagementActivity restores. */ + public restores: google.cloud.metastore.v1beta.IRestore[]; /** - * Calls RestoreService. - * @param request RestoreServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a new MetadataManagementActivity instance using the specified properties. + * @param [properties] Properties to set + * @returns MetadataManagementActivity instance */ - public restoreService(request: google.cloud.metastore.v1beta.IRestoreServiceRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.RestoreServiceCallback): void; + public static create(properties?: google.cloud.metastore.v1beta.IMetadataManagementActivity): google.cloud.metastore.v1beta.MetadataManagementActivity; /** - * Calls RestoreService. - * @param request RestoreServiceRequest message or plain object - * @returns Promise + * Encodes the specified MetadataManagementActivity message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataManagementActivity.verify|verify} messages. + * @param message MetadataManagementActivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public restoreService(request: google.cloud.metastore.v1beta.IRestoreServiceRequest): Promise; + public static encode(message: google.cloud.metastore.v1beta.IMetadataManagementActivity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListBackups. - * @param request ListBackupsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupsResponse + * Encodes the specified MetadataManagementActivity message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataManagementActivity.verify|verify} messages. + * @param message MetadataManagementActivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listBackups(request: google.cloud.metastore.v1beta.IListBackupsRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.ListBackupsCallback): void; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IMetadataManagementActivity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListBackups. - * @param request ListBackupsRequest message or plain object - * @returns Promise + * Decodes a MetadataManagementActivity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetadataManagementActivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listBackups(request: google.cloud.metastore.v1beta.IListBackupsRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.MetadataManagementActivity; /** - * Calls GetBackup. - * @param request GetBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Backup + * Decodes a MetadataManagementActivity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetadataManagementActivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getBackup(request: google.cloud.metastore.v1beta.IGetBackupRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.GetBackupCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.MetadataManagementActivity; /** - * Calls GetBackup. - * @param request GetBackupRequest message or plain object - * @returns Promise + * Verifies a MetadataManagementActivity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getBackup(request: google.cloud.metastore.v1beta.IGetBackupRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateBackup. - * @param request CreateBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a MetadataManagementActivity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetadataManagementActivity */ - public createBackup(request: google.cloud.metastore.v1beta.ICreateBackupRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.CreateBackupCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.MetadataManagementActivity; /** - * Calls CreateBackup. - * @param request CreateBackupRequest message or plain object - * @returns Promise + * Creates a plain object from a MetadataManagementActivity message. Also converts values to other types if specified. + * @param message MetadataManagementActivity + * @param [options] Conversion options + * @returns Plain object */ - public createBackup(request: google.cloud.metastore.v1beta.ICreateBackupRequest): Promise; + public static toObject(message: google.cloud.metastore.v1beta.MetadataManagementActivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteBackup. - * @param request DeleteBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Converts this MetadataManagementActivity to JSON. + * @returns JSON object */ - public deleteBackup(request: google.cloud.metastore.v1beta.IDeleteBackupRequest, callback: google.cloud.metastore.v1beta.DataprocMetastore.DeleteBackupCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls DeleteBackup. - * @param request DeleteBackupRequest message or plain object - * @returns Promise + * Gets the default type url for MetadataManagementActivity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public deleteBackup(request: google.cloud.metastore.v1beta.IDeleteBackupRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace DataprocMetastore { + /** Properties of a MetadataImport. */ + interface IMetadataImport { - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|listServices}. - * @param error Error, if any - * @param [response] ListServicesResponse - */ - type ListServicesCallback = (error: (Error|null), response?: google.cloud.metastore.v1beta.ListServicesResponse) => void; + /** MetadataImport databaseDump */ + databaseDump?: (google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump|null); - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|getService}. - * @param error Error, if any - * @param [response] Service - */ - type GetServiceCallback = (error: (Error|null), response?: google.cloud.metastore.v1beta.Service) => void; + /** MetadataImport name */ + name?: (string|null); - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|createService}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** MetadataImport description */ + description?: (string|null); + + /** MetadataImport createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** MetadataImport updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** MetadataImport endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** MetadataImport state */ + state?: (google.cloud.metastore.v1beta.MetadataImport.State|keyof typeof google.cloud.metastore.v1beta.MetadataImport.State|null); + } + + /** Represents a MetadataImport. */ + class MetadataImport implements IMetadataImport { /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|updateService}. - * @param error Error, if any - * @param [response] Operation + * Constructs a new MetadataImport. + * @param [properties] Properties to set */ - type UpdateServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + constructor(properties?: google.cloud.metastore.v1beta.IMetadataImport); + + /** MetadataImport databaseDump. */ + public databaseDump?: (google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump|null); + + /** MetadataImport name. */ + public name: string; + + /** MetadataImport description. */ + public description: string; + + /** MetadataImport createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** MetadataImport updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** MetadataImport endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** MetadataImport state. */ + public state: (google.cloud.metastore.v1beta.MetadataImport.State|keyof typeof google.cloud.metastore.v1beta.MetadataImport.State); - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|deleteService}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** MetadataImport metadata. */ + public metadata?: "databaseDump"; /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|listMetadataImports}. - * @param error Error, if any - * @param [response] ListMetadataImportsResponse + * Creates a new MetadataImport instance using the specified properties. + * @param [properties] Properties to set + * @returns MetadataImport instance */ - type ListMetadataImportsCallback = (error: (Error|null), response?: google.cloud.metastore.v1beta.ListMetadataImportsResponse) => void; + public static create(properties?: google.cloud.metastore.v1beta.IMetadataImport): google.cloud.metastore.v1beta.MetadataImport; /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|getMetadataImport}. - * @param error Error, if any - * @param [response] MetadataImport + * Encodes the specified MetadataImport message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.verify|verify} messages. + * @param message MetadataImport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetMetadataImportCallback = (error: (Error|null), response?: google.cloud.metastore.v1beta.MetadataImport) => void; + public static encode(message: google.cloud.metastore.v1beta.IMetadataImport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|createMetadataImport}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified MetadataImport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.verify|verify} messages. + * @param message MetadataImport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateMetadataImportCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IMetadataImport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|updateMetadataImport}. - * @param error Error, if any - * @param [response] Operation + * Decodes a MetadataImport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetadataImport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type UpdateMetadataImportCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.MetadataImport; /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|exportMetadata}. - * @param error Error, if any - * @param [response] Operation + * Decodes a MetadataImport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetadataImport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ExportMetadataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.MetadataImport; /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|restoreService}. - * @param error Error, if any - * @param [response] Operation + * Verifies a MetadataImport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type RestoreServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|listBackups}. - * @param error Error, if any - * @param [response] ListBackupsResponse + * Creates a MetadataImport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetadataImport */ - type ListBackupsCallback = (error: (Error|null), response?: google.cloud.metastore.v1beta.ListBackupsResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.MetadataImport; /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|getBackup}. - * @param error Error, if any - * @param [response] Backup + * Creates a plain object from a MetadataImport message. Also converts values to other types if specified. + * @param message MetadataImport + * @param [options] Conversion options + * @returns Plain object */ - type GetBackupCallback = (error: (Error|null), response?: google.cloud.metastore.v1beta.Backup) => void; + public static toObject(message: google.cloud.metastore.v1beta.MetadataImport, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|createBackup}. - * @param error Error, if any - * @param [response] Operation + * Converts this MetadataImport to JSON. + * @returns JSON object */ - type CreateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|deleteBackup}. - * @param error Error, if any - * @param [response] Operation + * Gets the default type url for MetadataImport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type DeleteBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Service. */ - interface IService { + namespace MetadataImport { - /** Service hiveMetastoreConfig */ - hiveMetastoreConfig?: (google.cloud.metastore.v1beta.IHiveMetastoreConfig|null); + /** Properties of a DatabaseDump. */ + interface IDatabaseDump { - /** Service name */ - name?: (string|null); + /** DatabaseDump databaseType */ + databaseType?: (google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType|keyof typeof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType|null); - /** Service createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** DatabaseDump gcsUri */ + gcsUri?: (string|null); - /** Service updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** DatabaseDump sourceDatabase */ + sourceDatabase?: (string|null); - /** Service labels */ - labels?: ({ [k: string]: string }|null); + /** DatabaseDump type */ + type?: (google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|null); + } - /** Service network */ - network?: (string|null); + /** Represents a DatabaseDump. */ + class DatabaseDump implements IDatabaseDump { - /** Service endpointUri */ - endpointUri?: (string|null); + /** + * Constructs a new DatabaseDump. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump); - /** Service port */ - port?: (number|null); + /** DatabaseDump databaseType. */ + public databaseType: (google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType|keyof typeof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType); - /** Service state */ - state?: (google.cloud.metastore.v1beta.Service.State|keyof typeof google.cloud.metastore.v1beta.Service.State|null); + /** DatabaseDump gcsUri. */ + public gcsUri: string; - /** Service stateMessage */ - stateMessage?: (string|null); + /** DatabaseDump sourceDatabase. */ + public sourceDatabase: string; - /** Service artifactGcsUri */ - artifactGcsUri?: (string|null); + /** DatabaseDump type. */ + public type: (google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1beta.DatabaseDumpSpec.Type); - /** Service tier */ - tier?: (google.cloud.metastore.v1beta.Service.Tier|keyof typeof google.cloud.metastore.v1beta.Service.Tier|null); + /** + * Creates a new DatabaseDump instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseDump instance + */ + public static create(properties?: google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump): google.cloud.metastore.v1beta.MetadataImport.DatabaseDump; - /** Service metadataIntegration */ - metadataIntegration?: (google.cloud.metastore.v1beta.IMetadataIntegration|null); + /** + * Encodes the specified DatabaseDump message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.verify|verify} messages. + * @param message DatabaseDump message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump, writer?: $protobuf.Writer): $protobuf.Writer; - /** Service maintenanceWindow */ - maintenanceWindow?: (google.cloud.metastore.v1beta.IMaintenanceWindow|null); + /** + * Encodes the specified DatabaseDump message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.verify|verify} messages. + * @param message DatabaseDump message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump, writer?: $protobuf.Writer): $protobuf.Writer; - /** Service uid */ - uid?: (string|null); + /** + * Decodes a DatabaseDump message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseDump + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.MetadataImport.DatabaseDump; - /** Service metadataManagementActivity */ - metadataManagementActivity?: (google.cloud.metastore.v1beta.IMetadataManagementActivity|null); + /** + * Decodes a DatabaseDump message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseDump + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.MetadataImport.DatabaseDump; - /** Service releaseChannel */ - releaseChannel?: (google.cloud.metastore.v1beta.Service.ReleaseChannel|keyof typeof google.cloud.metastore.v1beta.Service.ReleaseChannel|null); - } + /** + * Verifies a DatabaseDump message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a Service. */ - class Service implements IService { + /** + * Creates a DatabaseDump message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseDump + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.MetadataImport.DatabaseDump; - /** - * Constructs a new Service. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.metastore.v1beta.IService); + /** + * Creates a plain object from a DatabaseDump message. Also converts values to other types if specified. + * @param message DatabaseDump + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1beta.MetadataImport.DatabaseDump, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Service hiveMetastoreConfig. */ - public hiveMetastoreConfig?: (google.cloud.metastore.v1beta.IHiveMetastoreConfig|null); + /** + * Converts this DatabaseDump to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Service name. */ - public name: string; + /** + * Gets the default type url for DatabaseDump + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Service createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + namespace DatabaseDump { - /** Service updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** DatabaseType enum. */ + enum DatabaseType { + DATABASE_TYPE_UNSPECIFIED = 0, + MYSQL = 1 + } + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + UPDATING = 3, + FAILED = 4 + } + } - /** Service labels. */ - public labels: { [k: string]: string }; + /** Properties of a MetadataExport. */ + interface IMetadataExport { - /** Service network. */ - public network: string; + /** MetadataExport destinationGcsUri */ + destinationGcsUri?: (string|null); - /** Service endpointUri. */ - public endpointUri: string; + /** MetadataExport startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** Service port. */ - public port: number; + /** MetadataExport endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** Service state. */ - public state: (google.cloud.metastore.v1beta.Service.State|keyof typeof google.cloud.metastore.v1beta.Service.State); + /** MetadataExport state */ + state?: (google.cloud.metastore.v1beta.MetadataExport.State|keyof typeof google.cloud.metastore.v1beta.MetadataExport.State|null); - /** Service stateMessage. */ - public stateMessage: string; + /** MetadataExport databaseDumpType */ + databaseDumpType?: (google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|null); + } - /** Service artifactGcsUri. */ - public artifactGcsUri: string; + /** Represents a MetadataExport. */ + class MetadataExport implements IMetadataExport { - /** Service tier. */ - public tier: (google.cloud.metastore.v1beta.Service.Tier|keyof typeof google.cloud.metastore.v1beta.Service.Tier); + /** + * Constructs a new MetadataExport. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1beta.IMetadataExport); - /** Service metadataIntegration. */ - public metadataIntegration?: (google.cloud.metastore.v1beta.IMetadataIntegration|null); + /** MetadataExport destinationGcsUri. */ + public destinationGcsUri?: (string|null); - /** Service maintenanceWindow. */ - public maintenanceWindow?: (google.cloud.metastore.v1beta.IMaintenanceWindow|null); + /** MetadataExport startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** Service uid. */ - public uid: string; + /** MetadataExport endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** Service metadataManagementActivity. */ - public metadataManagementActivity?: (google.cloud.metastore.v1beta.IMetadataManagementActivity|null); + /** MetadataExport state. */ + public state: (google.cloud.metastore.v1beta.MetadataExport.State|keyof typeof google.cloud.metastore.v1beta.MetadataExport.State); - /** Service releaseChannel. */ - public releaseChannel: (google.cloud.metastore.v1beta.Service.ReleaseChannel|keyof typeof google.cloud.metastore.v1beta.Service.ReleaseChannel); + /** MetadataExport databaseDumpType. */ + public databaseDumpType: (google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1beta.DatabaseDumpSpec.Type); - /** Service metastoreConfig. */ - public metastoreConfig?: "hiveMetastoreConfig"; + /** MetadataExport destination. */ + public destination?: "destinationGcsUri"; /** - * Creates a new Service instance using the specified properties. + * Creates a new MetadataExport instance using the specified properties. * @param [properties] Properties to set - * @returns Service instance + * @returns MetadataExport instance */ - public static create(properties?: google.cloud.metastore.v1beta.IService): google.cloud.metastore.v1beta.Service; + public static create(properties?: google.cloud.metastore.v1beta.IMetadataExport): google.cloud.metastore.v1beta.MetadataExport; /** - * Encodes the specified Service message. Does not implicitly {@link google.cloud.metastore.v1beta.Service.verify|verify} messages. - * @param message Service message or plain object to encode + * Encodes the specified MetadataExport message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataExport.verify|verify} messages. + * @param message MetadataExport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IService, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IMetadataExport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Service.verify|verify} messages. - * @param message Service message or plain object to encode + * Encodes the specified MetadataExport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataExport.verify|verify} messages. + * @param message MetadataExport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IService, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IMetadataExport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Service message from the specified reader or buffer. + * Decodes a MetadataExport message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Service + * @returns MetadataExport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.Service; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.MetadataExport; /** - * Decodes a Service message from the specified reader or buffer, length delimited. + * Decodes a MetadataExport message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Service + * @returns MetadataExport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.Service; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.MetadataExport; /** - * Verifies a Service message. + * Verifies a MetadataExport message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Service message from a plain object. Also converts values to their respective internal types. + * Creates a MetadataExport message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Service + * @returns MetadataExport */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.Service; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.MetadataExport; /** - * Creates a plain object from a Service message. Also converts values to other types if specified. - * @param message Service + * Creates a plain object from a MetadataExport message. Also converts values to other types if specified. + * @param message MetadataExport * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.Service, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.MetadataExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Service to JSON. + * Converts this MetadataExport to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Service + * Gets the default type url for MetadataExport * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Service { + namespace MetadataExport { /** State enum. */ enum State { STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - SUSPENDING = 3, - SUSPENDED = 4, - UPDATING = 5, - DELETING = 6, - ERROR = 7 - } - - /** Tier enum. */ - enum Tier { - TIER_UNSPECIFIED = 0, - DEVELOPER = 1, - ENTERPRISE = 3 - } - - /** ReleaseChannel enum. */ - enum ReleaseChannel { - RELEASE_CHANNEL_UNSPECIFIED = 0, - CANARY = 1, - STABLE = 2 + RUNNING = 1, + SUCCEEDED = 2, + FAILED = 3, + CANCELLED = 4 } } - /** Properties of a MetadataIntegration. */ - interface IMetadataIntegration { - - /** MetadataIntegration dataCatalogConfig */ - dataCatalogConfig?: (google.cloud.metastore.v1beta.IDataCatalogConfig|null); - } - - /** Represents a MetadataIntegration. */ - class MetadataIntegration implements IMetadataIntegration { - - /** - * Constructs a new MetadataIntegration. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.metastore.v1beta.IMetadataIntegration); - - /** MetadataIntegration dataCatalogConfig. */ - public dataCatalogConfig?: (google.cloud.metastore.v1beta.IDataCatalogConfig|null); + /** Properties of a Backup. */ + interface IBackup { - /** - * Creates a new MetadataIntegration instance using the specified properties. - * @param [properties] Properties to set - * @returns MetadataIntegration instance - */ - public static create(properties?: google.cloud.metastore.v1beta.IMetadataIntegration): google.cloud.metastore.v1beta.MetadataIntegration; + /** Backup name */ + name?: (string|null); - /** - * Encodes the specified MetadataIntegration message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataIntegration.verify|verify} messages. - * @param message MetadataIntegration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.metastore.v1beta.IMetadataIntegration, writer?: $protobuf.Writer): $protobuf.Writer; + /** Backup createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified MetadataIntegration message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataIntegration.verify|verify} messages. - * @param message MetadataIntegration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IMetadataIntegration, writer?: $protobuf.Writer): $protobuf.Writer; + /** Backup endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes a MetadataIntegration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetadataIntegration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.MetadataIntegration; + /** Backup state */ + state?: (google.cloud.metastore.v1beta.Backup.State|keyof typeof google.cloud.metastore.v1beta.Backup.State|null); - /** - * Decodes a MetadataIntegration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetadataIntegration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.MetadataIntegration; + /** Backup serviceRevision */ + serviceRevision?: (google.cloud.metastore.v1beta.IService|null); - /** - * Verifies a MetadataIntegration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Backup description */ + description?: (string|null); - /** - * Creates a MetadataIntegration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetadataIntegration - */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.MetadataIntegration; + /** Backup restoringServices */ + restoringServices?: (string[]|null); + } - /** - * Creates a plain object from a MetadataIntegration message. Also converts values to other types if specified. - * @param message MetadataIntegration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.metastore.v1beta.MetadataIntegration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a Backup. */ + class Backup implements IBackup { /** - * Converts this MetadataIntegration to JSON. - * @returns JSON object + * Constructs a new Backup. + * @param [properties] Properties to set */ - public toJSON(): { [k: string]: any }; + constructor(properties?: google.cloud.metastore.v1beta.IBackup); - /** - * Gets the default type url for MetadataIntegration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Backup name. */ + public name: string; - /** Properties of a DataCatalogConfig. */ - interface IDataCatalogConfig { + /** Backup createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** DataCatalogConfig enabled */ - enabled?: (boolean|null); - } + /** Backup endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** Represents a DataCatalogConfig. */ - class DataCatalogConfig implements IDataCatalogConfig { + /** Backup state. */ + public state: (google.cloud.metastore.v1beta.Backup.State|keyof typeof google.cloud.metastore.v1beta.Backup.State); - /** - * Constructs a new DataCatalogConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.metastore.v1beta.IDataCatalogConfig); + /** Backup serviceRevision. */ + public serviceRevision?: (google.cloud.metastore.v1beta.IService|null); - /** DataCatalogConfig enabled. */ - public enabled: boolean; + /** Backup description. */ + public description: string; + + /** Backup restoringServices. */ + public restoringServices: string[]; /** - * Creates a new DataCatalogConfig instance using the specified properties. + * Creates a new Backup instance using the specified properties. * @param [properties] Properties to set - * @returns DataCatalogConfig instance + * @returns Backup instance */ - public static create(properties?: google.cloud.metastore.v1beta.IDataCatalogConfig): google.cloud.metastore.v1beta.DataCatalogConfig; + public static create(properties?: google.cloud.metastore.v1beta.IBackup): google.cloud.metastore.v1beta.Backup; /** - * Encodes the specified DataCatalogConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.DataCatalogConfig.verify|verify} messages. - * @param message DataCatalogConfig message or plain object to encode + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.metastore.v1beta.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IDataCatalogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DataCatalogConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DataCatalogConfig.verify|verify} messages. - * @param message DataCatalogConfig message or plain object to encode + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IDataCatalogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DataCatalogConfig message from the specified reader or buffer. + * Decodes a Backup message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DataCatalogConfig + * @returns Backup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.DataCatalogConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.Backup; /** - * Decodes a DataCatalogConfig message from the specified reader or buffer, length delimited. + * Decodes a Backup message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DataCatalogConfig + * @returns Backup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.DataCatalogConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.Backup; /** - * Verifies a DataCatalogConfig message. + * Verifies a Backup message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DataCatalogConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Backup message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DataCatalogConfig + * @returns Backup */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.DataCatalogConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.Backup; /** - * Creates a plain object from a DataCatalogConfig message. Also converts values to other types if specified. - * @param message DataCatalogConfig + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @param message Backup * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.DataCatalogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DataCatalogConfig to JSON. + * Converts this Backup to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DataCatalogConfig + * Gets the default type url for Backup * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MaintenanceWindow. */ - interface IMaintenanceWindow { + namespace Backup { - /** MaintenanceWindow hourOfDay */ - hourOfDay?: (google.protobuf.IInt32Value|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + DELETING = 2, + ACTIVE = 3, + FAILED = 4, + RESTORING = 5 + } + } - /** MaintenanceWindow dayOfWeek */ - dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + /** Properties of a Restore. */ + interface IRestore { + + /** Restore startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Restore endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Restore state */ + state?: (google.cloud.metastore.v1beta.Restore.State|keyof typeof google.cloud.metastore.v1beta.Restore.State|null); + + /** Restore backup */ + backup?: (string|null); + + /** Restore type */ + type?: (google.cloud.metastore.v1beta.Restore.RestoreType|keyof typeof google.cloud.metastore.v1beta.Restore.RestoreType|null); + + /** Restore details */ + details?: (string|null); } - /** Represents a MaintenanceWindow. */ - class MaintenanceWindow implements IMaintenanceWindow { + /** Represents a Restore. */ + class Restore implements IRestore { /** - * Constructs a new MaintenanceWindow. + * Constructs a new Restore. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IMaintenanceWindow); + constructor(properties?: google.cloud.metastore.v1beta.IRestore); - /** MaintenanceWindow hourOfDay. */ - public hourOfDay?: (google.protobuf.IInt32Value|null); + /** Restore startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** MaintenanceWindow dayOfWeek. */ - public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + /** Restore endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Restore state. */ + public state: (google.cloud.metastore.v1beta.Restore.State|keyof typeof google.cloud.metastore.v1beta.Restore.State); + + /** Restore backup. */ + public backup: string; + + /** Restore type. */ + public type: (google.cloud.metastore.v1beta.Restore.RestoreType|keyof typeof google.cloud.metastore.v1beta.Restore.RestoreType); + + /** Restore details. */ + public details: string; /** - * Creates a new MaintenanceWindow instance using the specified properties. + * Creates a new Restore instance using the specified properties. * @param [properties] Properties to set - * @returns MaintenanceWindow instance + * @returns Restore instance */ - public static create(properties?: google.cloud.metastore.v1beta.IMaintenanceWindow): google.cloud.metastore.v1beta.MaintenanceWindow; + public static create(properties?: google.cloud.metastore.v1beta.IRestore): google.cloud.metastore.v1beta.Restore; /** - * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.metastore.v1beta.MaintenanceWindow.verify|verify} messages. - * @param message MaintenanceWindow message or plain object to encode + * Encodes the specified Restore message. Does not implicitly {@link google.cloud.metastore.v1beta.Restore.verify|verify} messages. + * @param message Restore message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IRestore, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MaintenanceWindow.verify|verify} messages. - * @param message MaintenanceWindow message or plain object to encode + * Encodes the specified Restore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Restore.verify|verify} messages. + * @param message Restore message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IRestore, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MaintenanceWindow message from the specified reader or buffer. + * Decodes a Restore message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MaintenanceWindow + * @returns Restore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.MaintenanceWindow; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.Restore; /** - * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * Decodes a Restore message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MaintenanceWindow + * @returns Restore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.MaintenanceWindow; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.Restore; /** - * Verifies a MaintenanceWindow message. + * Verifies a Restore message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * Creates a Restore message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MaintenanceWindow + * @returns Restore */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.MaintenanceWindow; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.Restore; /** - * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. - * @param message MaintenanceWindow + * Creates a plain object from a Restore message. Also converts values to other types if specified. + * @param message Restore * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.MaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.Restore, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MaintenanceWindow to JSON. + * Converts this Restore to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MaintenanceWindow + * Gets the default type url for Restore * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a HiveMetastoreConfig. */ - interface IHiveMetastoreConfig { + namespace Restore { - /** HiveMetastoreConfig version */ - version?: (string|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + FAILED = 3, + CANCELLED = 4 + } - /** HiveMetastoreConfig configOverrides */ - configOverrides?: ({ [k: string]: string }|null); + /** RestoreType enum. */ + enum RestoreType { + RESTORE_TYPE_UNSPECIFIED = 0, + FULL = 1, + METADATA_ONLY = 2 + } + } - /** HiveMetastoreConfig kerberosConfig */ - kerberosConfig?: (google.cloud.metastore.v1beta.IKerberosConfig|null); + /** Properties of a ListServicesRequest. */ + interface IListServicesRequest { + + /** ListServicesRequest parent */ + parent?: (string|null); + + /** ListServicesRequest pageSize */ + pageSize?: (number|null); + + /** ListServicesRequest pageToken */ + pageToken?: (string|null); + + /** ListServicesRequest filter */ + filter?: (string|null); + + /** ListServicesRequest orderBy */ + orderBy?: (string|null); } - /** Represents a HiveMetastoreConfig. */ - class HiveMetastoreConfig implements IHiveMetastoreConfig { + /** Represents a ListServicesRequest. */ + class ListServicesRequest implements IListServicesRequest { /** - * Constructs a new HiveMetastoreConfig. + * Constructs a new ListServicesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IHiveMetastoreConfig); + constructor(properties?: google.cloud.metastore.v1beta.IListServicesRequest); - /** HiveMetastoreConfig version. */ - public version: string; + /** ListServicesRequest parent. */ + public parent: string; - /** HiveMetastoreConfig configOverrides. */ - public configOverrides: { [k: string]: string }; + /** ListServicesRequest pageSize. */ + public pageSize: number; - /** HiveMetastoreConfig kerberosConfig. */ - public kerberosConfig?: (google.cloud.metastore.v1beta.IKerberosConfig|null); + /** ListServicesRequest pageToken. */ + public pageToken: string; + + /** ListServicesRequest filter. */ + public filter: string; + + /** ListServicesRequest orderBy. */ + public orderBy: string; /** - * Creates a new HiveMetastoreConfig instance using the specified properties. + * Creates a new ListServicesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns HiveMetastoreConfig instance + * @returns ListServicesRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IHiveMetastoreConfig): google.cloud.metastore.v1beta.HiveMetastoreConfig; + public static create(properties?: google.cloud.metastore.v1beta.IListServicesRequest): google.cloud.metastore.v1beta.ListServicesRequest; /** - * Encodes the specified HiveMetastoreConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.HiveMetastoreConfig.verify|verify} messages. - * @param message HiveMetastoreConfig message or plain object to encode + * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesRequest.verify|verify} messages. + * @param message ListServicesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IHiveMetastoreConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HiveMetastoreConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.HiveMetastoreConfig.verify|verify} messages. - * @param message HiveMetastoreConfig message or plain object to encode + * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesRequest.verify|verify} messages. + * @param message ListServicesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IHiveMetastoreConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HiveMetastoreConfig message from the specified reader or buffer. + * Decodes a ListServicesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HiveMetastoreConfig + * @returns ListServicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.HiveMetastoreConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ListServicesRequest; /** - * Decodes a HiveMetastoreConfig message from the specified reader or buffer, length delimited. + * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HiveMetastoreConfig + * @returns ListServicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.HiveMetastoreConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ListServicesRequest; /** - * Verifies a HiveMetastoreConfig message. + * Verifies a ListServicesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HiveMetastoreConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HiveMetastoreConfig + * @returns ListServicesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.HiveMetastoreConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ListServicesRequest; /** - * Creates a plain object from a HiveMetastoreConfig message. Also converts values to other types if specified. - * @param message HiveMetastoreConfig + * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. + * @param message ListServicesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.HiveMetastoreConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.ListServicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HiveMetastoreConfig to JSON. + * Converts this ListServicesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for HiveMetastoreConfig + * Gets the default type url for ListServicesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a KerberosConfig. */ - interface IKerberosConfig { + /** Properties of a ListServicesResponse. */ + interface IListServicesResponse { - /** KerberosConfig keytab */ - keytab?: (google.cloud.metastore.v1beta.ISecret|null); + /** ListServicesResponse services */ + services?: (google.cloud.metastore.v1beta.IService[]|null); - /** KerberosConfig principal */ - principal?: (string|null); + /** ListServicesResponse nextPageToken */ + nextPageToken?: (string|null); - /** KerberosConfig krb5ConfigGcsUri */ - krb5ConfigGcsUri?: (string|null); + /** ListServicesResponse unreachable */ + unreachable?: (string[]|null); } - /** Represents a KerberosConfig. */ - class KerberosConfig implements IKerberosConfig { + /** Represents a ListServicesResponse. */ + class ListServicesResponse implements IListServicesResponse { /** - * Constructs a new KerberosConfig. + * Constructs a new ListServicesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IKerberosConfig); + constructor(properties?: google.cloud.metastore.v1beta.IListServicesResponse); - /** KerberosConfig keytab. */ - public keytab?: (google.cloud.metastore.v1beta.ISecret|null); + /** ListServicesResponse services. */ + public services: google.cloud.metastore.v1beta.IService[]; - /** KerberosConfig principal. */ - public principal: string; + /** ListServicesResponse nextPageToken. */ + public nextPageToken: string; - /** KerberosConfig krb5ConfigGcsUri. */ - public krb5ConfigGcsUri: string; + /** ListServicesResponse unreachable. */ + public unreachable: string[]; /** - * Creates a new KerberosConfig instance using the specified properties. + * Creates a new ListServicesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns KerberosConfig instance + * @returns ListServicesResponse instance */ - public static create(properties?: google.cloud.metastore.v1beta.IKerberosConfig): google.cloud.metastore.v1beta.KerberosConfig; + public static create(properties?: google.cloud.metastore.v1beta.IListServicesResponse): google.cloud.metastore.v1beta.ListServicesResponse; /** - * Encodes the specified KerberosConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.KerberosConfig.verify|verify} messages. - * @param message KerberosConfig message or plain object to encode + * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesResponse.verify|verify} messages. + * @param message ListServicesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IKerberosConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified KerberosConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.KerberosConfig.verify|verify} messages. - * @param message KerberosConfig message or plain object to encode + * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesResponse.verify|verify} messages. + * @param message ListServicesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IKerberosConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a KerberosConfig message from the specified reader or buffer. + * Decodes a ListServicesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns KerberosConfig + * @returns ListServicesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.KerberosConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ListServicesResponse; /** - * Decodes a KerberosConfig message from the specified reader or buffer, length delimited. + * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns KerberosConfig + * @returns ListServicesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.KerberosConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ListServicesResponse; /** - * Verifies a KerberosConfig message. + * Verifies a ListServicesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a KerberosConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns KerberosConfig + * @returns ListServicesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.KerberosConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ListServicesResponse; /** - * Creates a plain object from a KerberosConfig message. Also converts values to other types if specified. - * @param message KerberosConfig + * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. + * @param message ListServicesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.KerberosConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.ListServicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this KerberosConfig to JSON. + * Converts this ListServicesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for KerberosConfig + * Gets the default type url for ListServicesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Secret. */ - interface ISecret { + /** Properties of a GetServiceRequest. */ + interface IGetServiceRequest { - /** Secret cloudSecret */ - cloudSecret?: (string|null); + /** GetServiceRequest name */ + name?: (string|null); } - /** Represents a Secret. */ - class Secret implements ISecret { + /** Represents a GetServiceRequest. */ + class GetServiceRequest implements IGetServiceRequest { /** - * Constructs a new Secret. + * Constructs a new GetServiceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.ISecret); - - /** Secret cloudSecret. */ - public cloudSecret?: (string|null); + constructor(properties?: google.cloud.metastore.v1beta.IGetServiceRequest); - /** Secret value. */ - public value?: "cloudSecret"; + /** GetServiceRequest name. */ + public name: string; /** - * Creates a new Secret instance using the specified properties. + * Creates a new GetServiceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Secret instance + * @returns GetServiceRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.ISecret): google.cloud.metastore.v1beta.Secret; + public static create(properties?: google.cloud.metastore.v1beta.IGetServiceRequest): google.cloud.metastore.v1beta.GetServiceRequest; /** - * Encodes the specified Secret message. Does not implicitly {@link google.cloud.metastore.v1beta.Secret.verify|verify} messages. - * @param message Secret message or plain object to encode + * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.GetServiceRequest.verify|verify} messages. + * @param message GetServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.ISecret, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Secret message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Secret.verify|verify} messages. - * @param message Secret message or plain object to encode + * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.GetServiceRequest.verify|verify} messages. + * @param message GetServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.ISecret, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Secret message from the specified reader or buffer. + * Decodes a GetServiceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Secret + * @returns GetServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.Secret; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.GetServiceRequest; /** - * Decodes a Secret message from the specified reader or buffer, length delimited. + * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Secret + * @returns GetServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.Secret; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.GetServiceRequest; /** - * Verifies a Secret message. + * Verifies a GetServiceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Secret message from a plain object. Also converts values to their respective internal types. + * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Secret + * @returns GetServiceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.Secret; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.GetServiceRequest; /** - * Creates a plain object from a Secret message. Also converts values to other types if specified. - * @param message Secret + * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. + * @param message GetServiceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.Secret, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.GetServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Secret to JSON. + * Converts this GetServiceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Secret + * Gets the default type url for GetServiceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MetadataManagementActivity. */ - interface IMetadataManagementActivity { + /** Properties of a CreateServiceRequest. */ + interface ICreateServiceRequest { - /** MetadataManagementActivity metadataExports */ - metadataExports?: (google.cloud.metastore.v1beta.IMetadataExport[]|null); + /** CreateServiceRequest parent */ + parent?: (string|null); - /** MetadataManagementActivity restores */ - restores?: (google.cloud.metastore.v1beta.IRestore[]|null); + /** CreateServiceRequest serviceId */ + serviceId?: (string|null); + + /** CreateServiceRequest service */ + service?: (google.cloud.metastore.v1beta.IService|null); + + /** CreateServiceRequest requestId */ + requestId?: (string|null); } - /** Represents a MetadataManagementActivity. */ - class MetadataManagementActivity implements IMetadataManagementActivity { + /** Represents a CreateServiceRequest. */ + class CreateServiceRequest implements ICreateServiceRequest { /** - * Constructs a new MetadataManagementActivity. + * Constructs a new CreateServiceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IMetadataManagementActivity); + constructor(properties?: google.cloud.metastore.v1beta.ICreateServiceRequest); - /** MetadataManagementActivity metadataExports. */ - public metadataExports: google.cloud.metastore.v1beta.IMetadataExport[]; + /** CreateServiceRequest parent. */ + public parent: string; - /** MetadataManagementActivity restores. */ - public restores: google.cloud.metastore.v1beta.IRestore[]; + /** CreateServiceRequest serviceId. */ + public serviceId: string; + + /** CreateServiceRequest service. */ + public service?: (google.cloud.metastore.v1beta.IService|null); + + /** CreateServiceRequest requestId. */ + public requestId: string; /** - * Creates a new MetadataManagementActivity instance using the specified properties. + * Creates a new CreateServiceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns MetadataManagementActivity instance + * @returns CreateServiceRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IMetadataManagementActivity): google.cloud.metastore.v1beta.MetadataManagementActivity; + public static create(properties?: google.cloud.metastore.v1beta.ICreateServiceRequest): google.cloud.metastore.v1beta.CreateServiceRequest; /** - * Encodes the specified MetadataManagementActivity message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataManagementActivity.verify|verify} messages. - * @param message MetadataManagementActivity message or plain object to encode + * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.CreateServiceRequest.verify|verify} messages. + * @param message CreateServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IMetadataManagementActivity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetadataManagementActivity message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataManagementActivity.verify|verify} messages. - * @param message MetadataManagementActivity message or plain object to encode + * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.CreateServiceRequest.verify|verify} messages. + * @param message CreateServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IMetadataManagementActivity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetadataManagementActivity message from the specified reader or buffer. + * Decodes a CreateServiceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetadataManagementActivity + * @returns CreateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.MetadataManagementActivity; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.CreateServiceRequest; /** - * Decodes a MetadataManagementActivity message from the specified reader or buffer, length delimited. + * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetadataManagementActivity + * @returns CreateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.MetadataManagementActivity; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.CreateServiceRequest; /** - * Verifies a MetadataManagementActivity message. + * Verifies a CreateServiceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetadataManagementActivity message from a plain object. Also converts values to their respective internal types. + * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetadataManagementActivity + * @returns CreateServiceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.MetadataManagementActivity; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.CreateServiceRequest; /** - * Creates a plain object from a MetadataManagementActivity message. Also converts values to other types if specified. - * @param message MetadataManagementActivity + * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. + * @param message CreateServiceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.MetadataManagementActivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.CreateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetadataManagementActivity to JSON. + * Converts this CreateServiceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MetadataManagementActivity + * Gets the default type url for CreateServiceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MetadataImport. */ - interface IMetadataImport { - - /** MetadataImport databaseDump */ - databaseDump?: (google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump|null); - - /** MetadataImport name */ - name?: (string|null); - - /** MetadataImport description */ - description?: (string|null); + /** Properties of an UpdateServiceRequest. */ + interface IUpdateServiceRequest { - /** MetadataImport createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** UpdateServiceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** MetadataImport updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** UpdateServiceRequest service */ + service?: (google.cloud.metastore.v1beta.IService|null); - /** MetadataImport state */ - state?: (google.cloud.metastore.v1beta.MetadataImport.State|keyof typeof google.cloud.metastore.v1beta.MetadataImport.State|null); + /** UpdateServiceRequest requestId */ + requestId?: (string|null); } - /** Represents a MetadataImport. */ - class MetadataImport implements IMetadataImport { + /** Represents an UpdateServiceRequest. */ + class UpdateServiceRequest implements IUpdateServiceRequest { /** - * Constructs a new MetadataImport. + * Constructs a new UpdateServiceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IMetadataImport); - - /** MetadataImport databaseDump. */ - public databaseDump?: (google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump|null); - - /** MetadataImport name. */ - public name: string; - - /** MetadataImport description. */ - public description: string; - - /** MetadataImport createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.metastore.v1beta.IUpdateServiceRequest); - /** MetadataImport updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** UpdateServiceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** MetadataImport state. */ - public state: (google.cloud.metastore.v1beta.MetadataImport.State|keyof typeof google.cloud.metastore.v1beta.MetadataImport.State); + /** UpdateServiceRequest service. */ + public service?: (google.cloud.metastore.v1beta.IService|null); - /** MetadataImport metadata. */ - public metadata?: "databaseDump"; + /** UpdateServiceRequest requestId. */ + public requestId: string; /** - * Creates a new MetadataImport instance using the specified properties. + * Creates a new UpdateServiceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns MetadataImport instance + * @returns UpdateServiceRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IMetadataImport): google.cloud.metastore.v1beta.MetadataImport; + public static create(properties?: google.cloud.metastore.v1beta.IUpdateServiceRequest): google.cloud.metastore.v1beta.UpdateServiceRequest; /** - * Encodes the specified MetadataImport message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.verify|verify} messages. - * @param message MetadataImport message or plain object to encode + * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateServiceRequest.verify|verify} messages. + * @param message UpdateServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IMetadataImport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetadataImport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.verify|verify} messages. - * @param message MetadataImport message or plain object to encode + * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateServiceRequest.verify|verify} messages. + * @param message UpdateServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IMetadataImport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetadataImport message from the specified reader or buffer. + * Decodes an UpdateServiceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetadataImport + * @returns UpdateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.MetadataImport; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.UpdateServiceRequest; /** - * Decodes a MetadataImport message from the specified reader or buffer, length delimited. + * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetadataImport + * @returns UpdateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.MetadataImport; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.UpdateServiceRequest; /** - * Verifies a MetadataImport message. + * Verifies an UpdateServiceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetadataImport message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetadataImport + * @returns UpdateServiceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.MetadataImport; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.UpdateServiceRequest; /** - * Creates a plain object from a MetadataImport message. Also converts values to other types if specified. - * @param message MetadataImport + * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. + * @param message UpdateServiceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.MetadataImport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.UpdateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetadataImport to JSON. + * Converts this UpdateServiceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MetadataImport + * Gets the default type url for UpdateServiceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace MetadataImport { - - /** Properties of a DatabaseDump. */ - interface IDatabaseDump { - - /** DatabaseDump databaseType */ - databaseType?: (google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType|keyof typeof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType|null); - - /** DatabaseDump gcsUri */ - gcsUri?: (string|null); - - /** DatabaseDump sourceDatabase */ - sourceDatabase?: (string|null); - - /** DatabaseDump type */ - type?: (google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|null); - } - - /** Represents a DatabaseDump. */ - class DatabaseDump implements IDatabaseDump { - - /** - * Constructs a new DatabaseDump. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump); - - /** DatabaseDump databaseType. */ - public databaseType: (google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType|keyof typeof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType); + /** Properties of a DeleteServiceRequest. */ + interface IDeleteServiceRequest { - /** DatabaseDump gcsUri. */ - public gcsUri: string; + /** DeleteServiceRequest name */ + name?: (string|null); - /** DatabaseDump sourceDatabase. */ - public sourceDatabase: string; + /** DeleteServiceRequest requestId */ + requestId?: (string|null); + } - /** DatabaseDump type. */ - public type: (google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1beta.DatabaseDumpSpec.Type); + /** Represents a DeleteServiceRequest. */ + class DeleteServiceRequest implements IDeleteServiceRequest { - /** - * Creates a new DatabaseDump instance using the specified properties. - * @param [properties] Properties to set - * @returns DatabaseDump instance - */ - public static create(properties?: google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump): google.cloud.metastore.v1beta.MetadataImport.DatabaseDump; + /** + * Constructs a new DeleteServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1beta.IDeleteServiceRequest); - /** - * Encodes the specified DatabaseDump message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.verify|verify} messages. - * @param message DatabaseDump message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump, writer?: $protobuf.Writer): $protobuf.Writer; + /** DeleteServiceRequest name. */ + public name: string; - /** - * Encodes the specified DatabaseDump message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.verify|verify} messages. - * @param message DatabaseDump message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump, writer?: $protobuf.Writer): $protobuf.Writer; + /** DeleteServiceRequest requestId. */ + public requestId: string; - /** - * Decodes a DatabaseDump message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatabaseDump - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.MetadataImport.DatabaseDump; + /** + * Creates a new DeleteServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteServiceRequest instance + */ + public static create(properties?: google.cloud.metastore.v1beta.IDeleteServiceRequest): google.cloud.metastore.v1beta.DeleteServiceRequest; - /** - * Decodes a DatabaseDump message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatabaseDump - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.MetadataImport.DatabaseDump; + /** + * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteServiceRequest.verify|verify} messages. + * @param message DeleteServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1beta.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a DatabaseDump message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteServiceRequest.verify|verify} messages. + * @param message DeleteServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1beta.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a DatabaseDump message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatabaseDump - */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.MetadataImport.DatabaseDump; + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.DeleteServiceRequest; - /** - * Creates a plain object from a DatabaseDump message. Also converts values to other types if specified. - * @param message DatabaseDump - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.metastore.v1beta.MetadataImport.DatabaseDump, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.DeleteServiceRequest; - /** - * Converts this DatabaseDump to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies a DeleteServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Gets the default type url for DatabaseDump - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.DeleteServiceRequest; - namespace DatabaseDump { + /** + * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. + * @param message DeleteServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1beta.DeleteServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** DatabaseType enum. */ - enum DatabaseType { - DATABASE_TYPE_UNSPECIFIED = 0, - MYSQL = 1 - } - } + /** + * Converts this DeleteServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - SUCCEEDED = 2, - UPDATING = 3, - FAILED = 4 - } + /** + * Gets the default type url for DeleteServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MetadataExport. */ - interface IMetadataExport { + /** Properties of a ListMetadataImportsRequest. */ + interface IListMetadataImportsRequest { - /** MetadataExport destinationGcsUri */ - destinationGcsUri?: (string|null); + /** ListMetadataImportsRequest parent */ + parent?: (string|null); - /** MetadataExport startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** ListMetadataImportsRequest pageSize */ + pageSize?: (number|null); - /** MetadataExport endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** ListMetadataImportsRequest pageToken */ + pageToken?: (string|null); - /** MetadataExport state */ - state?: (google.cloud.metastore.v1beta.MetadataExport.State|keyof typeof google.cloud.metastore.v1beta.MetadataExport.State|null); + /** ListMetadataImportsRequest filter */ + filter?: (string|null); - /** MetadataExport databaseDumpType */ - databaseDumpType?: (google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|null); + /** ListMetadataImportsRequest orderBy */ + orderBy?: (string|null); } - /** Represents a MetadataExport. */ - class MetadataExport implements IMetadataExport { + /** Represents a ListMetadataImportsRequest. */ + class ListMetadataImportsRequest implements IListMetadataImportsRequest { /** - * Constructs a new MetadataExport. + * Constructs a new ListMetadataImportsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IMetadataExport); - - /** MetadataExport destinationGcsUri. */ - public destinationGcsUri?: (string|null); + constructor(properties?: google.cloud.metastore.v1beta.IListMetadataImportsRequest); - /** MetadataExport startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** ListMetadataImportsRequest parent. */ + public parent: string; - /** MetadataExport endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** ListMetadataImportsRequest pageSize. */ + public pageSize: number; - /** MetadataExport state. */ - public state: (google.cloud.metastore.v1beta.MetadataExport.State|keyof typeof google.cloud.metastore.v1beta.MetadataExport.State); + /** ListMetadataImportsRequest pageToken. */ + public pageToken: string; - /** MetadataExport databaseDumpType. */ - public databaseDumpType: (google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1beta.DatabaseDumpSpec.Type); + /** ListMetadataImportsRequest filter. */ + public filter: string; - /** MetadataExport destination. */ - public destination?: "destinationGcsUri"; + /** ListMetadataImportsRequest orderBy. */ + public orderBy: string; /** - * Creates a new MetadataExport instance using the specified properties. + * Creates a new ListMetadataImportsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns MetadataExport instance + * @returns ListMetadataImportsRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IMetadataExport): google.cloud.metastore.v1beta.MetadataExport; + public static create(properties?: google.cloud.metastore.v1beta.IListMetadataImportsRequest): google.cloud.metastore.v1beta.ListMetadataImportsRequest; /** - * Encodes the specified MetadataExport message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataExport.verify|verify} messages. - * @param message MetadataExport message or plain object to encode + * Encodes the specified ListMetadataImportsRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsRequest.verify|verify} messages. + * @param message ListMetadataImportsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IMetadataExport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IListMetadataImportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetadataExport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataExport.verify|verify} messages. - * @param message MetadataExport message or plain object to encode + * Encodes the specified ListMetadataImportsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsRequest.verify|verify} messages. + * @param message ListMetadataImportsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IMetadataExport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IListMetadataImportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetadataExport message from the specified reader or buffer. + * Decodes a ListMetadataImportsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetadataExport + * @returns ListMetadataImportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.MetadataExport; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ListMetadataImportsRequest; /** - * Decodes a MetadataExport message from the specified reader or buffer, length delimited. + * Decodes a ListMetadataImportsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetadataExport + * @returns ListMetadataImportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.MetadataExport; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ListMetadataImportsRequest; /** - * Verifies a MetadataExport message. + * Verifies a ListMetadataImportsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetadataExport message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetadataImportsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetadataExport + * @returns ListMetadataImportsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.MetadataExport; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ListMetadataImportsRequest; /** - * Creates a plain object from a MetadataExport message. Also converts values to other types if specified. - * @param message MetadataExport + * Creates a plain object from a ListMetadataImportsRequest message. Also converts values to other types if specified. + * @param message ListMetadataImportsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.MetadataExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.ListMetadataImportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetadataExport to JSON. + * Converts this ListMetadataImportsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MetadataExport + * Gets the default type url for ListMetadataImportsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace MetadataExport { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - SUCCEEDED = 2, - FAILED = 3, - CANCELLED = 4 - } - } - - /** Properties of a Backup. */ - interface IBackup { - - /** Backup name */ - name?: (string|null); - - /** Backup createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Backup endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** Properties of a ListMetadataImportsResponse. */ + interface IListMetadataImportsResponse { - /** Backup state */ - state?: (google.cloud.metastore.v1beta.Backup.State|keyof typeof google.cloud.metastore.v1beta.Backup.State|null); + /** ListMetadataImportsResponse metadataImports */ + metadataImports?: (google.cloud.metastore.v1beta.IMetadataImport[]|null); - /** Backup serviceRevision */ - serviceRevision?: (google.cloud.metastore.v1beta.IService|null); + /** ListMetadataImportsResponse nextPageToken */ + nextPageToken?: (string|null); - /** Backup description */ - description?: (string|null); + /** ListMetadataImportsResponse unreachable */ + unreachable?: (string[]|null); } - /** Represents a Backup. */ - class Backup implements IBackup { + /** Represents a ListMetadataImportsResponse. */ + class ListMetadataImportsResponse implements IListMetadataImportsResponse { /** - * Constructs a new Backup. + * Constructs a new ListMetadataImportsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IBackup); - - /** Backup name. */ - public name: string; - - /** Backup createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Backup endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.metastore.v1beta.IListMetadataImportsResponse); - /** Backup state. */ - public state: (google.cloud.metastore.v1beta.Backup.State|keyof typeof google.cloud.metastore.v1beta.Backup.State); + /** ListMetadataImportsResponse metadataImports. */ + public metadataImports: google.cloud.metastore.v1beta.IMetadataImport[]; - /** Backup serviceRevision. */ - public serviceRevision?: (google.cloud.metastore.v1beta.IService|null); + /** ListMetadataImportsResponse nextPageToken. */ + public nextPageToken: string; - /** Backup description. */ - public description: string; + /** ListMetadataImportsResponse unreachable. */ + public unreachable: string[]; /** - * Creates a new Backup instance using the specified properties. + * Creates a new ListMetadataImportsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Backup instance + * @returns ListMetadataImportsResponse instance */ - public static create(properties?: google.cloud.metastore.v1beta.IBackup): google.cloud.metastore.v1beta.Backup; + public static create(properties?: google.cloud.metastore.v1beta.IListMetadataImportsResponse): google.cloud.metastore.v1beta.ListMetadataImportsResponse; /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.metastore.v1beta.Backup.verify|verify} messages. - * @param message Backup message or plain object to encode + * Encodes the specified ListMetadataImportsResponse message. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsResponse.verify|verify} messages. + * @param message ListMetadataImportsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IListMetadataImportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Backup.verify|verify} messages. - * @param message Backup message or plain object to encode + * Encodes the specified ListMetadataImportsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsResponse.verify|verify} messages. + * @param message ListMetadataImportsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IListMetadataImportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Backup message from the specified reader or buffer. + * Decodes a ListMetadataImportsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Backup + * @returns ListMetadataImportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.Backup; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ListMetadataImportsResponse; /** - * Decodes a Backup message from the specified reader or buffer, length delimited. + * Decodes a ListMetadataImportsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Backup + * @returns ListMetadataImportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.Backup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ListMetadataImportsResponse; /** - * Verifies a Backup message. + * Verifies a ListMetadataImportsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetadataImportsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Backup + * @returns ListMetadataImportsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.Backup; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ListMetadataImportsResponse; /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. - * @param message Backup + * Creates a plain object from a ListMetadataImportsResponse message. Also converts values to other types if specified. + * @param message ListMetadataImportsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.ListMetadataImportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Backup to JSON. + * Converts this ListMetadataImportsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Backup + * Gets the default type url for ListMetadataImportsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Backup { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - DELETING = 2, - ACTIVE = 3, - FAILED = 4 - } - } - - /** Properties of a Restore. */ - interface IRestore { - - /** Restore startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** Restore endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** Restore state */ - state?: (google.cloud.metastore.v1beta.Restore.State|keyof typeof google.cloud.metastore.v1beta.Restore.State|null); - - /** Restore backup */ - backup?: (string|null); - - /** Restore type */ - type?: (google.cloud.metastore.v1beta.Restore.RestoreType|keyof typeof google.cloud.metastore.v1beta.Restore.RestoreType|null); + /** Properties of a GetMetadataImportRequest. */ + interface IGetMetadataImportRequest { - /** Restore details */ - details?: (string|null); + /** GetMetadataImportRequest name */ + name?: (string|null); } - /** Represents a Restore. */ - class Restore implements IRestore { + /** Represents a GetMetadataImportRequest. */ + class GetMetadataImportRequest implements IGetMetadataImportRequest { /** - * Constructs a new Restore. + * Constructs a new GetMetadataImportRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IRestore); - - /** Restore startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** Restore endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** Restore state. */ - public state: (google.cloud.metastore.v1beta.Restore.State|keyof typeof google.cloud.metastore.v1beta.Restore.State); - - /** Restore backup. */ - public backup: string; - - /** Restore type. */ - public type: (google.cloud.metastore.v1beta.Restore.RestoreType|keyof typeof google.cloud.metastore.v1beta.Restore.RestoreType); + constructor(properties?: google.cloud.metastore.v1beta.IGetMetadataImportRequest); - /** Restore details. */ - public details: string; + /** GetMetadataImportRequest name. */ + public name: string; /** - * Creates a new Restore instance using the specified properties. + * Creates a new GetMetadataImportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Restore instance + * @returns GetMetadataImportRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IRestore): google.cloud.metastore.v1beta.Restore; + public static create(properties?: google.cloud.metastore.v1beta.IGetMetadataImportRequest): google.cloud.metastore.v1beta.GetMetadataImportRequest; /** - * Encodes the specified Restore message. Does not implicitly {@link google.cloud.metastore.v1beta.Restore.verify|verify} messages. - * @param message Restore message or plain object to encode + * Encodes the specified GetMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.GetMetadataImportRequest.verify|verify} messages. + * @param message GetMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IRestore, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IGetMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Restore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Restore.verify|verify} messages. - * @param message Restore message or plain object to encode + * Encodes the specified GetMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.GetMetadataImportRequest.verify|verify} messages. + * @param message GetMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IRestore, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IGetMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Restore message from the specified reader or buffer. + * Decodes a GetMetadataImportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Restore + * @returns GetMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.Restore; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.GetMetadataImportRequest; /** - * Decodes a Restore message from the specified reader or buffer, length delimited. + * Decodes a GetMetadataImportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Restore + * @returns GetMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.Restore; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.GetMetadataImportRequest; /** - * Verifies a Restore message. + * Verifies a GetMetadataImportRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Restore message from a plain object. Also converts values to their respective internal types. + * Creates a GetMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Restore + * @returns GetMetadataImportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.Restore; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.GetMetadataImportRequest; /** - * Creates a plain object from a Restore message. Also converts values to other types if specified. - * @param message Restore + * Creates a plain object from a GetMetadataImportRequest message. Also converts values to other types if specified. + * @param message GetMetadataImportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.Restore, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.GetMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Restore to JSON. + * Converts this GetMetadataImportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Restore + * Gets the default type url for GetMetadataImportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Restore { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - SUCCEEDED = 2, - FAILED = 3, - CANCELLED = 4 - } - - /** RestoreType enum. */ - enum RestoreType { - RESTORE_TYPE_UNSPECIFIED = 0, - FULL = 1, - METADATA_ONLY = 2 - } - } - - /** Properties of a ListServicesRequest. */ - interface IListServicesRequest { + /** Properties of a CreateMetadataImportRequest. */ + interface ICreateMetadataImportRequest { - /** ListServicesRequest parent */ + /** CreateMetadataImportRequest parent */ parent?: (string|null); - /** ListServicesRequest pageSize */ - pageSize?: (number|null); - - /** ListServicesRequest pageToken */ - pageToken?: (string|null); + /** CreateMetadataImportRequest metadataImportId */ + metadataImportId?: (string|null); - /** ListServicesRequest filter */ - filter?: (string|null); + /** CreateMetadataImportRequest metadataImport */ + metadataImport?: (google.cloud.metastore.v1beta.IMetadataImport|null); - /** ListServicesRequest orderBy */ - orderBy?: (string|null); + /** CreateMetadataImportRequest requestId */ + requestId?: (string|null); } - /** Represents a ListServicesRequest. */ - class ListServicesRequest implements IListServicesRequest { + /** Represents a CreateMetadataImportRequest. */ + class CreateMetadataImportRequest implements ICreateMetadataImportRequest { /** - * Constructs a new ListServicesRequest. + * Constructs a new CreateMetadataImportRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IListServicesRequest); + constructor(properties?: google.cloud.metastore.v1beta.ICreateMetadataImportRequest); - /** ListServicesRequest parent. */ + /** CreateMetadataImportRequest parent. */ public parent: string; - /** ListServicesRequest pageSize. */ - public pageSize: number; - - /** ListServicesRequest pageToken. */ - public pageToken: string; + /** CreateMetadataImportRequest metadataImportId. */ + public metadataImportId: string; - /** ListServicesRequest filter. */ - public filter: string; + /** CreateMetadataImportRequest metadataImport. */ + public metadataImport?: (google.cloud.metastore.v1beta.IMetadataImport|null); - /** ListServicesRequest orderBy. */ - public orderBy: string; + /** CreateMetadataImportRequest requestId. */ + public requestId: string; /** - * Creates a new ListServicesRequest instance using the specified properties. + * Creates a new CreateMetadataImportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListServicesRequest instance + * @returns CreateMetadataImportRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IListServicesRequest): google.cloud.metastore.v1beta.ListServicesRequest; + public static create(properties?: google.cloud.metastore.v1beta.ICreateMetadataImportRequest): google.cloud.metastore.v1beta.CreateMetadataImportRequest; /** - * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesRequest.verify|verify} messages. - * @param message ListServicesRequest message or plain object to encode + * Encodes the specified CreateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.CreateMetadataImportRequest.verify|verify} messages. + * @param message CreateMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.ICreateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesRequest.verify|verify} messages. - * @param message ListServicesRequest message or plain object to encode + * Encodes the specified CreateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.CreateMetadataImportRequest.verify|verify} messages. + * @param message CreateMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.ICreateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListServicesRequest message from the specified reader or buffer. + * Decodes a CreateMetadataImportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListServicesRequest + * @returns CreateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ListServicesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.CreateMetadataImportRequest; /** - * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateMetadataImportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListServicesRequest + * @returns CreateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ListServicesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.CreateMetadataImportRequest; /** - * Verifies a ListServicesRequest message. + * Verifies a CreateMetadataImportRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListServicesRequest + * @returns CreateMetadataImportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ListServicesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.CreateMetadataImportRequest; /** - * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. - * @param message ListServicesRequest + * Creates a plain object from a CreateMetadataImportRequest message. Also converts values to other types if specified. + * @param message CreateMetadataImportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.ListServicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.CreateMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListServicesRequest to JSON. + * Converts this CreateMetadataImportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListServicesRequest + * Gets the default type url for CreateMetadataImportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListServicesResponse. */ - interface IListServicesResponse { + /** Properties of an UpdateMetadataImportRequest. */ + interface IUpdateMetadataImportRequest { - /** ListServicesResponse services */ - services?: (google.cloud.metastore.v1beta.IService[]|null); + /** UpdateMetadataImportRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** ListServicesResponse nextPageToken */ - nextPageToken?: (string|null); + /** UpdateMetadataImportRequest metadataImport */ + metadataImport?: (google.cloud.metastore.v1beta.IMetadataImport|null); - /** ListServicesResponse unreachable */ - unreachable?: (string[]|null); + /** UpdateMetadataImportRequest requestId */ + requestId?: (string|null); } - /** Represents a ListServicesResponse. */ - class ListServicesResponse implements IListServicesResponse { + /** Represents an UpdateMetadataImportRequest. */ + class UpdateMetadataImportRequest implements IUpdateMetadataImportRequest { /** - * Constructs a new ListServicesResponse. + * Constructs a new UpdateMetadataImportRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IListServicesResponse); + constructor(properties?: google.cloud.metastore.v1beta.IUpdateMetadataImportRequest); - /** ListServicesResponse services. */ - public services: google.cloud.metastore.v1beta.IService[]; + /** UpdateMetadataImportRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** ListServicesResponse nextPageToken. */ - public nextPageToken: string; + /** UpdateMetadataImportRequest metadataImport. */ + public metadataImport?: (google.cloud.metastore.v1beta.IMetadataImport|null); - /** ListServicesResponse unreachable. */ - public unreachable: string[]; + /** UpdateMetadataImportRequest requestId. */ + public requestId: string; /** - * Creates a new ListServicesResponse instance using the specified properties. + * Creates a new UpdateMetadataImportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListServicesResponse instance + * @returns UpdateMetadataImportRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IListServicesResponse): google.cloud.metastore.v1beta.ListServicesResponse; + public static create(properties?: google.cloud.metastore.v1beta.IUpdateMetadataImportRequest): google.cloud.metastore.v1beta.UpdateMetadataImportRequest; /** - * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesResponse.verify|verify} messages. - * @param message ListServicesResponse message or plain object to encode + * Encodes the specified UpdateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateMetadataImportRequest.verify|verify} messages. + * @param message UpdateMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IUpdateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesResponse.verify|verify} messages. - * @param message ListServicesResponse message or plain object to encode + * Encodes the specified UpdateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateMetadataImportRequest.verify|verify} messages. + * @param message UpdateMetadataImportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IUpdateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListServicesResponse message from the specified reader or buffer. + * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListServicesResponse + * @returns UpdateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ListServicesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.UpdateMetadataImportRequest; /** - * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListServicesResponse + * @returns UpdateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ListServicesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.UpdateMetadataImportRequest; /** - * Verifies a ListServicesResponse message. + * Verifies an UpdateMetadataImportRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListServicesResponse + * @returns UpdateMetadataImportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ListServicesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.UpdateMetadataImportRequest; /** - * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. - * @param message ListServicesResponse + * Creates a plain object from an UpdateMetadataImportRequest message. Also converts values to other types if specified. + * @param message UpdateMetadataImportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.ListServicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.UpdateMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListServicesResponse to JSON. + * Converts this UpdateMetadataImportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListServicesResponse + * Gets the default type url for UpdateMetadataImportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetServiceRequest. */ - interface IGetServiceRequest { + /** Properties of a ListBackupsRequest. */ + interface IListBackupsRequest { - /** GetServiceRequest name */ - name?: (string|null); + /** ListBackupsRequest parent */ + parent?: (string|null); + + /** ListBackupsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupsRequest filter */ + filter?: (string|null); + + /** ListBackupsRequest orderBy */ + orderBy?: (string|null); } - /** Represents a GetServiceRequest. */ - class GetServiceRequest implements IGetServiceRequest { + /** Represents a ListBackupsRequest. */ + class ListBackupsRequest implements IListBackupsRequest { /** - * Constructs a new GetServiceRequest. + * Constructs a new ListBackupsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IGetServiceRequest); + constructor(properties?: google.cloud.metastore.v1beta.IListBackupsRequest); - /** GetServiceRequest name. */ - public name: string; + /** ListBackupsRequest parent. */ + public parent: string; + + /** ListBackupsRequest pageSize. */ + public pageSize: number; + + /** ListBackupsRequest pageToken. */ + public pageToken: string; + + /** ListBackupsRequest filter. */ + public filter: string; + + /** ListBackupsRequest orderBy. */ + public orderBy: string; /** - * Creates a new GetServiceRequest instance using the specified properties. + * Creates a new ListBackupsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetServiceRequest instance + * @returns ListBackupsRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IGetServiceRequest): google.cloud.metastore.v1beta.GetServiceRequest; + public static create(properties?: google.cloud.metastore.v1beta.IListBackupsRequest): google.cloud.metastore.v1beta.ListBackupsRequest; /** - * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.GetServiceRequest.verify|verify} messages. - * @param message GetServiceRequest message or plain object to encode + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.GetServiceRequest.verify|verify} messages. - * @param message GetServiceRequest message or plain object to encode + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetServiceRequest message from the specified reader or buffer. + * Decodes a ListBackupsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetServiceRequest + * @returns ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.GetServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ListBackupsRequest; /** - * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetServiceRequest + * @returns ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.GetServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ListBackupsRequest; /** - * Verifies a GetServiceRequest message. + * Verifies a ListBackupsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetServiceRequest + * @returns ListBackupsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.GetServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ListBackupsRequest; /** - * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. - * @param message GetServiceRequest + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @param message ListBackupsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.GetServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetServiceRequest to JSON. + * Converts this ListBackupsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetServiceRequest + * Gets the default type url for ListBackupsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateServiceRequest. */ - interface ICreateServiceRequest { - - /** CreateServiceRequest parent */ - parent?: (string|null); + /** Properties of a ListBackupsResponse. */ + interface IListBackupsResponse { - /** CreateServiceRequest serviceId */ - serviceId?: (string|null); + /** ListBackupsResponse backups */ + backups?: (google.cloud.metastore.v1beta.IBackup[]|null); - /** CreateServiceRequest service */ - service?: (google.cloud.metastore.v1beta.IService|null); + /** ListBackupsResponse nextPageToken */ + nextPageToken?: (string|null); - /** CreateServiceRequest requestId */ - requestId?: (string|null); + /** ListBackupsResponse unreachable */ + unreachable?: (string[]|null); } - /** Represents a CreateServiceRequest. */ - class CreateServiceRequest implements ICreateServiceRequest { + /** Represents a ListBackupsResponse. */ + class ListBackupsResponse implements IListBackupsResponse { /** - * Constructs a new CreateServiceRequest. + * Constructs a new ListBackupsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.ICreateServiceRequest); - - /** CreateServiceRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.metastore.v1beta.IListBackupsResponse); - /** CreateServiceRequest serviceId. */ - public serviceId: string; + /** ListBackupsResponse backups. */ + public backups: google.cloud.metastore.v1beta.IBackup[]; - /** CreateServiceRequest service. */ - public service?: (google.cloud.metastore.v1beta.IService|null); + /** ListBackupsResponse nextPageToken. */ + public nextPageToken: string; - /** CreateServiceRequest requestId. */ - public requestId: string; + /** ListBackupsResponse unreachable. */ + public unreachable: string[]; /** - * Creates a new CreateServiceRequest instance using the specified properties. + * Creates a new ListBackupsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateServiceRequest instance + * @returns ListBackupsResponse instance */ - public static create(properties?: google.cloud.metastore.v1beta.ICreateServiceRequest): google.cloud.metastore.v1beta.CreateServiceRequest; + public static create(properties?: google.cloud.metastore.v1beta.IListBackupsResponse): google.cloud.metastore.v1beta.ListBackupsResponse; /** - * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.CreateServiceRequest.verify|verify} messages. - * @param message CreateServiceRequest message or plain object to encode + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.CreateServiceRequest.verify|verify} messages. - * @param message CreateServiceRequest message or plain object to encode + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer. + * Decodes a ListBackupsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateServiceRequest + * @returns ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.CreateServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ListBackupsResponse; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateServiceRequest + * @returns ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.CreateServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ListBackupsResponse; /** - * Verifies a CreateServiceRequest message. + * Verifies a ListBackupsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateServiceRequest + * @returns ListBackupsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.CreateServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ListBackupsResponse; /** - * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. - * @param message CreateServiceRequest + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * @param message ListBackupsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.CreateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateServiceRequest to JSON. + * Converts this ListBackupsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateServiceRequest + * Gets the default type url for ListBackupsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateServiceRequest. */ - interface IUpdateServiceRequest { - - /** UpdateServiceRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateServiceRequest service */ - service?: (google.cloud.metastore.v1beta.IService|null); + /** Properties of a GetBackupRequest. */ + interface IGetBackupRequest { - /** UpdateServiceRequest requestId */ - requestId?: (string|null); + /** GetBackupRequest name */ + name?: (string|null); } - /** Represents an UpdateServiceRequest. */ - class UpdateServiceRequest implements IUpdateServiceRequest { + /** Represents a GetBackupRequest. */ + class GetBackupRequest implements IGetBackupRequest { /** - * Constructs a new UpdateServiceRequest. + * Constructs a new GetBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IUpdateServiceRequest); - - /** UpdateServiceRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateServiceRequest service. */ - public service?: (google.cloud.metastore.v1beta.IService|null); + constructor(properties?: google.cloud.metastore.v1beta.IGetBackupRequest); - /** UpdateServiceRequest requestId. */ - public requestId: string; + /** GetBackupRequest name. */ + public name: string; /** - * Creates a new UpdateServiceRequest instance using the specified properties. + * Creates a new GetBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateServiceRequest instance + * @returns GetBackupRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IUpdateServiceRequest): google.cloud.metastore.v1beta.UpdateServiceRequest; + public static create(properties?: google.cloud.metastore.v1beta.IGetBackupRequest): google.cloud.metastore.v1beta.GetBackupRequest; /** - * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateServiceRequest.verify|verify} messages. - * @param message UpdateServiceRequest message or plain object to encode + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateServiceRequest.verify|verify} messages. - * @param message UpdateServiceRequest message or plain object to encode + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer. + * Decodes a GetBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateServiceRequest + * @returns GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.UpdateServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.GetBackupRequest; /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateServiceRequest + * @returns GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.UpdateServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.GetBackupRequest; /** - * Verifies an UpdateServiceRequest message. + * Verifies a GetBackupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateServiceRequest + * @returns GetBackupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.UpdateServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.GetBackupRequest; /** - * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. - * @param message UpdateServiceRequest + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @param message GetBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.UpdateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateServiceRequest to JSON. + * Converts this GetBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateServiceRequest + * Gets the default type url for GetBackupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteServiceRequest. */ - interface IDeleteServiceRequest { + /** Properties of a CreateBackupRequest. */ + interface ICreateBackupRequest { - /** DeleteServiceRequest name */ - name?: (string|null); + /** CreateBackupRequest parent */ + parent?: (string|null); - /** DeleteServiceRequest requestId */ + /** CreateBackupRequest backupId */ + backupId?: (string|null); + + /** CreateBackupRequest backup */ + backup?: (google.cloud.metastore.v1beta.IBackup|null); + + /** CreateBackupRequest requestId */ requestId?: (string|null); } - /** Represents a DeleteServiceRequest. */ - class DeleteServiceRequest implements IDeleteServiceRequest { + /** Represents a CreateBackupRequest. */ + class CreateBackupRequest implements ICreateBackupRequest { /** - * Constructs a new DeleteServiceRequest. + * Constructs a new CreateBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IDeleteServiceRequest); + constructor(properties?: google.cloud.metastore.v1beta.ICreateBackupRequest); - /** DeleteServiceRequest name. */ - public name: string; + /** CreateBackupRequest parent. */ + public parent: string; - /** DeleteServiceRequest requestId. */ + /** CreateBackupRequest backupId. */ + public backupId: string; + + /** CreateBackupRequest backup. */ + public backup?: (google.cloud.metastore.v1beta.IBackup|null); + + /** CreateBackupRequest requestId. */ public requestId: string; /** - * Creates a new DeleteServiceRequest instance using the specified properties. + * Creates a new CreateBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteServiceRequest instance + * @returns CreateBackupRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IDeleteServiceRequest): google.cloud.metastore.v1beta.DeleteServiceRequest; + public static create(properties?: google.cloud.metastore.v1beta.ICreateBackupRequest): google.cloud.metastore.v1beta.CreateBackupRequest; /** - * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteServiceRequest.verify|verify} messages. - * @param message DeleteServiceRequest message or plain object to encode + * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.CreateBackupRequest.verify|verify} messages. + * @param message CreateBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteServiceRequest.verify|verify} messages. - * @param message DeleteServiceRequest message or plain object to encode + * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.CreateBackupRequest.verify|verify} messages. + * @param message CreateBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * Decodes a CreateBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteServiceRequest + * @returns CreateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.DeleteServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.CreateBackupRequest; /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteServiceRequest + * @returns CreateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.DeleteServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.CreateBackupRequest; /** - * Verifies a DeleteServiceRequest message. + * Verifies a CreateBackupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteServiceRequest + * @returns CreateBackupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.DeleteServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.CreateBackupRequest; /** - * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. - * @param message DeleteServiceRequest + * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. + * @param message CreateBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.DeleteServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.CreateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteServiceRequest to JSON. + * Converts this CreateBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteServiceRequest + * Gets the default type url for CreateBackupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListMetadataImportsRequest. */ - interface IListMetadataImportsRequest { - - /** ListMetadataImportsRequest parent */ - parent?: (string|null); - - /** ListMetadataImportsRequest pageSize */ - pageSize?: (number|null); - - /** ListMetadataImportsRequest pageToken */ - pageToken?: (string|null); + /** Properties of a DeleteBackupRequest. */ + interface IDeleteBackupRequest { - /** ListMetadataImportsRequest filter */ - filter?: (string|null); + /** DeleteBackupRequest name */ + name?: (string|null); - /** ListMetadataImportsRequest orderBy */ - orderBy?: (string|null); + /** DeleteBackupRequest requestId */ + requestId?: (string|null); } - /** Represents a ListMetadataImportsRequest. */ - class ListMetadataImportsRequest implements IListMetadataImportsRequest { + /** Represents a DeleteBackupRequest. */ + class DeleteBackupRequest implements IDeleteBackupRequest { /** - * Constructs a new ListMetadataImportsRequest. + * Constructs a new DeleteBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IListMetadataImportsRequest); - - /** ListMetadataImportsRequest parent. */ - public parent: string; - - /** ListMetadataImportsRequest pageSize. */ - public pageSize: number; - - /** ListMetadataImportsRequest pageToken. */ - public pageToken: string; + constructor(properties?: google.cloud.metastore.v1beta.IDeleteBackupRequest); - /** ListMetadataImportsRequest filter. */ - public filter: string; + /** DeleteBackupRequest name. */ + public name: string; - /** ListMetadataImportsRequest orderBy. */ - public orderBy: string; + /** DeleteBackupRequest requestId. */ + public requestId: string; /** - * Creates a new ListMetadataImportsRequest instance using the specified properties. + * Creates a new DeleteBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListMetadataImportsRequest instance + * @returns DeleteBackupRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IListMetadataImportsRequest): google.cloud.metastore.v1beta.ListMetadataImportsRequest; + public static create(properties?: google.cloud.metastore.v1beta.IDeleteBackupRequest): google.cloud.metastore.v1beta.DeleteBackupRequest; /** - * Encodes the specified ListMetadataImportsRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsRequest.verify|verify} messages. - * @param message ListMetadataImportsRequest message or plain object to encode + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IListMetadataImportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMetadataImportsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsRequest.verify|verify} messages. - * @param message ListMetadataImportsRequest message or plain object to encode + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IListMetadataImportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMetadataImportsRequest message from the specified reader or buffer. + * Decodes a DeleteBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMetadataImportsRequest + * @returns DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ListMetadataImportsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.DeleteBackupRequest; /** - * Decodes a ListMetadataImportsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMetadataImportsRequest + * @returns DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ListMetadataImportsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.DeleteBackupRequest; /** - * Verifies a ListMetadataImportsRequest message. + * Verifies a DeleteBackupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMetadataImportsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMetadataImportsRequest + * @returns DeleteBackupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ListMetadataImportsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.DeleteBackupRequest; /** - * Creates a plain object from a ListMetadataImportsRequest message. Also converts values to other types if specified. - * @param message ListMetadataImportsRequest + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * @param message DeleteBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.ListMetadataImportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMetadataImportsRequest to JSON. + * Converts this DeleteBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListMetadataImportsRequest + * Gets the default type url for DeleteBackupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListMetadataImportsResponse. */ - interface IListMetadataImportsResponse { + /** Properties of an ExportMetadataRequest. */ + interface IExportMetadataRequest { - /** ListMetadataImportsResponse metadataImports */ - metadataImports?: (google.cloud.metastore.v1beta.IMetadataImport[]|null); + /** ExportMetadataRequest destinationGcsFolder */ + destinationGcsFolder?: (string|null); - /** ListMetadataImportsResponse nextPageToken */ - nextPageToken?: (string|null); + /** ExportMetadataRequest service */ + service?: (string|null); - /** ListMetadataImportsResponse unreachable */ - unreachable?: (string[]|null); + /** ExportMetadataRequest requestId */ + requestId?: (string|null); + + /** ExportMetadataRequest databaseDumpType */ + databaseDumpType?: (google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|null); } - /** Represents a ListMetadataImportsResponse. */ - class ListMetadataImportsResponse implements IListMetadataImportsResponse { + /** Represents an ExportMetadataRequest. */ + class ExportMetadataRequest implements IExportMetadataRequest { /** - * Constructs a new ListMetadataImportsResponse. + * Constructs a new ExportMetadataRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IListMetadataImportsResponse); + constructor(properties?: google.cloud.metastore.v1beta.IExportMetadataRequest); - /** ListMetadataImportsResponse metadataImports. */ - public metadataImports: google.cloud.metastore.v1beta.IMetadataImport[]; + /** ExportMetadataRequest destinationGcsFolder. */ + public destinationGcsFolder?: (string|null); - /** ListMetadataImportsResponse nextPageToken. */ - public nextPageToken: string; + /** ExportMetadataRequest service. */ + public service: string; - /** ListMetadataImportsResponse unreachable. */ - public unreachable: string[]; + /** ExportMetadataRequest requestId. */ + public requestId: string; + + /** ExportMetadataRequest databaseDumpType. */ + public databaseDumpType: (google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1beta.DatabaseDumpSpec.Type); + + /** ExportMetadataRequest destination. */ + public destination?: "destinationGcsFolder"; /** - * Creates a new ListMetadataImportsResponse instance using the specified properties. + * Creates a new ExportMetadataRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListMetadataImportsResponse instance + * @returns ExportMetadataRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IListMetadataImportsResponse): google.cloud.metastore.v1beta.ListMetadataImportsResponse; + public static create(properties?: google.cloud.metastore.v1beta.IExportMetadataRequest): google.cloud.metastore.v1beta.ExportMetadataRequest; /** - * Encodes the specified ListMetadataImportsResponse message. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsResponse.verify|verify} messages. - * @param message ListMetadataImportsResponse message or plain object to encode + * Encodes the specified ExportMetadataRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ExportMetadataRequest.verify|verify} messages. + * @param message ExportMetadataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IListMetadataImportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IExportMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMetadataImportsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsResponse.verify|verify} messages. - * @param message ListMetadataImportsResponse message or plain object to encode + * Encodes the specified ExportMetadataRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ExportMetadataRequest.verify|verify} messages. + * @param message ExportMetadataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IListMetadataImportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IExportMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMetadataImportsResponse message from the specified reader or buffer. + * Decodes an ExportMetadataRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMetadataImportsResponse + * @returns ExportMetadataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ListMetadataImportsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ExportMetadataRequest; /** - * Decodes a ListMetadataImportsResponse message from the specified reader or buffer, length delimited. + * Decodes an ExportMetadataRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMetadataImportsResponse + * @returns ExportMetadataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ListMetadataImportsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ExportMetadataRequest; /** - * Verifies a ListMetadataImportsResponse message. + * Verifies an ExportMetadataRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMetadataImportsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExportMetadataRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMetadataImportsResponse + * @returns ExportMetadataRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ListMetadataImportsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ExportMetadataRequest; /** - * Creates a plain object from a ListMetadataImportsResponse message. Also converts values to other types if specified. - * @param message ListMetadataImportsResponse + * Creates a plain object from an ExportMetadataRequest message. Also converts values to other types if specified. + * @param message ExportMetadataRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.ListMetadataImportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.ExportMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMetadataImportsResponse to JSON. + * Converts this ExportMetadataRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListMetadataImportsResponse + * Gets the default type url for ExportMetadataRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetMetadataImportRequest. */ - interface IGetMetadataImportRequest { + /** Properties of a RestoreServiceRequest. */ + interface IRestoreServiceRequest { - /** GetMetadataImportRequest name */ - name?: (string|null); + /** RestoreServiceRequest service */ + service?: (string|null); + + /** RestoreServiceRequest backup */ + backup?: (string|null); + + /** RestoreServiceRequest restoreType */ + restoreType?: (google.cloud.metastore.v1beta.Restore.RestoreType|keyof typeof google.cloud.metastore.v1beta.Restore.RestoreType|null); + + /** RestoreServiceRequest requestId */ + requestId?: (string|null); } - /** Represents a GetMetadataImportRequest. */ - class GetMetadataImportRequest implements IGetMetadataImportRequest { + /** Represents a RestoreServiceRequest. */ + class RestoreServiceRequest implements IRestoreServiceRequest { /** - * Constructs a new GetMetadataImportRequest. + * Constructs a new RestoreServiceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IGetMetadataImportRequest); + constructor(properties?: google.cloud.metastore.v1beta.IRestoreServiceRequest); - /** GetMetadataImportRequest name. */ - public name: string; + /** RestoreServiceRequest service. */ + public service: string; + + /** RestoreServiceRequest backup. */ + public backup: string; + + /** RestoreServiceRequest restoreType. */ + public restoreType: (google.cloud.metastore.v1beta.Restore.RestoreType|keyof typeof google.cloud.metastore.v1beta.Restore.RestoreType); + + /** RestoreServiceRequest requestId. */ + public requestId: string; /** - * Creates a new GetMetadataImportRequest instance using the specified properties. + * Creates a new RestoreServiceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetMetadataImportRequest instance + * @returns RestoreServiceRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IGetMetadataImportRequest): google.cloud.metastore.v1beta.GetMetadataImportRequest; + public static create(properties?: google.cloud.metastore.v1beta.IRestoreServiceRequest): google.cloud.metastore.v1beta.RestoreServiceRequest; /** - * Encodes the specified GetMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.GetMetadataImportRequest.verify|verify} messages. - * @param message GetMetadataImportRequest message or plain object to encode + * Encodes the specified RestoreServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.RestoreServiceRequest.verify|verify} messages. + * @param message RestoreServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IGetMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IRestoreServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.GetMetadataImportRequest.verify|verify} messages. - * @param message GetMetadataImportRequest message or plain object to encode + * Encodes the specified RestoreServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.RestoreServiceRequest.verify|verify} messages. + * @param message RestoreServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IGetMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IRestoreServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetMetadataImportRequest message from the specified reader or buffer. + * Decodes a RestoreServiceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetMetadataImportRequest + * @returns RestoreServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.GetMetadataImportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.RestoreServiceRequest; /** - * Decodes a GetMetadataImportRequest message from the specified reader or buffer, length delimited. + * Decodes a RestoreServiceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetMetadataImportRequest + * @returns RestoreServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.GetMetadataImportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.RestoreServiceRequest; /** - * Verifies a GetMetadataImportRequest message. + * Verifies a RestoreServiceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreServiceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetMetadataImportRequest + * @returns RestoreServiceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.GetMetadataImportRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.RestoreServiceRequest; /** - * Creates a plain object from a GetMetadataImportRequest message. Also converts values to other types if specified. - * @param message GetMetadataImportRequest + * Creates a plain object from a RestoreServiceRequest message. Also converts values to other types if specified. + * @param message RestoreServiceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.GetMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.RestoreServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetMetadataImportRequest to JSON. + * Converts this RestoreServiceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetMetadataImportRequest + * Gets the default type url for RestoreServiceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateMetadataImportRequest. */ - interface ICreateMetadataImportRequest { + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { - /** CreateMetadataImportRequest parent */ - parent?: (string|null); + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** CreateMetadataImportRequest metadataImportId */ - metadataImportId?: (string|null); + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** CreateMetadataImportRequest metadataImport */ - metadataImport?: (google.cloud.metastore.v1beta.IMetadataImport|null); + /** OperationMetadata target */ + target?: (string|null); - /** CreateMetadataImportRequest requestId */ - requestId?: (string|null); + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); } - /** Represents a CreateMetadataImportRequest. */ - class CreateMetadataImportRequest implements ICreateMetadataImportRequest { + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { /** - * Constructs a new CreateMetadataImportRequest. + * Constructs a new OperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.ICreateMetadataImportRequest); + constructor(properties?: google.cloud.metastore.v1beta.IOperationMetadata); - /** CreateMetadataImportRequest parent. */ - public parent: string; + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** CreateMetadataImportRequest metadataImportId. */ - public metadataImportId: string; + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** CreateMetadataImportRequest metadataImport. */ - public metadataImport?: (google.cloud.metastore.v1beta.IMetadataImport|null); + /** OperationMetadata target. */ + public target: string; - /** CreateMetadataImportRequest requestId. */ - public requestId: string; + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; /** - * Creates a new CreateMetadataImportRequest instance using the specified properties. + * Creates a new OperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns CreateMetadataImportRequest instance + * @returns OperationMetadata instance */ - public static create(properties?: google.cloud.metastore.v1beta.ICreateMetadataImportRequest): google.cloud.metastore.v1beta.CreateMetadataImportRequest; + public static create(properties?: google.cloud.metastore.v1beta.IOperationMetadata): google.cloud.metastore.v1beta.OperationMetadata; /** - * Encodes the specified CreateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.CreateMetadataImportRequest.verify|verify} messages. - * @param message CreateMetadataImportRequest message or plain object to encode + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.metastore.v1beta.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.ICreateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.CreateMetadataImportRequest.verify|verify} messages. - * @param message CreateMetadataImportRequest message or plain object to encode + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.ICreateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateMetadataImportRequest message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateMetadataImportRequest + * @returns OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.CreateMetadataImportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.OperationMetadata; /** - * Decodes a CreateMetadataImportRequest message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateMetadataImportRequest + * @returns OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.CreateMetadataImportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.OperationMetadata; /** - * Verifies a CreateMetadataImportRequest message. + * Verifies an OperationMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateMetadataImportRequest + * @returns OperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.CreateMetadataImportRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.OperationMetadata; /** - * Creates a plain object from a CreateMetadataImportRequest message. Also converts values to other types if specified. - * @param message CreateMetadataImportRequest + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.CreateMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateMetadataImportRequest to JSON. + * Converts this OperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateMetadataImportRequest + * Gets the default type url for OperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateMetadataImportRequest. */ - interface IUpdateMetadataImportRequest { - - /** UpdateMetadataImportRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateMetadataImportRequest metadataImport */ - metadataImport?: (google.cloud.metastore.v1beta.IMetadataImport|null); + /** Properties of a LocationMetadata. */ + interface ILocationMetadata { - /** UpdateMetadataImportRequest requestId */ - requestId?: (string|null); + /** LocationMetadata supportedHiveMetastoreVersions */ + supportedHiveMetastoreVersions?: (google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion[]|null); } - /** Represents an UpdateMetadataImportRequest. */ - class UpdateMetadataImportRequest implements IUpdateMetadataImportRequest { + /** Represents a LocationMetadata. */ + class LocationMetadata implements ILocationMetadata { /** - * Constructs a new UpdateMetadataImportRequest. + * Constructs a new LocationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IUpdateMetadataImportRequest); - - /** UpdateMetadataImportRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateMetadataImportRequest metadataImport. */ - public metadataImport?: (google.cloud.metastore.v1beta.IMetadataImport|null); + constructor(properties?: google.cloud.metastore.v1beta.ILocationMetadata); - /** UpdateMetadataImportRequest requestId. */ - public requestId: string; + /** LocationMetadata supportedHiveMetastoreVersions. */ + public supportedHiveMetastoreVersions: google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion[]; /** - * Creates a new UpdateMetadataImportRequest instance using the specified properties. + * Creates a new LocationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateMetadataImportRequest instance + * @returns LocationMetadata instance */ - public static create(properties?: google.cloud.metastore.v1beta.IUpdateMetadataImportRequest): google.cloud.metastore.v1beta.UpdateMetadataImportRequest; + public static create(properties?: google.cloud.metastore.v1beta.ILocationMetadata): google.cloud.metastore.v1beta.LocationMetadata; /** - * Encodes the specified UpdateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateMetadataImportRequest.verify|verify} messages. - * @param message UpdateMetadataImportRequest message or plain object to encode + * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.verify|verify} messages. + * @param message LocationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IUpdateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateMetadataImportRequest.verify|verify} messages. - * @param message UpdateMetadataImportRequest message or plain object to encode + * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.verify|verify} messages. + * @param message LocationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IUpdateMetadataImportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer. + * Decodes a LocationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateMetadataImportRequest + * @returns LocationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.UpdateMetadataImportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.LocationMetadata; /** - * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer, length delimited. + * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateMetadataImportRequest + * @returns LocationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.UpdateMetadataImportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.LocationMetadata; /** - * Verifies an UpdateMetadataImportRequest message. + * Verifies a LocationMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateMetadataImportRequest + * @returns LocationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.UpdateMetadataImportRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.LocationMetadata; /** - * Creates a plain object from an UpdateMetadataImportRequest message. Also converts values to other types if specified. - * @param message UpdateMetadataImportRequest + * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. + * @param message LocationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.UpdateMetadataImportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.LocationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateMetadataImportRequest to JSON. + * Converts this LocationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateMetadataImportRequest + * Gets the default type url for LocationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBackupsRequest. */ - interface IListBackupsRequest { + namespace LocationMetadata { - /** ListBackupsRequest parent */ - parent?: (string|null); + /** Properties of a HiveMetastoreVersion. */ + interface IHiveMetastoreVersion { - /** ListBackupsRequest pageSize */ - pageSize?: (number|null); + /** HiveMetastoreVersion version */ + version?: (string|null); - /** ListBackupsRequest pageToken */ - pageToken?: (string|null); + /** HiveMetastoreVersion isDefault */ + isDefault?: (boolean|null); + } - /** ListBackupsRequest filter */ - filter?: (string|null); + /** Represents a HiveMetastoreVersion. */ + class HiveMetastoreVersion implements IHiveMetastoreVersion { - /** ListBackupsRequest orderBy */ - orderBy?: (string|null); - } + /** + * Constructs a new HiveMetastoreVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion); - /** Represents a ListBackupsRequest. */ - class ListBackupsRequest implements IListBackupsRequest { + /** HiveMetastoreVersion version. */ + public version: string; - /** - * Constructs a new ListBackupsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.metastore.v1beta.IListBackupsRequest); + /** HiveMetastoreVersion isDefault. */ + public isDefault: boolean; - /** ListBackupsRequest parent. */ - public parent: string; + /** + * Creates a new HiveMetastoreVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns HiveMetastoreVersion instance + */ + public static create(properties?: google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion): google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion; - /** ListBackupsRequest pageSize. */ - public pageSize: number; + /** + * Encodes the specified HiveMetastoreVersion message. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. + * @param message HiveMetastoreVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListBackupsRequest pageToken. */ - public pageToken: string; + /** + * Encodes the specified HiveMetastoreVersion message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. + * @param message HiveMetastoreVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HiveMetastoreVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HiveMetastoreVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion; + + /** + * Decodes a HiveMetastoreVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HiveMetastoreVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion; + + /** + * Verifies a HiveMetastoreVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HiveMetastoreVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HiveMetastoreVersion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion; + + /** + * Creates a plain object from a HiveMetastoreVersion message. Also converts values to other types if specified. + * @param message HiveMetastoreVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HiveMetastoreVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HiveMetastoreVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DatabaseDumpSpec. */ + interface IDatabaseDumpSpec { + } - /** ListBackupsRequest filter. */ - public filter: string; + /** Represents a DatabaseDumpSpec. */ + class DatabaseDumpSpec implements IDatabaseDumpSpec { - /** ListBackupsRequest orderBy. */ - public orderBy: string; + /** + * Constructs a new DatabaseDumpSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1beta.IDatabaseDumpSpec); /** - * Creates a new ListBackupsRequest instance using the specified properties. + * Creates a new DatabaseDumpSpec instance using the specified properties. * @param [properties] Properties to set - * @returns ListBackupsRequest instance + * @returns DatabaseDumpSpec instance */ - public static create(properties?: google.cloud.metastore.v1beta.IListBackupsRequest): google.cloud.metastore.v1beta.ListBackupsRequest; + public static create(properties?: google.cloud.metastore.v1beta.IDatabaseDumpSpec): google.cloud.metastore.v1beta.DatabaseDumpSpec; /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsRequest.verify|verify} messages. - * @param message ListBackupsRequest message or plain object to encode + * Encodes the specified DatabaseDumpSpec message. Does not implicitly {@link google.cloud.metastore.v1beta.DatabaseDumpSpec.verify|verify} messages. + * @param message DatabaseDumpSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IDatabaseDumpSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsRequest.verify|verify} messages. - * @param message ListBackupsRequest message or plain object to encode + * Encodes the specified DatabaseDumpSpec message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DatabaseDumpSpec.verify|verify} messages. + * @param message DatabaseDumpSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IDatabaseDumpSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. + * Decodes a DatabaseDumpSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBackupsRequest + * @returns DatabaseDumpSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ListBackupsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.DatabaseDumpSpec; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * Decodes a DatabaseDumpSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBackupsRequest + * @returns DatabaseDumpSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ListBackupsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.DatabaseDumpSpec; /** - * Verifies a ListBackupsRequest message. + * Verifies a DatabaseDumpSpec message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DatabaseDumpSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBackupsRequest + * @returns DatabaseDumpSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ListBackupsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.DatabaseDumpSpec; /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. - * @param message ListBackupsRequest + * Creates a plain object from a DatabaseDumpSpec message. Also converts values to other types if specified. + * @param message DatabaseDumpSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.DatabaseDumpSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBackupsRequest to JSON. + * Converts this DatabaseDumpSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListBackupsRequest + * Gets the default type url for DatabaseDumpSpec * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBackupsResponse. */ - interface IListBackupsResponse { - - /** ListBackupsResponse backups */ - backups?: (google.cloud.metastore.v1beta.IBackup[]|null); - - /** ListBackupsResponse nextPageToken */ - nextPageToken?: (string|null); + namespace DatabaseDumpSpec { - /** ListBackupsResponse unreachable */ - unreachable?: (string[]|null); + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + MYSQL = 1, + AVRO = 2 + } } - /** Represents a ListBackupsResponse. */ - class ListBackupsResponse implements IListBackupsResponse { + /** Represents a DataprocMetastoreFederation */ + class DataprocMetastoreFederation extends $protobuf.rpc.Service { /** - * Constructs a new ListBackupsResponse. - * @param [properties] Properties to set + * Constructs a new DataprocMetastoreFederation service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.metastore.v1beta.IListBackupsResponse); - - /** ListBackupsResponse backups. */ - public backups: google.cloud.metastore.v1beta.IBackup[]; - - /** ListBackupsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListBackupsResponse unreachable. */ - public unreachable: string[]; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new ListBackupsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupsResponse instance + * Creates new DataprocMetastoreFederation service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(properties?: google.cloud.metastore.v1beta.IListBackupsResponse): google.cloud.metastore.v1beta.ListBackupsResponse; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataprocMetastoreFederation; /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsResponse.verify|verify} messages. - * @param message ListBackupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListFederations. + * @param request ListFederationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFederationsResponse */ - public static encode(message: google.cloud.metastore.v1beta.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public listFederations(request: google.cloud.metastore.v1beta.IListFederationsRequest, callback: google.cloud.metastore.v1beta.DataprocMetastoreFederation.ListFederationsCallback): void; /** - * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsResponse.verify|verify} messages. - * @param message ListBackupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListFederations. + * @param request ListFederationsRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public listFederations(request: google.cloud.metastore.v1beta.IListFederationsRequest): Promise; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetFederation. + * @param request GetFederationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Federation */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ListBackupsResponse; + public getFederation(request: google.cloud.metastore.v1beta.IGetFederationRequest, callback: google.cloud.metastore.v1beta.DataprocMetastoreFederation.GetFederationCallback): void; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetFederation. + * @param request GetFederationRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ListBackupsResponse; + public getFederation(request: google.cloud.metastore.v1beta.IGetFederationRequest): Promise; /** - * Verifies a ListBackupsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateFederation. + * @param request CreateFederationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static verify(message: { [k: string]: any }): (string|null); + public createFederation(request: google.cloud.metastore.v1beta.ICreateFederationRequest, callback: google.cloud.metastore.v1beta.DataprocMetastoreFederation.CreateFederationCallback): void; /** - * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupsResponse + * Calls CreateFederation. + * @param request CreateFederationRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ListBackupsResponse; + public createFederation(request: google.cloud.metastore.v1beta.ICreateFederationRequest): Promise; /** - * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. - * @param message ListBackupsResponse - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateFederation. + * @param request UpdateFederationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static toObject(message: google.cloud.metastore.v1beta.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateFederation(request: google.cloud.metastore.v1beta.IUpdateFederationRequest, callback: google.cloud.metastore.v1beta.DataprocMetastoreFederation.UpdateFederationCallback): void; /** - * Converts this ListBackupsResponse to JSON. - * @returns JSON object + * Calls UpdateFederation. + * @param request UpdateFederationRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public updateFederation(request: google.cloud.metastore.v1beta.IUpdateFederationRequest): Promise; /** - * Gets the default type url for ListBackupsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls DeleteFederation. + * @param request DeleteFederationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupRequest. */ - interface IGetBackupRequest { - - /** GetBackupRequest name */ - name?: (string|null); - } - - /** Represents a GetBackupRequest. */ - class GetBackupRequest implements IGetBackupRequest { + public deleteFederation(request: google.cloud.metastore.v1beta.IDeleteFederationRequest, callback: google.cloud.metastore.v1beta.DataprocMetastoreFederation.DeleteFederationCallback): void; /** - * Constructs a new GetBackupRequest. - * @param [properties] Properties to set + * Calls DeleteFederation. + * @param request DeleteFederationRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.metastore.v1beta.IGetBackupRequest); + public deleteFederation(request: google.cloud.metastore.v1beta.IDeleteFederationRequest): Promise; + } - /** GetBackupRequest name. */ - public name: string; + namespace DataprocMetastoreFederation { /** - * Creates a new GetBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupRequest instance + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastoreFederation|listFederations}. + * @param error Error, if any + * @param [response] ListFederationsResponse */ - public static create(properties?: google.cloud.metastore.v1beta.IGetBackupRequest): google.cloud.metastore.v1beta.GetBackupRequest; + type ListFederationsCallback = (error: (Error|null), response?: google.cloud.metastore.v1beta.ListFederationsResponse) => void; /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.GetBackupRequest.verify|verify} messages. - * @param message GetBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastoreFederation|getFederation}. + * @param error Error, if any + * @param [response] Federation */ - public static encode(message: google.cloud.metastore.v1beta.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type GetFederationCallback = (error: (Error|null), response?: google.cloud.metastore.v1beta.Federation) => void; /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.GetBackupRequest.verify|verify} messages. - * @param message GetBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastoreFederation|createFederation}. + * @param error Error, if any + * @param [response] Operation */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type CreateFederationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Decodes a GetBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastoreFederation|updateFederation}. + * @param error Error, if any + * @param [response] Operation */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.GetBackupRequest; + type UpdateFederationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastoreFederation|deleteFederation}. + * @param error Error, if any + * @param [response] Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.GetBackupRequest; + type DeleteFederationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } - /** - * Verifies a GetBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of a Federation. */ + interface IFederation { - /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.GetBackupRequest; + /** Federation name */ + name?: (string|null); - /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. - * @param message GetBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.metastore.v1beta.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Federation createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Converts this GetBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Federation updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Gets the default type url for GetBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Federation labels */ + labels?: ({ [k: string]: string }|null); - /** Properties of a CreateBackupRequest. */ - interface ICreateBackupRequest { + /** Federation version */ + version?: (string|null); - /** CreateBackupRequest parent */ - parent?: (string|null); + /** Federation backendMetastores */ + backendMetastores?: ({ [k: string]: google.cloud.metastore.v1beta.IBackendMetastore }|null); - /** CreateBackupRequest backupId */ - backupId?: (string|null); + /** Federation endpointUri */ + endpointUri?: (string|null); - /** CreateBackupRequest backup */ - backup?: (google.cloud.metastore.v1beta.IBackup|null); + /** Federation state */ + state?: (google.cloud.metastore.v1beta.Federation.State|keyof typeof google.cloud.metastore.v1beta.Federation.State|null); - /** CreateBackupRequest requestId */ - requestId?: (string|null); + /** Federation stateMessage */ + stateMessage?: (string|null); + + /** Federation uid */ + uid?: (string|null); } - /** Represents a CreateBackupRequest. */ - class CreateBackupRequest implements ICreateBackupRequest { + /** Represents a Federation. */ + class Federation implements IFederation { /** - * Constructs a new CreateBackupRequest. + * Constructs a new Federation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.ICreateBackupRequest); + constructor(properties?: google.cloud.metastore.v1beta.IFederation); - /** CreateBackupRequest parent. */ - public parent: string; + /** Federation name. */ + public name: string; - /** CreateBackupRequest backupId. */ - public backupId: string; + /** Federation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** CreateBackupRequest backup. */ - public backup?: (google.cloud.metastore.v1beta.IBackup|null); + /** Federation updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** CreateBackupRequest requestId. */ - public requestId: string; + /** Federation labels. */ + public labels: { [k: string]: string }; + + /** Federation version. */ + public version: string; + + /** Federation backendMetastores. */ + public backendMetastores: { [k: string]: google.cloud.metastore.v1beta.IBackendMetastore }; + + /** Federation endpointUri. */ + public endpointUri: string; + + /** Federation state. */ + public state: (google.cloud.metastore.v1beta.Federation.State|keyof typeof google.cloud.metastore.v1beta.Federation.State); + + /** Federation stateMessage. */ + public stateMessage: string; + + /** Federation uid. */ + public uid: string; /** - * Creates a new CreateBackupRequest instance using the specified properties. + * Creates a new Federation instance using the specified properties. * @param [properties] Properties to set - * @returns CreateBackupRequest instance + * @returns Federation instance */ - public static create(properties?: google.cloud.metastore.v1beta.ICreateBackupRequest): google.cloud.metastore.v1beta.CreateBackupRequest; + public static create(properties?: google.cloud.metastore.v1beta.IFederation): google.cloud.metastore.v1beta.Federation; /** - * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.CreateBackupRequest.verify|verify} messages. - * @param message CreateBackupRequest message or plain object to encode + * Encodes the specified Federation message. Does not implicitly {@link google.cloud.metastore.v1beta.Federation.verify|verify} messages. + * @param message Federation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IFederation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.CreateBackupRequest.verify|verify} messages. - * @param message CreateBackupRequest message or plain object to encode + * Encodes the specified Federation message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Federation.verify|verify} messages. + * @param message Federation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IFederation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateBackupRequest message from the specified reader or buffer. + * Decodes a Federation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateBackupRequest + * @returns Federation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.CreateBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.Federation; /** - * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a Federation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateBackupRequest + * @returns Federation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.CreateBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.Federation; /** - * Verifies a CreateBackupRequest message. + * Verifies a Federation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Federation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateBackupRequest + * @returns Federation */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.CreateBackupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.Federation; /** - * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. - * @param message CreateBackupRequest + * Creates a plain object from a Federation message. Also converts values to other types if specified. + * @param message Federation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.CreateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.Federation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateBackupRequest to JSON. + * Converts this Federation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateBackupRequest + * Gets the default type url for Federation * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteBackupRequest. */ - interface IDeleteBackupRequest { + namespace Federation { - /** DeleteBackupRequest name */ + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + UPDATING = 3, + DELETING = 4, + ERROR = 5 + } + } + + /** Properties of a BackendMetastore. */ + interface IBackendMetastore { + + /** BackendMetastore name */ name?: (string|null); - /** DeleteBackupRequest requestId */ - requestId?: (string|null); + /** BackendMetastore metastoreType */ + metastoreType?: (google.cloud.metastore.v1beta.BackendMetastore.MetastoreType|keyof typeof google.cloud.metastore.v1beta.BackendMetastore.MetastoreType|null); } - /** Represents a DeleteBackupRequest. */ - class DeleteBackupRequest implements IDeleteBackupRequest { + /** Represents a BackendMetastore. */ + class BackendMetastore implements IBackendMetastore { /** - * Constructs a new DeleteBackupRequest. + * Constructs a new BackendMetastore. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IDeleteBackupRequest); + constructor(properties?: google.cloud.metastore.v1beta.IBackendMetastore); - /** DeleteBackupRequest name. */ + /** BackendMetastore name. */ public name: string; - /** DeleteBackupRequest requestId. */ - public requestId: string; + /** BackendMetastore metastoreType. */ + public metastoreType: (google.cloud.metastore.v1beta.BackendMetastore.MetastoreType|keyof typeof google.cloud.metastore.v1beta.BackendMetastore.MetastoreType); /** - * Creates a new DeleteBackupRequest instance using the specified properties. + * Creates a new BackendMetastore instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteBackupRequest instance + * @returns BackendMetastore instance */ - public static create(properties?: google.cloud.metastore.v1beta.IDeleteBackupRequest): google.cloud.metastore.v1beta.DeleteBackupRequest; + public static create(properties?: google.cloud.metastore.v1beta.IBackendMetastore): google.cloud.metastore.v1beta.BackendMetastore; /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteBackupRequest.verify|verify} messages. - * @param message DeleteBackupRequest message or plain object to encode + * Encodes the specified BackendMetastore message. Does not implicitly {@link google.cloud.metastore.v1beta.BackendMetastore.verify|verify} messages. + * @param message BackendMetastore message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IBackendMetastore, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteBackupRequest.verify|verify} messages. - * @param message DeleteBackupRequest message or plain object to encode + * Encodes the specified BackendMetastore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.BackendMetastore.verify|verify} messages. + * @param message BackendMetastore message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IBackendMetastore, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * Decodes a BackendMetastore message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteBackupRequest + * @returns BackendMetastore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.DeleteBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.BackendMetastore; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a BackendMetastore message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteBackupRequest + * @returns BackendMetastore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.DeleteBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.BackendMetastore; /** - * Verifies a DeleteBackupRequest message. + * Verifies a BackendMetastore message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BackendMetastore message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteBackupRequest + * @returns BackendMetastore */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.DeleteBackupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.BackendMetastore; /** - * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. - * @param message DeleteBackupRequest + * Creates a plain object from a BackendMetastore message. Also converts values to other types if specified. + * @param message BackendMetastore * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.BackendMetastore, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteBackupRequest to JSON. + * Converts this BackendMetastore to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteBackupRequest + * Gets the default type url for BackendMetastore * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExportMetadataRequest. */ - interface IExportMetadataRequest { + namespace BackendMetastore { - /** ExportMetadataRequest destinationGcsFolder */ - destinationGcsFolder?: (string|null); + /** MetastoreType enum. */ + enum MetastoreType { + METASTORE_TYPE_UNSPECIFIED = 0, + BIGQUERY = 2, + DATAPROC_METASTORE = 3 + } + } - /** ExportMetadataRequest service */ - service?: (string|null); + /** Properties of a ListFederationsRequest. */ + interface IListFederationsRequest { - /** ExportMetadataRequest requestId */ - requestId?: (string|null); + /** ListFederationsRequest parent */ + parent?: (string|null); - /** ExportMetadataRequest databaseDumpType */ - databaseDumpType?: (google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|null); + /** ListFederationsRequest pageSize */ + pageSize?: (number|null); + + /** ListFederationsRequest pageToken */ + pageToken?: (string|null); + + /** ListFederationsRequest filter */ + filter?: (string|null); + + /** ListFederationsRequest orderBy */ + orderBy?: (string|null); } - /** Represents an ExportMetadataRequest. */ - class ExportMetadataRequest implements IExportMetadataRequest { + /** Represents a ListFederationsRequest. */ + class ListFederationsRequest implements IListFederationsRequest { /** - * Constructs a new ExportMetadataRequest. + * Constructs a new ListFederationsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IExportMetadataRequest); + constructor(properties?: google.cloud.metastore.v1beta.IListFederationsRequest); - /** ExportMetadataRequest destinationGcsFolder. */ - public destinationGcsFolder?: (string|null); + /** ListFederationsRequest parent. */ + public parent: string; - /** ExportMetadataRequest service. */ - public service: string; + /** ListFederationsRequest pageSize. */ + public pageSize: number; - /** ExportMetadataRequest requestId. */ - public requestId: string; + /** ListFederationsRequest pageToken. */ + public pageToken: string; - /** ExportMetadataRequest databaseDumpType. */ - public databaseDumpType: (google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|keyof typeof google.cloud.metastore.v1beta.DatabaseDumpSpec.Type); + /** ListFederationsRequest filter. */ + public filter: string; - /** ExportMetadataRequest destination. */ - public destination?: "destinationGcsFolder"; + /** ListFederationsRequest orderBy. */ + public orderBy: string; /** - * Creates a new ExportMetadataRequest instance using the specified properties. + * Creates a new ListFederationsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportMetadataRequest instance + * @returns ListFederationsRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IExportMetadataRequest): google.cloud.metastore.v1beta.ExportMetadataRequest; + public static create(properties?: google.cloud.metastore.v1beta.IListFederationsRequest): google.cloud.metastore.v1beta.ListFederationsRequest; /** - * Encodes the specified ExportMetadataRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ExportMetadataRequest.verify|verify} messages. - * @param message ExportMetadataRequest message or plain object to encode + * Encodes the specified ListFederationsRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ListFederationsRequest.verify|verify} messages. + * @param message ListFederationsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IExportMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IListFederationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportMetadataRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ExportMetadataRequest.verify|verify} messages. - * @param message ExportMetadataRequest message or plain object to encode + * Encodes the specified ListFederationsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListFederationsRequest.verify|verify} messages. + * @param message ListFederationsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IExportMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IListFederationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportMetadataRequest message from the specified reader or buffer. + * Decodes a ListFederationsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportMetadataRequest + * @returns ListFederationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ExportMetadataRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ListFederationsRequest; /** - * Decodes an ExportMetadataRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFederationsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportMetadataRequest + * @returns ListFederationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ExportMetadataRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ListFederationsRequest; /** - * Verifies an ExportMetadataRequest message. + * Verifies a ListFederationsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExportMetadataRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFederationsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportMetadataRequest + * @returns ListFederationsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ExportMetadataRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ListFederationsRequest; /** - * Creates a plain object from an ExportMetadataRequest message. Also converts values to other types if specified. - * @param message ExportMetadataRequest + * Creates a plain object from a ListFederationsRequest message. Also converts values to other types if specified. + * @param message ListFederationsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.ExportMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.ListFederationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportMetadataRequest to JSON. + * Converts this ListFederationsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExportMetadataRequest + * Gets the default type url for ListFederationsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RestoreServiceRequest. */ - interface IRestoreServiceRequest { - - /** RestoreServiceRequest service */ - service?: (string|null); + /** Properties of a ListFederationsResponse. */ + interface IListFederationsResponse { - /** RestoreServiceRequest backup */ - backup?: (string|null); + /** ListFederationsResponse federations */ + federations?: (google.cloud.metastore.v1beta.IFederation[]|null); - /** RestoreServiceRequest restoreType */ - restoreType?: (google.cloud.metastore.v1beta.Restore.RestoreType|keyof typeof google.cloud.metastore.v1beta.Restore.RestoreType|null); + /** ListFederationsResponse nextPageToken */ + nextPageToken?: (string|null); - /** RestoreServiceRequest requestId */ - requestId?: (string|null); + /** ListFederationsResponse unreachable */ + unreachable?: (string[]|null); } - /** Represents a RestoreServiceRequest. */ - class RestoreServiceRequest implements IRestoreServiceRequest { + /** Represents a ListFederationsResponse. */ + class ListFederationsResponse implements IListFederationsResponse { /** - * Constructs a new RestoreServiceRequest. + * Constructs a new ListFederationsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IRestoreServiceRequest); + constructor(properties?: google.cloud.metastore.v1beta.IListFederationsResponse); - /** RestoreServiceRequest service. */ - public service: string; - - /** RestoreServiceRequest backup. */ - public backup: string; + /** ListFederationsResponse federations. */ + public federations: google.cloud.metastore.v1beta.IFederation[]; - /** RestoreServiceRequest restoreType. */ - public restoreType: (google.cloud.metastore.v1beta.Restore.RestoreType|keyof typeof google.cloud.metastore.v1beta.Restore.RestoreType); + /** ListFederationsResponse nextPageToken. */ + public nextPageToken: string; - /** RestoreServiceRequest requestId. */ - public requestId: string; + /** ListFederationsResponse unreachable. */ + public unreachable: string[]; /** - * Creates a new RestoreServiceRequest instance using the specified properties. + * Creates a new ListFederationsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RestoreServiceRequest instance + * @returns ListFederationsResponse instance */ - public static create(properties?: google.cloud.metastore.v1beta.IRestoreServiceRequest): google.cloud.metastore.v1beta.RestoreServiceRequest; + public static create(properties?: google.cloud.metastore.v1beta.IListFederationsResponse): google.cloud.metastore.v1beta.ListFederationsResponse; /** - * Encodes the specified RestoreServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.RestoreServiceRequest.verify|verify} messages. - * @param message RestoreServiceRequest message or plain object to encode + * Encodes the specified ListFederationsResponse message. Does not implicitly {@link google.cloud.metastore.v1beta.ListFederationsResponse.verify|verify} messages. + * @param message ListFederationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IRestoreServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IListFederationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RestoreServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.RestoreServiceRequest.verify|verify} messages. - * @param message RestoreServiceRequest message or plain object to encode + * Encodes the specified ListFederationsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListFederationsResponse.verify|verify} messages. + * @param message ListFederationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IRestoreServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IListFederationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RestoreServiceRequest message from the specified reader or buffer. + * Decodes a ListFederationsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RestoreServiceRequest + * @returns ListFederationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.RestoreServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.ListFederationsResponse; /** - * Decodes a RestoreServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFederationsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RestoreServiceRequest + * @returns ListFederationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.RestoreServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.ListFederationsResponse; /** - * Verifies a RestoreServiceRequest message. + * Verifies a ListFederationsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RestoreServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFederationsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RestoreServiceRequest + * @returns ListFederationsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.RestoreServiceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ListFederationsResponse; /** - * Creates a plain object from a RestoreServiceRequest message. Also converts values to other types if specified. - * @param message RestoreServiceRequest + * Creates a plain object from a ListFederationsResponse message. Also converts values to other types if specified. + * @param message ListFederationsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.RestoreServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.ListFederationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RestoreServiceRequest to JSON. + * Converts this ListFederationsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RestoreServiceRequest + * Gets the default type url for ListFederationsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { - - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target */ - target?: (string|null); - - /** OperationMetadata verb */ - verb?: (string|null); - - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); - - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); + /** Properties of a GetFederationRequest. */ + interface IGetFederationRequest { - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); + /** GetFederationRequest name */ + name?: (string|null); } - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** Represents a GetFederationRequest. */ + class GetFederationRequest implements IGetFederationRequest { /** - * Constructs a new OperationMetadata. + * Constructs a new GetFederationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IOperationMetadata); - - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target. */ - public target: string; - - /** OperationMetadata verb. */ - public verb: string; - - /** OperationMetadata statusMessage. */ - public statusMessage: string; - - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; + constructor(properties?: google.cloud.metastore.v1beta.IGetFederationRequest); - /** OperationMetadata apiVersion. */ - public apiVersion: string; + /** GetFederationRequest name. */ + public name: string; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new GetFederationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OperationMetadata instance + * @returns GetFederationRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IOperationMetadata): google.cloud.metastore.v1beta.OperationMetadata; + public static create(properties?: google.cloud.metastore.v1beta.IGetFederationRequest): google.cloud.metastore.v1beta.GetFederationRequest; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.metastore.v1beta.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified GetFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.GetFederationRequest.verify|verify} messages. + * @param message GetFederationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IGetFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified GetFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.GetFederationRequest.verify|verify} messages. + * @param message GetFederationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IGetFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a GetFederationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperationMetadata + * @returns GetFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.GetFederationRequest; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetFederationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperationMetadata + * @returns GetFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.GetFederationRequest; /** - * Verifies an OperationMetadata message. + * Verifies a GetFederationRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetFederationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperationMetadata + * @returns GetFederationRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.GetFederationRequest; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata + * Creates a plain object from a GetFederationRequest message. Also converts values to other types if specified. + * @param message GetFederationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.GetFederationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperationMetadata to JSON. + * Converts this GetFederationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for GetFederationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LocationMetadata. */ - interface ILocationMetadata { + /** Properties of a CreateFederationRequest. */ + interface ICreateFederationRequest { - /** LocationMetadata supportedHiveMetastoreVersions */ - supportedHiveMetastoreVersions?: (google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion[]|null); + /** CreateFederationRequest parent */ + parent?: (string|null); + + /** CreateFederationRequest federationId */ + federationId?: (string|null); + + /** CreateFederationRequest federation */ + federation?: (google.cloud.metastore.v1beta.IFederation|null); + + /** CreateFederationRequest requestId */ + requestId?: (string|null); } - /** Represents a LocationMetadata. */ - class LocationMetadata implements ILocationMetadata { + /** Represents a CreateFederationRequest. */ + class CreateFederationRequest implements ICreateFederationRequest { /** - * Constructs a new LocationMetadata. + * Constructs a new CreateFederationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.ILocationMetadata); + constructor(properties?: google.cloud.metastore.v1beta.ICreateFederationRequest); - /** LocationMetadata supportedHiveMetastoreVersions. */ - public supportedHiveMetastoreVersions: google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion[]; + /** CreateFederationRequest parent. */ + public parent: string; + + /** CreateFederationRequest federationId. */ + public federationId: string; + + /** CreateFederationRequest federation. */ + public federation?: (google.cloud.metastore.v1beta.IFederation|null); + + /** CreateFederationRequest requestId. */ + public requestId: string; /** - * Creates a new LocationMetadata instance using the specified properties. + * Creates a new CreateFederationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LocationMetadata instance + * @returns CreateFederationRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.ILocationMetadata): google.cloud.metastore.v1beta.LocationMetadata; + public static create(properties?: google.cloud.metastore.v1beta.ICreateFederationRequest): google.cloud.metastore.v1beta.CreateFederationRequest; /** - * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.verify|verify} messages. - * @param message LocationMetadata message or plain object to encode + * Encodes the specified CreateFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.CreateFederationRequest.verify|verify} messages. + * @param message CreateFederationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.ICreateFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.verify|verify} messages. - * @param message LocationMetadata message or plain object to encode + * Encodes the specified CreateFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.CreateFederationRequest.verify|verify} messages. + * @param message CreateFederationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.ICreateFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LocationMetadata message from the specified reader or buffer. + * Decodes a CreateFederationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LocationMetadata + * @returns CreateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.LocationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.CreateFederationRequest; /** - * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateFederationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LocationMetadata + * @returns CreateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.LocationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.CreateFederationRequest; /** - * Verifies a LocationMetadata message. + * Verifies a CreateFederationRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFederationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LocationMetadata + * @returns CreateFederationRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.LocationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.CreateFederationRequest; /** - * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. - * @param message LocationMetadata + * Creates a plain object from a CreateFederationRequest message. Also converts values to other types if specified. + * @param message CreateFederationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.LocationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.CreateFederationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LocationMetadata to JSON. + * Converts this CreateFederationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LocationMetadata + * Gets the default type url for CreateFederationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace LocationMetadata { + /** Properties of an UpdateFederationRequest. */ + interface IUpdateFederationRequest { - /** Properties of a HiveMetastoreVersion. */ - interface IHiveMetastoreVersion { + /** UpdateFederationRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** HiveMetastoreVersion version */ - version?: (string|null); + /** UpdateFederationRequest federation */ + federation?: (google.cloud.metastore.v1beta.IFederation|null); - /** HiveMetastoreVersion isDefault */ - isDefault?: (boolean|null); - } + /** UpdateFederationRequest requestId */ + requestId?: (string|null); + } - /** Represents a HiveMetastoreVersion. */ - class HiveMetastoreVersion implements IHiveMetastoreVersion { + /** Represents an UpdateFederationRequest. */ + class UpdateFederationRequest implements IUpdateFederationRequest { - /** - * Constructs a new HiveMetastoreVersion. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion); + /** + * Constructs a new UpdateFederationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1beta.IUpdateFederationRequest); - /** HiveMetastoreVersion version. */ - public version: string; + /** UpdateFederationRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** HiveMetastoreVersion isDefault. */ - public isDefault: boolean; + /** UpdateFederationRequest federation. */ + public federation?: (google.cloud.metastore.v1beta.IFederation|null); - /** - * Creates a new HiveMetastoreVersion instance using the specified properties. - * @param [properties] Properties to set - * @returns HiveMetastoreVersion instance - */ - public static create(properties?: google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion): google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion; + /** UpdateFederationRequest requestId. */ + public requestId: string; - /** - * Encodes the specified HiveMetastoreVersion message. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. - * @param message HiveMetastoreVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new UpdateFederationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFederationRequest instance + */ + public static create(properties?: google.cloud.metastore.v1beta.IUpdateFederationRequest): google.cloud.metastore.v1beta.UpdateFederationRequest; - /** - * Encodes the specified HiveMetastoreVersion message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. - * @param message HiveMetastoreVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified UpdateFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateFederationRequest.verify|verify} messages. + * @param message UpdateFederationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1beta.IUpdateFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a HiveMetastoreVersion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HiveMetastoreVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion; + /** + * Encodes the specified UpdateFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateFederationRequest.verify|verify} messages. + * @param message UpdateFederationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1beta.IUpdateFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a HiveMetastoreVersion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HiveMetastoreVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion; + /** + * Decodes an UpdateFederationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFederationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.UpdateFederationRequest; - /** - * Verifies a HiveMetastoreVersion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an UpdateFederationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFederationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.UpdateFederationRequest; - /** - * Creates a HiveMetastoreVersion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HiveMetastoreVersion - */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion; + /** + * Verifies an UpdateFederationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a HiveMetastoreVersion message. Also converts values to other types if specified. - * @param message HiveMetastoreVersion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates an UpdateFederationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFederationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.UpdateFederationRequest; - /** - * Converts this HiveMetastoreVersion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from an UpdateFederationRequest message. Also converts values to other types if specified. + * @param message UpdateFederationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1beta.UpdateFederationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for HiveMetastoreVersion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this UpdateFederationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFederationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DatabaseDumpSpec. */ - interface IDatabaseDumpSpec { + /** Properties of a DeleteFederationRequest. */ + interface IDeleteFederationRequest { + + /** DeleteFederationRequest name */ + name?: (string|null); + + /** DeleteFederationRequest requestId */ + requestId?: (string|null); } - /** Represents a DatabaseDumpSpec. */ - class DatabaseDumpSpec implements IDatabaseDumpSpec { + /** Represents a DeleteFederationRequest. */ + class DeleteFederationRequest implements IDeleteFederationRequest { /** - * Constructs a new DatabaseDumpSpec. + * Constructs a new DeleteFederationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.metastore.v1beta.IDatabaseDumpSpec); + constructor(properties?: google.cloud.metastore.v1beta.IDeleteFederationRequest); + + /** DeleteFederationRequest name. */ + public name: string; + + /** DeleteFederationRequest requestId. */ + public requestId: string; /** - * Creates a new DatabaseDumpSpec instance using the specified properties. + * Creates a new DeleteFederationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DatabaseDumpSpec instance + * @returns DeleteFederationRequest instance */ - public static create(properties?: google.cloud.metastore.v1beta.IDatabaseDumpSpec): google.cloud.metastore.v1beta.DatabaseDumpSpec; + public static create(properties?: google.cloud.metastore.v1beta.IDeleteFederationRequest): google.cloud.metastore.v1beta.DeleteFederationRequest; /** - * Encodes the specified DatabaseDumpSpec message. Does not implicitly {@link google.cloud.metastore.v1beta.DatabaseDumpSpec.verify|verify} messages. - * @param message DatabaseDumpSpec message or plain object to encode + * Encodes the specified DeleteFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteFederationRequest.verify|verify} messages. + * @param message DeleteFederationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.metastore.v1beta.IDatabaseDumpSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.metastore.v1beta.IDeleteFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DatabaseDumpSpec message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DatabaseDumpSpec.verify|verify} messages. - * @param message DatabaseDumpSpec message or plain object to encode + * Encodes the specified DeleteFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteFederationRequest.verify|verify} messages. + * @param message DeleteFederationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.metastore.v1beta.IDatabaseDumpSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.metastore.v1beta.IDeleteFederationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DatabaseDumpSpec message from the specified reader or buffer. + * Decodes a DeleteFederationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DatabaseDumpSpec + * @returns DeleteFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.DatabaseDumpSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.metastore.v1beta.DeleteFederationRequest; /** - * Decodes a DatabaseDumpSpec message from the specified reader or buffer, length delimited. + * Decodes a DeleteFederationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DatabaseDumpSpec + * @returns DeleteFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.DatabaseDumpSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.metastore.v1beta.DeleteFederationRequest; /** - * Verifies a DatabaseDumpSpec message. + * Verifies a DeleteFederationRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DatabaseDumpSpec message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFederationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DatabaseDumpSpec + * @returns DeleteFederationRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.DatabaseDumpSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.DeleteFederationRequest; /** - * Creates a plain object from a DatabaseDumpSpec message. Also converts values to other types if specified. - * @param message DatabaseDumpSpec + * Creates a plain object from a DeleteFederationRequest message. Also converts values to other types if specified. + * @param message DeleteFederationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.metastore.v1beta.DatabaseDumpSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.metastore.v1beta.DeleteFederationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DatabaseDumpSpec to JSON. + * Converts this DeleteFederationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DatabaseDumpSpec + * Gets the default type url for DeleteFederationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - - namespace DatabaseDumpSpec { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - MYSQL = 1 - } - } } } } diff --git a/packages/google-cloud-metastore/protos/protos.js b/packages/google-cloud-metastore/protos/protos.js index 83b4a286d33..c9b7ae983b7 100644 --- a/packages/google-cloud-metastore/protos/protos.js +++ b/packages/google-cloud-metastore/protos/protos.js @@ -618,6 +618,10 @@ * @property {string|null} [uid] Service uid * @property {google.cloud.metastore.v1.IMetadataManagementActivity|null} [metadataManagementActivity] Service metadataManagementActivity * @property {google.cloud.metastore.v1.Service.ReleaseChannel|null} [releaseChannel] Service releaseChannel + * @property {google.cloud.metastore.v1.IEncryptionConfig|null} [encryptionConfig] Service encryptionConfig + * @property {google.cloud.metastore.v1.INetworkConfig|null} [networkConfig] Service networkConfig + * @property {google.cloud.metastore.v1.Service.DatabaseType|null} [databaseType] Service databaseType + * @property {google.cloud.metastore.v1.ITelemetryConfig|null} [telemetryConfig] Service telemetryConfig */ /** @@ -764,6 +768,38 @@ */ Service.prototype.releaseChannel = 0; + /** + * Service encryptionConfig. + * @member {google.cloud.metastore.v1.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.cloud.metastore.v1.Service + * @instance + */ + Service.prototype.encryptionConfig = null; + + /** + * Service networkConfig. + * @member {google.cloud.metastore.v1.INetworkConfig|null|undefined} networkConfig + * @memberof google.cloud.metastore.v1.Service + * @instance + */ + Service.prototype.networkConfig = null; + + /** + * Service databaseType. + * @member {google.cloud.metastore.v1.Service.DatabaseType} databaseType + * @memberof google.cloud.metastore.v1.Service + * @instance + */ + Service.prototype.databaseType = 0; + + /** + * Service telemetryConfig. + * @member {google.cloud.metastore.v1.ITelemetryConfig|null|undefined} telemetryConfig + * @memberof google.cloud.metastore.v1.Service + * @instance + */ + Service.prototype.telemetryConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -835,6 +871,14 @@ $root.google.cloud.metastore.v1.MetadataManagementActivity.encode(message.metadataManagementActivity, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) writer.uint32(/* id 19, wireType 0 =*/152).int32(message.releaseChannel); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + $root.google.cloud.metastore.v1.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) + $root.google.cloud.metastore.v1.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.databaseType != null && Object.hasOwnProperty.call(message, "databaseType")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.databaseType); + if (message.telemetryConfig != null && Object.hasOwnProperty.call(message, "telemetryConfig")) + $root.google.cloud.metastore.v1.TelemetryConfig.encode(message.telemetryConfig, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); return writer; }; @@ -952,6 +996,22 @@ message.releaseChannel = reader.int32(); break; } + case 20: { + message.encryptionConfig = $root.google.cloud.metastore.v1.EncryptionConfig.decode(reader, reader.uint32()); + break; + } + case 21: { + message.networkConfig = $root.google.cloud.metastore.v1.NetworkConfig.decode(reader, reader.uint32()); + break; + } + case 22: { + message.databaseType = reader.int32(); + break; + } + case 23: { + message.telemetryConfig = $root.google.cloud.metastore.v1.TelemetryConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1077,6 +1137,30 @@ case 2: break; } + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + var error = $root.google.cloud.metastore.v1.EncryptionConfig.verify(message.encryptionConfig); + if (error) + return "encryptionConfig." + error; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { + var error = $root.google.cloud.metastore.v1.NetworkConfig.verify(message.networkConfig); + if (error) + return "networkConfig." + error; + } + if (message.databaseType != null && message.hasOwnProperty("databaseType")) + switch (message.databaseType) { + default: + return "databaseType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.telemetryConfig != null && message.hasOwnProperty("telemetryConfig")) { + var error = $root.google.cloud.metastore.v1.TelemetryConfig.verify(message.telemetryConfig); + if (error) + return "telemetryConfig." + error; + } return null; }; @@ -1218,6 +1302,41 @@ message.releaseChannel = 2; break; } + if (object.encryptionConfig != null) { + if (typeof object.encryptionConfig !== "object") + throw TypeError(".google.cloud.metastore.v1.Service.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.cloud.metastore.v1.EncryptionConfig.fromObject(object.encryptionConfig); + } + if (object.networkConfig != null) { + if (typeof object.networkConfig !== "object") + throw TypeError(".google.cloud.metastore.v1.Service.networkConfig: object expected"); + message.networkConfig = $root.google.cloud.metastore.v1.NetworkConfig.fromObject(object.networkConfig); + } + switch (object.databaseType) { + default: + if (typeof object.databaseType === "number") { + message.databaseType = object.databaseType; + break; + } + break; + case "DATABASE_TYPE_UNSPECIFIED": + case 0: + message.databaseType = 0; + break; + case "MYSQL": + case 1: + message.databaseType = 1; + break; + case "SPANNER": + case 2: + message.databaseType = 2; + break; + } + if (object.telemetryConfig != null) { + if (typeof object.telemetryConfig !== "object") + throw TypeError(".google.cloud.metastore.v1.Service.telemetryConfig: object expected"); + message.telemetryConfig = $root.google.cloud.metastore.v1.TelemetryConfig.fromObject(object.telemetryConfig); + } return message; }; @@ -1251,6 +1370,10 @@ object.uid = ""; object.metadataManagementActivity = null; object.releaseChannel = options.enums === String ? "RELEASE_CHANNEL_UNSPECIFIED" : 0; + object.encryptionConfig = null; + object.networkConfig = null; + object.databaseType = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; + object.telemetryConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -1291,6 +1414,14 @@ object.metadataManagementActivity = $root.google.cloud.metastore.v1.MetadataManagementActivity.toObject(message.metadataManagementActivity, options); if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) object.releaseChannel = options.enums === String ? $root.google.cloud.metastore.v1.Service.ReleaseChannel[message.releaseChannel] === undefined ? message.releaseChannel : $root.google.cloud.metastore.v1.Service.ReleaseChannel[message.releaseChannel] : message.releaseChannel; + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) + object.encryptionConfig = $root.google.cloud.metastore.v1.EncryptionConfig.toObject(message.encryptionConfig, options); + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) + object.networkConfig = $root.google.cloud.metastore.v1.NetworkConfig.toObject(message.networkConfig, options); + if (message.databaseType != null && message.hasOwnProperty("databaseType")) + object.databaseType = options.enums === String ? $root.google.cloud.metastore.v1.Service.DatabaseType[message.databaseType] === undefined ? message.databaseType : $root.google.cloud.metastore.v1.Service.DatabaseType[message.databaseType] : message.databaseType; + if (message.telemetryConfig != null && message.hasOwnProperty("telemetryConfig")) + object.telemetryConfig = $root.google.cloud.metastore.v1.TelemetryConfig.toObject(message.telemetryConfig, options); return object; }; @@ -1378,6 +1509,22 @@ return values; })(); + /** + * DatabaseType enum. + * @name google.cloud.metastore.v1.Service.DatabaseType + * @enum {number} + * @property {number} DATABASE_TYPE_UNSPECIFIED=0 DATABASE_TYPE_UNSPECIFIED value + * @property {number} MYSQL=1 MYSQL value + * @property {number} SPANNER=2 SPANNER value + */ + Service.DatabaseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MYSQL"] = 1; + values[valuesById[2] = "SPANNER"] = 2; + return values; + })(); + return Service; })(); @@ -2429,27 +2576,24 @@ return Secret; })(); - v1.MetadataManagementActivity = (function() { + v1.EncryptionConfig = (function() { /** - * Properties of a MetadataManagementActivity. + * Properties of an EncryptionConfig. * @memberof google.cloud.metastore.v1 - * @interface IMetadataManagementActivity - * @property {Array.|null} [metadataExports] MetadataManagementActivity metadataExports - * @property {Array.|null} [restores] MetadataManagementActivity restores + * @interface IEncryptionConfig + * @property {string|null} [kmsKey] EncryptionConfig kmsKey */ /** - * Constructs a new MetadataManagementActivity. + * Constructs a new EncryptionConfig. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a MetadataManagementActivity. - * @implements IMetadataManagementActivity + * @classdesc Represents an EncryptionConfig. + * @implements IEncryptionConfig * @constructor - * @param {google.cloud.metastore.v1.IMetadataManagementActivity=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IEncryptionConfig=} [properties] Properties to set */ - function MetadataManagementActivity(properties) { - this.metadataExports = []; - this.restores = []; + function EncryptionConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2457,95 +2601,75 @@ } /** - * MetadataManagementActivity metadataExports. - * @member {Array.} metadataExports - * @memberof google.cloud.metastore.v1.MetadataManagementActivity - * @instance - */ - MetadataManagementActivity.prototype.metadataExports = $util.emptyArray; - - /** - * MetadataManagementActivity restores. - * @member {Array.} restores - * @memberof google.cloud.metastore.v1.MetadataManagementActivity + * EncryptionConfig kmsKey. + * @member {string} kmsKey + * @memberof google.cloud.metastore.v1.EncryptionConfig * @instance */ - MetadataManagementActivity.prototype.restores = $util.emptyArray; + EncryptionConfig.prototype.kmsKey = ""; /** - * Creates a new MetadataManagementActivity instance using the specified properties. + * Creates a new EncryptionConfig instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.MetadataManagementActivity + * @memberof google.cloud.metastore.v1.EncryptionConfig * @static - * @param {google.cloud.metastore.v1.IMetadataManagementActivity=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.MetadataManagementActivity} MetadataManagementActivity instance + * @param {google.cloud.metastore.v1.IEncryptionConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.EncryptionConfig} EncryptionConfig instance */ - MetadataManagementActivity.create = function create(properties) { - return new MetadataManagementActivity(properties); + EncryptionConfig.create = function create(properties) { + return new EncryptionConfig(properties); }; /** - * Encodes the specified MetadataManagementActivity message. Does not implicitly {@link google.cloud.metastore.v1.MetadataManagementActivity.verify|verify} messages. + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.metastore.v1.EncryptionConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.MetadataManagementActivity + * @memberof google.cloud.metastore.v1.EncryptionConfig * @static - * @param {google.cloud.metastore.v1.IMetadataManagementActivity} message MetadataManagementActivity message or plain object to encode + * @param {google.cloud.metastore.v1.IEncryptionConfig} message EncryptionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataManagementActivity.encode = function encode(message, writer) { + EncryptionConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metadataExports != null && message.metadataExports.length) - for (var i = 0; i < message.metadataExports.length; ++i) - $root.google.cloud.metastore.v1.MetadataExport.encode(message.metadataExports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.restores != null && message.restores.length) - for (var i = 0; i < message.restores.length; ++i) - $root.google.cloud.metastore.v1.Restore.encode(message.restores[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKey); return writer; }; /** - * Encodes the specified MetadataManagementActivity message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataManagementActivity.verify|verify} messages. + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.EncryptionConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.MetadataManagementActivity + * @memberof google.cloud.metastore.v1.EncryptionConfig * @static - * @param {google.cloud.metastore.v1.IMetadataManagementActivity} message MetadataManagementActivity message or plain object to encode + * @param {google.cloud.metastore.v1.IEncryptionConfig} message EncryptionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataManagementActivity.encodeDelimited = function encodeDelimited(message, writer) { + EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetadataManagementActivity message from the specified reader or buffer. + * Decodes an EncryptionConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.MetadataManagementActivity + * @memberof google.cloud.metastore.v1.EncryptionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.MetadataManagementActivity} MetadataManagementActivity + * @returns {google.cloud.metastore.v1.EncryptionConfig} EncryptionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataManagementActivity.decode = function decode(reader, length) { + EncryptionConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.MetadataManagementActivity(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.EncryptionConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.metadataExports && message.metadataExports.length)) - message.metadataExports = []; - message.metadataExports.push($root.google.cloud.metastore.v1.MetadataExport.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.restores && message.restores.length)) - message.restores = []; - message.restores.push($root.google.cloud.metastore.v1.Restore.decode(reader, reader.uint32())); + message.kmsKey = reader.string(); break; } default: @@ -2557,171 +2681,123 @@ }; /** - * Decodes a MetadataManagementActivity message from the specified reader or buffer, length delimited. + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.MetadataManagementActivity + * @memberof google.cloud.metastore.v1.EncryptionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.MetadataManagementActivity} MetadataManagementActivity + * @returns {google.cloud.metastore.v1.EncryptionConfig} EncryptionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataManagementActivity.decodeDelimited = function decodeDelimited(reader) { + EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetadataManagementActivity message. + * Verifies an EncryptionConfig message. * @function verify - * @memberof google.cloud.metastore.v1.MetadataManagementActivity + * @memberof google.cloud.metastore.v1.EncryptionConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetadataManagementActivity.verify = function verify(message) { + EncryptionConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metadataExports != null && message.hasOwnProperty("metadataExports")) { - if (!Array.isArray(message.metadataExports)) - return "metadataExports: array expected"; - for (var i = 0; i < message.metadataExports.length; ++i) { - var error = $root.google.cloud.metastore.v1.MetadataExport.verify(message.metadataExports[i]); - if (error) - return "metadataExports." + error; - } - } - if (message.restores != null && message.hasOwnProperty("restores")) { - if (!Array.isArray(message.restores)) - return "restores: array expected"; - for (var i = 0; i < message.restores.length; ++i) { - var error = $root.google.cloud.metastore.v1.Restore.verify(message.restores[i]); - if (error) - return "restores." + error; - } - } + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + if (!$util.isString(message.kmsKey)) + return "kmsKey: string expected"; return null; }; /** - * Creates a MetadataManagementActivity message from a plain object. Also converts values to their respective internal types. + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.MetadataManagementActivity + * @memberof google.cloud.metastore.v1.EncryptionConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.MetadataManagementActivity} MetadataManagementActivity + * @returns {google.cloud.metastore.v1.EncryptionConfig} EncryptionConfig */ - MetadataManagementActivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.MetadataManagementActivity) + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.EncryptionConfig) return object; - var message = new $root.google.cloud.metastore.v1.MetadataManagementActivity(); - if (object.metadataExports) { - if (!Array.isArray(object.metadataExports)) - throw TypeError(".google.cloud.metastore.v1.MetadataManagementActivity.metadataExports: array expected"); - message.metadataExports = []; - for (var i = 0; i < object.metadataExports.length; ++i) { - if (typeof object.metadataExports[i] !== "object") - throw TypeError(".google.cloud.metastore.v1.MetadataManagementActivity.metadataExports: object expected"); - message.metadataExports[i] = $root.google.cloud.metastore.v1.MetadataExport.fromObject(object.metadataExports[i]); - } - } - if (object.restores) { - if (!Array.isArray(object.restores)) - throw TypeError(".google.cloud.metastore.v1.MetadataManagementActivity.restores: array expected"); - message.restores = []; - for (var i = 0; i < object.restores.length; ++i) { - if (typeof object.restores[i] !== "object") - throw TypeError(".google.cloud.metastore.v1.MetadataManagementActivity.restores: object expected"); - message.restores[i] = $root.google.cloud.metastore.v1.Restore.fromObject(object.restores[i]); - } - } + var message = new $root.google.cloud.metastore.v1.EncryptionConfig(); + if (object.kmsKey != null) + message.kmsKey = String(object.kmsKey); return message; }; /** - * Creates a plain object from a MetadataManagementActivity message. Also converts values to other types if specified. + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.MetadataManagementActivity + * @memberof google.cloud.metastore.v1.EncryptionConfig * @static - * @param {google.cloud.metastore.v1.MetadataManagementActivity} message MetadataManagementActivity + * @param {google.cloud.metastore.v1.EncryptionConfig} message EncryptionConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetadataManagementActivity.toObject = function toObject(message, options) { + EncryptionConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.metadataExports = []; - object.restores = []; - } - if (message.metadataExports && message.metadataExports.length) { - object.metadataExports = []; - for (var j = 0; j < message.metadataExports.length; ++j) - object.metadataExports[j] = $root.google.cloud.metastore.v1.MetadataExport.toObject(message.metadataExports[j], options); - } - if (message.restores && message.restores.length) { - object.restores = []; - for (var j = 0; j < message.restores.length; ++j) - object.restores[j] = $root.google.cloud.metastore.v1.Restore.toObject(message.restores[j], options); - } + if (options.defaults) + object.kmsKey = ""; + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + object.kmsKey = message.kmsKey; return object; }; /** - * Converts this MetadataManagementActivity to JSON. + * Converts this EncryptionConfig to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.MetadataManagementActivity + * @memberof google.cloud.metastore.v1.EncryptionConfig * @instance * @returns {Object.} JSON object */ - MetadataManagementActivity.prototype.toJSON = function toJSON() { + EncryptionConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetadataManagementActivity + * Gets the default type url for EncryptionConfig * @function getTypeUrl - * @memberof google.cloud.metastore.v1.MetadataManagementActivity + * @memberof google.cloud.metastore.v1.EncryptionConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetadataManagementActivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.MetadataManagementActivity"; + return typeUrlPrefix + "/google.cloud.metastore.v1.EncryptionConfig"; }; - return MetadataManagementActivity; + return EncryptionConfig; })(); - v1.MetadataImport = (function() { + v1.NetworkConfig = (function() { /** - * Properties of a MetadataImport. + * Properties of a NetworkConfig. * @memberof google.cloud.metastore.v1 - * @interface IMetadataImport - * @property {google.cloud.metastore.v1.MetadataImport.IDatabaseDump|null} [databaseDump] MetadataImport databaseDump - * @property {string|null} [name] MetadataImport name - * @property {string|null} [description] MetadataImport description - * @property {google.protobuf.ITimestamp|null} [createTime] MetadataImport createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] MetadataImport updateTime - * @property {google.protobuf.ITimestamp|null} [endTime] MetadataImport endTime - * @property {google.cloud.metastore.v1.MetadataImport.State|null} [state] MetadataImport state + * @interface INetworkConfig + * @property {Array.|null} [consumers] NetworkConfig consumers */ /** - * Constructs a new MetadataImport. + * Constructs a new NetworkConfig. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a MetadataImport. - * @implements IMetadataImport + * @classdesc Represents a NetworkConfig. + * @implements INetworkConfig * @constructor - * @param {google.cloud.metastore.v1.IMetadataImport=} [properties] Properties to set + * @param {google.cloud.metastore.v1.INetworkConfig=} [properties] Properties to set */ - function MetadataImport(properties) { + function NetworkConfig(properties) { + this.consumers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2729,173 +2805,78 @@ } /** - * MetadataImport databaseDump. - * @member {google.cloud.metastore.v1.MetadataImport.IDatabaseDump|null|undefined} databaseDump - * @memberof google.cloud.metastore.v1.MetadataImport - * @instance - */ - MetadataImport.prototype.databaseDump = null; - - /** - * MetadataImport name. - * @member {string} name - * @memberof google.cloud.metastore.v1.MetadataImport - * @instance - */ - MetadataImport.prototype.name = ""; - - /** - * MetadataImport description. - * @member {string} description - * @memberof google.cloud.metastore.v1.MetadataImport - * @instance - */ - MetadataImport.prototype.description = ""; - - /** - * MetadataImport createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.metastore.v1.MetadataImport - * @instance - */ - MetadataImport.prototype.createTime = null; - - /** - * MetadataImport updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.metastore.v1.MetadataImport - * @instance - */ - MetadataImport.prototype.updateTime = null; - - /** - * MetadataImport endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.metastore.v1.MetadataImport - * @instance - */ - MetadataImport.prototype.endTime = null; - - /** - * MetadataImport state. - * @member {google.cloud.metastore.v1.MetadataImport.State} state - * @memberof google.cloud.metastore.v1.MetadataImport - * @instance - */ - MetadataImport.prototype.state = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MetadataImport metadata. - * @member {"databaseDump"|undefined} metadata - * @memberof google.cloud.metastore.v1.MetadataImport + * NetworkConfig consumers. + * @member {Array.} consumers + * @memberof google.cloud.metastore.v1.NetworkConfig * @instance */ - Object.defineProperty(MetadataImport.prototype, "metadata", { - get: $util.oneOfGetter($oneOfFields = ["databaseDump"]), - set: $util.oneOfSetter($oneOfFields) - }); + NetworkConfig.prototype.consumers = $util.emptyArray; /** - * Creates a new MetadataImport instance using the specified properties. + * Creates a new NetworkConfig instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.MetadataImport + * @memberof google.cloud.metastore.v1.NetworkConfig * @static - * @param {google.cloud.metastore.v1.IMetadataImport=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.MetadataImport} MetadataImport instance + * @param {google.cloud.metastore.v1.INetworkConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.NetworkConfig} NetworkConfig instance */ - MetadataImport.create = function create(properties) { - return new MetadataImport(properties); + NetworkConfig.create = function create(properties) { + return new NetworkConfig(properties); }; /** - * Encodes the specified MetadataImport message. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.verify|verify} messages. + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.metastore.v1.NetworkConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.MetadataImport + * @memberof google.cloud.metastore.v1.NetworkConfig * @static - * @param {google.cloud.metastore.v1.IMetadataImport} message MetadataImport message or plain object to encode + * @param {google.cloud.metastore.v1.INetworkConfig} message NetworkConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataImport.encode = function encode(message, writer) { + NetworkConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.databaseDump != null && Object.hasOwnProperty.call(message, "databaseDump")) - $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump.encode(message.databaseDump, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.consumers != null && message.consumers.length) + for (var i = 0; i < message.consumers.length; ++i) + $root.google.cloud.metastore.v1.NetworkConfig.Consumer.encode(message.consumers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified MetadataImport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.verify|verify} messages. + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.NetworkConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.MetadataImport + * @memberof google.cloud.metastore.v1.NetworkConfig * @static - * @param {google.cloud.metastore.v1.IMetadataImport} message MetadataImport message or plain object to encode + * @param {google.cloud.metastore.v1.INetworkConfig} message NetworkConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataImport.encodeDelimited = function encodeDelimited(message, writer) { + NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetadataImport message from the specified reader or buffer. + * Decodes a NetworkConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.MetadataImport + * @memberof google.cloud.metastore.v1.NetworkConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.MetadataImport} MetadataImport + * @returns {google.cloud.metastore.v1.NetworkConfig} NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataImport.decode = function decode(reader, length) { + NetworkConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.MetadataImport(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.NetworkConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: { - message.databaseDump = $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump.decode(reader, reader.uint32()); - break; - } case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.state = reader.int32(); + if (!(message.consumers && message.consumers.length)) + message.consumers = []; + message.consumers.push($root.google.cloud.metastore.v1.NetworkConfig.Consumer.decode(reader, reader.uint32())); break; } default: @@ -2907,230 +2888,137 @@ }; /** - * Decodes a MetadataImport message from the specified reader or buffer, length delimited. + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.MetadataImport + * @memberof google.cloud.metastore.v1.NetworkConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.MetadataImport} MetadataImport + * @returns {google.cloud.metastore.v1.NetworkConfig} NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataImport.decodeDelimited = function decodeDelimited(reader) { + NetworkConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetadataImport message. + * Verifies a NetworkConfig message. * @function verify - * @memberof google.cloud.metastore.v1.MetadataImport + * @memberof google.cloud.metastore.v1.NetworkConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetadataImport.verify = function verify(message) { + NetworkConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.databaseDump != null && message.hasOwnProperty("databaseDump")) { - properties.metadata = 1; - { - var error = $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump.verify(message.databaseDump); + if (message.consumers != null && message.hasOwnProperty("consumers")) { + if (!Array.isArray(message.consumers)) + return "consumers: array expected"; + for (var i = 0; i < message.consumers.length; ++i) { + var error = $root.google.cloud.metastore.v1.NetworkConfig.Consumer.verify(message.consumers[i]); if (error) - return "databaseDump." + error; + return "consumers." + error; } } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } return null; }; /** - * Creates a MetadataImport message from a plain object. Also converts values to their respective internal types. + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.MetadataImport + * @memberof google.cloud.metastore.v1.NetworkConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.MetadataImport} MetadataImport + * @returns {google.cloud.metastore.v1.NetworkConfig} NetworkConfig */ - MetadataImport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.MetadataImport) + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.NetworkConfig) return object; - var message = new $root.google.cloud.metastore.v1.MetadataImport(); - if (object.databaseDump != null) { - if (typeof object.databaseDump !== "object") - throw TypeError(".google.cloud.metastore.v1.MetadataImport.databaseDump: object expected"); - message.databaseDump = $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump.fromObject(object.databaseDump); - } - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.metastore.v1.MetadataImport.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.metastore.v1.MetadataImport.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.metastore.v1.MetadataImport.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; + var message = new $root.google.cloud.metastore.v1.NetworkConfig(); + if (object.consumers) { + if (!Array.isArray(object.consumers)) + throw TypeError(".google.cloud.metastore.v1.NetworkConfig.consumers: array expected"); + message.consumers = []; + for (var i = 0; i < object.consumers.length; ++i) { + if (typeof object.consumers[i] !== "object") + throw TypeError(".google.cloud.metastore.v1.NetworkConfig.consumers: object expected"); + message.consumers[i] = $root.google.cloud.metastore.v1.NetworkConfig.Consumer.fromObject(object.consumers[i]); } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "RUNNING": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "FAILED": - case 4: - message.state = 4; - break; } return message; }; /** - * Creates a plain object from a MetadataImport message. Also converts values to other types if specified. + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.MetadataImport + * @memberof google.cloud.metastore.v1.NetworkConfig * @static - * @param {google.cloud.metastore.v1.MetadataImport} message MetadataImport + * @param {google.cloud.metastore.v1.NetworkConfig} message NetworkConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetadataImport.toObject = function toObject(message, options) { + NetworkConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.endTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.metastore.v1.MetadataImport.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1.MetadataImport.State[message.state] : message.state; - if (message.databaseDump != null && message.hasOwnProperty("databaseDump")) { - object.databaseDump = $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump.toObject(message.databaseDump, options); - if (options.oneofs) - object.metadata = "databaseDump"; + if (options.arrays || options.defaults) + object.consumers = []; + if (message.consumers && message.consumers.length) { + object.consumers = []; + for (var j = 0; j < message.consumers.length; ++j) + object.consumers[j] = $root.google.cloud.metastore.v1.NetworkConfig.Consumer.toObject(message.consumers[j], options); } - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); return object; }; /** - * Converts this MetadataImport to JSON. + * Converts this NetworkConfig to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.MetadataImport + * @memberof google.cloud.metastore.v1.NetworkConfig * @instance * @returns {Object.} JSON object */ - MetadataImport.prototype.toJSON = function toJSON() { + NetworkConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetadataImport + * Gets the default type url for NetworkConfig * @function getTypeUrl - * @memberof google.cloud.metastore.v1.MetadataImport + * @memberof google.cloud.metastore.v1.NetworkConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetadataImport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.MetadataImport"; + return typeUrlPrefix + "/google.cloud.metastore.v1.NetworkConfig"; }; - MetadataImport.DatabaseDump = (function() { + NetworkConfig.Consumer = (function() { /** - * Properties of a DatabaseDump. - * @memberof google.cloud.metastore.v1.MetadataImport - * @interface IDatabaseDump - * @property {google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType|null} [databaseType] DatabaseDump databaseType - * @property {string|null} [gcsUri] DatabaseDump gcsUri - * @property {google.cloud.metastore.v1.DatabaseDumpSpec.Type|null} [type] DatabaseDump type + * Properties of a Consumer. + * @memberof google.cloud.metastore.v1.NetworkConfig + * @interface IConsumer + * @property {string|null} [subnetwork] Consumer subnetwork + * @property {string|null} [endpointUri] Consumer endpointUri */ /** - * Constructs a new DatabaseDump. - * @memberof google.cloud.metastore.v1.MetadataImport - * @classdesc Represents a DatabaseDump. - * @implements IDatabaseDump + * Constructs a new Consumer. + * @memberof google.cloud.metastore.v1.NetworkConfig + * @classdesc Represents a Consumer. + * @implements IConsumer * @constructor - * @param {google.cloud.metastore.v1.MetadataImport.IDatabaseDump=} [properties] Properties to set + * @param {google.cloud.metastore.v1.NetworkConfig.IConsumer=} [properties] Properties to set */ - function DatabaseDump(properties) { + function Consumer(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3138,103 +3026,103 @@ } /** - * DatabaseDump databaseType. - * @member {google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType} databaseType - * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * Consumer subnetwork. + * @member {string|null|undefined} subnetwork + * @memberof google.cloud.metastore.v1.NetworkConfig.Consumer * @instance */ - DatabaseDump.prototype.databaseType = 0; + Consumer.prototype.subnetwork = null; /** - * DatabaseDump gcsUri. - * @member {string} gcsUri - * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * Consumer endpointUri. + * @member {string} endpointUri + * @memberof google.cloud.metastore.v1.NetworkConfig.Consumer * @instance */ - DatabaseDump.prototype.gcsUri = ""; + Consumer.prototype.endpointUri = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * DatabaseDump type. - * @member {google.cloud.metastore.v1.DatabaseDumpSpec.Type} type - * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * Consumer vpcResource. + * @member {"subnetwork"|undefined} vpcResource + * @memberof google.cloud.metastore.v1.NetworkConfig.Consumer * @instance */ - DatabaseDump.prototype.type = 0; + Object.defineProperty(Consumer.prototype, "vpcResource", { + get: $util.oneOfGetter($oneOfFields = ["subnetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new DatabaseDump instance using the specified properties. + * Creates a new Consumer instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1.NetworkConfig.Consumer * @static - * @param {google.cloud.metastore.v1.MetadataImport.IDatabaseDump=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.MetadataImport.DatabaseDump} DatabaseDump instance + * @param {google.cloud.metastore.v1.NetworkConfig.IConsumer=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.NetworkConfig.Consumer} Consumer instance */ - DatabaseDump.create = function create(properties) { - return new DatabaseDump(properties); + Consumer.create = function create(properties) { + return new Consumer(properties); }; /** - * Encodes the specified DatabaseDump message. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.DatabaseDump.verify|verify} messages. + * Encodes the specified Consumer message. Does not implicitly {@link google.cloud.metastore.v1.NetworkConfig.Consumer.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1.NetworkConfig.Consumer * @static - * @param {google.cloud.metastore.v1.MetadataImport.IDatabaseDump} message DatabaseDump message or plain object to encode + * @param {google.cloud.metastore.v1.NetworkConfig.IConsumer} message Consumer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseDump.encode = function encode(message, writer) { + Consumer.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.databaseType != null && Object.hasOwnProperty.call(message, "databaseType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.databaseType); - if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsUri); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetwork); + if (message.endpointUri != null && Object.hasOwnProperty.call(message, "endpointUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.endpointUri); return writer; }; /** - * Encodes the specified DatabaseDump message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.DatabaseDump.verify|verify} messages. + * Encodes the specified Consumer message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.NetworkConfig.Consumer.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1.NetworkConfig.Consumer * @static - * @param {google.cloud.metastore.v1.MetadataImport.IDatabaseDump} message DatabaseDump message or plain object to encode + * @param {google.cloud.metastore.v1.NetworkConfig.IConsumer} message Consumer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseDump.encodeDelimited = function encodeDelimited(message, writer) { + Consumer.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DatabaseDump message from the specified reader or buffer. + * Decodes a Consumer message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1.NetworkConfig.Consumer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.MetadataImport.DatabaseDump} DatabaseDump + * @returns {google.cloud.metastore.v1.NetworkConfig.Consumer} Consumer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseDump.decode = function decode(reader, length) { + Consumer.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.NetworkConfig.Consumer(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.databaseType = reader.int32(); - break; - } - case 2: { - message.gcsUri = reader.string(); + message.subnetwork = reader.string(); break; } - case 4: { - message.type = reader.int32(); + case 3: { + message.endpointUri = reader.string(); break; } default: @@ -3246,223 +3134,138 @@ }; /** - * Decodes a DatabaseDump message from the specified reader or buffer, length delimited. + * Decodes a Consumer message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1.NetworkConfig.Consumer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.MetadataImport.DatabaseDump} DatabaseDump + * @returns {google.cloud.metastore.v1.NetworkConfig.Consumer} Consumer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseDump.decodeDelimited = function decodeDelimited(reader) { + Consumer.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DatabaseDump message. + * Verifies a Consumer message. * @function verify - * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1.NetworkConfig.Consumer * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DatabaseDump.verify = function verify(message) { + Consumer.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.databaseType != null && message.hasOwnProperty("databaseType")) - switch (message.databaseType) { - default: - return "databaseType: enum value expected"; - case 0: - case 1: - break; - } - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) - if (!$util.isString(message.gcsUri)) - return "gcsUri: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } + var properties = {}; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + properties.vpcResource = 1; + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + } + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + if (!$util.isString(message.endpointUri)) + return "endpointUri: string expected"; return null; }; /** - * Creates a DatabaseDump message from a plain object. Also converts values to their respective internal types. + * Creates a Consumer message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1.NetworkConfig.Consumer * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.MetadataImport.DatabaseDump} DatabaseDump + * @returns {google.cloud.metastore.v1.NetworkConfig.Consumer} Consumer */ - DatabaseDump.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump) + Consumer.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.NetworkConfig.Consumer) return object; - var message = new $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump(); - switch (object.databaseType) { - default: - if (typeof object.databaseType === "number") { - message.databaseType = object.databaseType; - break; - } - break; - case "DATABASE_TYPE_UNSPECIFIED": - case 0: - message.databaseType = 0; - break; - case "MYSQL": - case 1: - message.databaseType = 1; - break; - } - if (object.gcsUri != null) - message.gcsUri = String(object.gcsUri); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "MYSQL": - case 1: - message.type = 1; - break; - case "AVRO": - case 2: - message.type = 2; - break; - } + var message = new $root.google.cloud.metastore.v1.NetworkConfig.Consumer(); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.endpointUri != null) + message.endpointUri = String(object.endpointUri); return message; }; /** - * Creates a plain object from a DatabaseDump message. Also converts values to other types if specified. + * Creates a plain object from a Consumer message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1.NetworkConfig.Consumer * @static - * @param {google.cloud.metastore.v1.MetadataImport.DatabaseDump} message DatabaseDump + * @param {google.cloud.metastore.v1.NetworkConfig.Consumer} message Consumer * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DatabaseDump.toObject = function toObject(message, options) { + Consumer.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.databaseType = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; - object.gcsUri = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + if (options.defaults) + object.endpointUri = ""; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + object.subnetwork = message.subnetwork; + if (options.oneofs) + object.vpcResource = "subnetwork"; } - if (message.databaseType != null && message.hasOwnProperty("databaseType")) - object.databaseType = options.enums === String ? $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType[message.databaseType] === undefined ? message.databaseType : $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType[message.databaseType] : message.databaseType; - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) - object.gcsUri = message.gcsUri; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.metastore.v1.DatabaseDumpSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.metastore.v1.DatabaseDumpSpec.Type[message.type] : message.type; + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + object.endpointUri = message.endpointUri; return object; }; /** - * Converts this DatabaseDump to JSON. + * Converts this Consumer to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1.NetworkConfig.Consumer * @instance * @returns {Object.} JSON object */ - DatabaseDump.prototype.toJSON = function toJSON() { + Consumer.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DatabaseDump + * Gets the default type url for Consumer * @function getTypeUrl - * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1.NetworkConfig.Consumer * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DatabaseDump.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Consumer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.MetadataImport.DatabaseDump"; + return typeUrlPrefix + "/google.cloud.metastore.v1.NetworkConfig.Consumer"; }; - /** - * DatabaseType enum. - * @name google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType - * @enum {number} - * @property {number} DATABASE_TYPE_UNSPECIFIED=0 DATABASE_TYPE_UNSPECIFIED value - * @property {number} MYSQL=1 MYSQL value - */ - DatabaseDump.DatabaseType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MYSQL"] = 1; - return values; - })(); - - return DatabaseDump; - })(); - - /** - * State enum. - * @name google.cloud.metastore.v1.MetadataImport.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} UPDATING=3 UPDATING value - * @property {number} FAILED=4 FAILED value - */ - MetadataImport.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[4] = "FAILED"] = 4; - return values; + return Consumer; })(); - return MetadataImport; + return NetworkConfig; })(); - v1.MetadataExport = (function() { + v1.TelemetryConfig = (function() { /** - * Properties of a MetadataExport. + * Properties of a TelemetryConfig. * @memberof google.cloud.metastore.v1 - * @interface IMetadataExport - * @property {string|null} [destinationGcsUri] MetadataExport destinationGcsUri - * @property {google.protobuf.ITimestamp|null} [startTime] MetadataExport startTime - * @property {google.protobuf.ITimestamp|null} [endTime] MetadataExport endTime - * @property {google.cloud.metastore.v1.MetadataExport.State|null} [state] MetadataExport state - * @property {google.cloud.metastore.v1.DatabaseDumpSpec.Type|null} [databaseDumpType] MetadataExport databaseDumpType + * @interface ITelemetryConfig + * @property {google.cloud.metastore.v1.TelemetryConfig.LogFormat|null} [logFormat] TelemetryConfig logFormat */ /** - * Constructs a new MetadataExport. + * Constructs a new TelemetryConfig. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a MetadataExport. - * @implements IMetadataExport + * @classdesc Represents a TelemetryConfig. + * @implements ITelemetryConfig * @constructor - * @param {google.cloud.metastore.v1.IMetadataExport=} [properties] Properties to set + * @param {google.cloud.metastore.v1.ITelemetryConfig=} [properties] Properties to set */ - function MetadataExport(properties) { + function TelemetryConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3470,145 +3273,75 @@ } /** - * MetadataExport destinationGcsUri. - * @member {string|null|undefined} destinationGcsUri - * @memberof google.cloud.metastore.v1.MetadataExport - * @instance - */ - MetadataExport.prototype.destinationGcsUri = null; - - /** - * MetadataExport startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.metastore.v1.MetadataExport - * @instance - */ - MetadataExport.prototype.startTime = null; - - /** - * MetadataExport endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.metastore.v1.MetadataExport - * @instance - */ - MetadataExport.prototype.endTime = null; - - /** - * MetadataExport state. - * @member {google.cloud.metastore.v1.MetadataExport.State} state - * @memberof google.cloud.metastore.v1.MetadataExport - * @instance - */ - MetadataExport.prototype.state = 0; - - /** - * MetadataExport databaseDumpType. - * @member {google.cloud.metastore.v1.DatabaseDumpSpec.Type} databaseDumpType - * @memberof google.cloud.metastore.v1.MetadataExport - * @instance - */ - MetadataExport.prototype.databaseDumpType = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MetadataExport destination. - * @member {"destinationGcsUri"|undefined} destination - * @memberof google.cloud.metastore.v1.MetadataExport + * TelemetryConfig logFormat. + * @member {google.cloud.metastore.v1.TelemetryConfig.LogFormat} logFormat + * @memberof google.cloud.metastore.v1.TelemetryConfig * @instance */ - Object.defineProperty(MetadataExport.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["destinationGcsUri"]), - set: $util.oneOfSetter($oneOfFields) - }); + TelemetryConfig.prototype.logFormat = 0; /** - * Creates a new MetadataExport instance using the specified properties. + * Creates a new TelemetryConfig instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.MetadataExport + * @memberof google.cloud.metastore.v1.TelemetryConfig * @static - * @param {google.cloud.metastore.v1.IMetadataExport=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.MetadataExport} MetadataExport instance + * @param {google.cloud.metastore.v1.ITelemetryConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.TelemetryConfig} TelemetryConfig instance */ - MetadataExport.create = function create(properties) { - return new MetadataExport(properties); + TelemetryConfig.create = function create(properties) { + return new TelemetryConfig(properties); }; /** - * Encodes the specified MetadataExport message. Does not implicitly {@link google.cloud.metastore.v1.MetadataExport.verify|verify} messages. + * Encodes the specified TelemetryConfig message. Does not implicitly {@link google.cloud.metastore.v1.TelemetryConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.MetadataExport + * @memberof google.cloud.metastore.v1.TelemetryConfig * @static - * @param {google.cloud.metastore.v1.IMetadataExport} message MetadataExport message or plain object to encode + * @param {google.cloud.metastore.v1.ITelemetryConfig} message TelemetryConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataExport.encode = function encode(message, writer) { + TelemetryConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.destinationGcsUri != null && Object.hasOwnProperty.call(message, "destinationGcsUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationGcsUri); - if (message.databaseDumpType != null && Object.hasOwnProperty.call(message, "databaseDumpType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.databaseDumpType); + if (message.logFormat != null && Object.hasOwnProperty.call(message, "logFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logFormat); return writer; }; /** - * Encodes the specified MetadataExport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataExport.verify|verify} messages. + * Encodes the specified TelemetryConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.TelemetryConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.MetadataExport + * @memberof google.cloud.metastore.v1.TelemetryConfig * @static - * @param {google.cloud.metastore.v1.IMetadataExport} message MetadataExport message or plain object to encode + * @param {google.cloud.metastore.v1.ITelemetryConfig} message TelemetryConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataExport.encodeDelimited = function encodeDelimited(message, writer) { + TelemetryConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetadataExport message from the specified reader or buffer. + * Decodes a TelemetryConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.MetadataExport + * @memberof google.cloud.metastore.v1.TelemetryConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.MetadataExport} MetadataExport + * @returns {google.cloud.metastore.v1.TelemetryConfig} TelemetryConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataExport.decode = function decode(reader, length) { + TelemetryConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.MetadataExport(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.TelemetryConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: { - message.destinationGcsUri = reader.string(); - break; - } case 1: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.state = reader.int32(); - break; - } - case 5: { - message.databaseDumpType = reader.int32(); + message.logFormat = reader.int32(); break; } default: @@ -3620,63 +3353,36 @@ }; /** - * Decodes a MetadataExport message from the specified reader or buffer, length delimited. + * Decodes a TelemetryConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.MetadataExport + * @memberof google.cloud.metastore.v1.TelemetryConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.MetadataExport} MetadataExport + * @returns {google.cloud.metastore.v1.TelemetryConfig} TelemetryConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataExport.decodeDelimited = function decodeDelimited(reader) { + TelemetryConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetadataExport message. + * Verifies a TelemetryConfig message. * @function verify - * @memberof google.cloud.metastore.v1.MetadataExport + * @memberof google.cloud.metastore.v1.TelemetryConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetadataExport.verify = function verify(message) { + TelemetryConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.destinationGcsUri != null && message.hasOwnProperty("destinationGcsUri")) { - properties.destination = 1; - if (!$util.isString(message.destinationGcsUri)) - return "destinationGcsUri: string expected"; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) - switch (message.databaseDumpType) { + if (message.logFormat != null && message.hasOwnProperty("logFormat")) + switch (message.logFormat) { default: - return "databaseDumpType: enum value expected"; + return "logFormat: enum value expected"; case 0: case 1: case 2: @@ -3686,189 +3392,126 @@ }; /** - * Creates a MetadataExport message from a plain object. Also converts values to their respective internal types. + * Creates a TelemetryConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.MetadataExport + * @memberof google.cloud.metastore.v1.TelemetryConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.MetadataExport} MetadataExport + * @returns {google.cloud.metastore.v1.TelemetryConfig} TelemetryConfig */ - MetadataExport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.MetadataExport) + TelemetryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.TelemetryConfig) return object; - var message = new $root.google.cloud.metastore.v1.MetadataExport(); - if (object.destinationGcsUri != null) - message.destinationGcsUri = String(object.destinationGcsUri); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.metastore.v1.MetadataExport.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.metastore.v1.MetadataExport.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "RUNNING": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - case "CANCELLED": - case 4: - message.state = 4; - break; - } - switch (object.databaseDumpType) { + var message = new $root.google.cloud.metastore.v1.TelemetryConfig(); + switch (object.logFormat) { default: - if (typeof object.databaseDumpType === "number") { - message.databaseDumpType = object.databaseDumpType; + if (typeof object.logFormat === "number") { + message.logFormat = object.logFormat; break; } break; - case "TYPE_UNSPECIFIED": + case "LOG_FORMAT_UNSPECIFIED": case 0: - message.databaseDumpType = 0; + message.logFormat = 0; break; - case "MYSQL": + case "LEGACY": case 1: - message.databaseDumpType = 1; + message.logFormat = 1; break; - case "AVRO": + case "JSON": case 2: - message.databaseDumpType = 2; + message.logFormat = 2; break; } return message; }; /** - * Creates a plain object from a MetadataExport message. Also converts values to other types if specified. + * Creates a plain object from a TelemetryConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.MetadataExport + * @memberof google.cloud.metastore.v1.TelemetryConfig * @static - * @param {google.cloud.metastore.v1.MetadataExport} message MetadataExport + * @param {google.cloud.metastore.v1.TelemetryConfig} message TelemetryConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetadataExport.toObject = function toObject(message, options) { + TelemetryConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.startTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.databaseDumpType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.metastore.v1.MetadataExport.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1.MetadataExport.State[message.state] : message.state; - if (message.destinationGcsUri != null && message.hasOwnProperty("destinationGcsUri")) { - object.destinationGcsUri = message.destinationGcsUri; - if (options.oneofs) - object.destination = "destinationGcsUri"; - } - if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) - object.databaseDumpType = options.enums === String ? $root.google.cloud.metastore.v1.DatabaseDumpSpec.Type[message.databaseDumpType] === undefined ? message.databaseDumpType : $root.google.cloud.metastore.v1.DatabaseDumpSpec.Type[message.databaseDumpType] : message.databaseDumpType; + if (options.defaults) + object.logFormat = options.enums === String ? "LOG_FORMAT_UNSPECIFIED" : 0; + if (message.logFormat != null && message.hasOwnProperty("logFormat")) + object.logFormat = options.enums === String ? $root.google.cloud.metastore.v1.TelemetryConfig.LogFormat[message.logFormat] === undefined ? message.logFormat : $root.google.cloud.metastore.v1.TelemetryConfig.LogFormat[message.logFormat] : message.logFormat; return object; }; /** - * Converts this MetadataExport to JSON. + * Converts this TelemetryConfig to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.MetadataExport + * @memberof google.cloud.metastore.v1.TelemetryConfig * @instance * @returns {Object.} JSON object */ - MetadataExport.prototype.toJSON = function toJSON() { + TelemetryConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetadataExport + * Gets the default type url for TelemetryConfig * @function getTypeUrl - * @memberof google.cloud.metastore.v1.MetadataExport + * @memberof google.cloud.metastore.v1.TelemetryConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetadataExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TelemetryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.MetadataExport"; + return typeUrlPrefix + "/google.cloud.metastore.v1.TelemetryConfig"; }; /** - * State enum. - * @name google.cloud.metastore.v1.MetadataExport.State + * LogFormat enum. + * @name google.cloud.metastore.v1.TelemetryConfig.LogFormat * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - * @property {number} CANCELLED=4 CANCELLED value + * @property {number} LOG_FORMAT_UNSPECIFIED=0 LOG_FORMAT_UNSPECIFIED value + * @property {number} LEGACY=1 LEGACY value + * @property {number} JSON=2 JSON value */ - MetadataExport.State = (function() { + TelemetryConfig.LogFormat = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "CANCELLED"] = 4; + values[valuesById[0] = "LOG_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "LEGACY"] = 1; + values[valuesById[2] = "JSON"] = 2; return values; })(); - return MetadataExport; + return TelemetryConfig; })(); - v1.Backup = (function() { + v1.MetadataManagementActivity = (function() { /** - * Properties of a Backup. + * Properties of a MetadataManagementActivity. * @memberof google.cloud.metastore.v1 - * @interface IBackup - * @property {string|null} [name] Backup name - * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime - * @property {google.protobuf.ITimestamp|null} [endTime] Backup endTime - * @property {google.cloud.metastore.v1.Backup.State|null} [state] Backup state - * @property {google.cloud.metastore.v1.IService|null} [serviceRevision] Backup serviceRevision - * @property {string|null} [description] Backup description - * @property {Array.|null} [restoringServices] Backup restoringServices + * @interface IMetadataManagementActivity + * @property {Array.|null} [metadataExports] MetadataManagementActivity metadataExports + * @property {Array.|null} [restores] MetadataManagementActivity restores */ /** - * Constructs a new Backup. + * Constructs a new MetadataManagementActivity. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a Backup. - * @implements IBackup + * @classdesc Represents a MetadataManagementActivity. + * @implements IMetadataManagementActivity * @constructor - * @param {google.cloud.metastore.v1.IBackup=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IMetadataManagementActivity=} [properties] Properties to set */ - function Backup(properties) { - this.restoringServices = []; + function MetadataManagementActivity(properties) { + this.metadataExports = []; + this.restores = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3876,162 +3519,95 @@ } /** - * Backup name. - * @member {string} name - * @memberof google.cloud.metastore.v1.Backup - * @instance - */ - Backup.prototype.name = ""; - - /** - * Backup createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.metastore.v1.Backup - * @instance - */ - Backup.prototype.createTime = null; - - /** - * Backup endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.metastore.v1.Backup - * @instance - */ - Backup.prototype.endTime = null; - - /** - * Backup state. - * @member {google.cloud.metastore.v1.Backup.State} state - * @memberof google.cloud.metastore.v1.Backup - * @instance - */ - Backup.prototype.state = 0; - - /** - * Backup serviceRevision. - * @member {google.cloud.metastore.v1.IService|null|undefined} serviceRevision - * @memberof google.cloud.metastore.v1.Backup - * @instance - */ - Backup.prototype.serviceRevision = null; - - /** - * Backup description. - * @member {string} description - * @memberof google.cloud.metastore.v1.Backup + * MetadataManagementActivity metadataExports. + * @member {Array.} metadataExports + * @memberof google.cloud.metastore.v1.MetadataManagementActivity * @instance */ - Backup.prototype.description = ""; + MetadataManagementActivity.prototype.metadataExports = $util.emptyArray; /** - * Backup restoringServices. - * @member {Array.} restoringServices - * @memberof google.cloud.metastore.v1.Backup + * MetadataManagementActivity restores. + * @member {Array.} restores + * @memberof google.cloud.metastore.v1.MetadataManagementActivity * @instance */ - Backup.prototype.restoringServices = $util.emptyArray; + MetadataManagementActivity.prototype.restores = $util.emptyArray; /** - * Creates a new Backup instance using the specified properties. + * Creates a new MetadataManagementActivity instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.Backup + * @memberof google.cloud.metastore.v1.MetadataManagementActivity * @static - * @param {google.cloud.metastore.v1.IBackup=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.Backup} Backup instance + * @param {google.cloud.metastore.v1.IMetadataManagementActivity=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.MetadataManagementActivity} MetadataManagementActivity instance */ - Backup.create = function create(properties) { - return new Backup(properties); + MetadataManagementActivity.create = function create(properties) { + return new MetadataManagementActivity(properties); }; /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.metastore.v1.Backup.verify|verify} messages. + * Encodes the specified MetadataManagementActivity message. Does not implicitly {@link google.cloud.metastore.v1.MetadataManagementActivity.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.Backup + * @memberof google.cloud.metastore.v1.MetadataManagementActivity * @static - * @param {google.cloud.metastore.v1.IBackup} message Backup message or plain object to encode + * @param {google.cloud.metastore.v1.IMetadataManagementActivity} message MetadataManagementActivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Backup.encode = function encode(message, writer) { + MetadataManagementActivity.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.serviceRevision != null && Object.hasOwnProperty.call(message, "serviceRevision")) - $root.google.cloud.metastore.v1.Service.encode(message.serviceRevision, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.restoringServices != null && message.restoringServices.length) - for (var i = 0; i < message.restoringServices.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.restoringServices[i]); + if (message.metadataExports != null && message.metadataExports.length) + for (var i = 0; i < message.metadataExports.length; ++i) + $root.google.cloud.metastore.v1.MetadataExport.encode(message.metadataExports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.restores != null && message.restores.length) + for (var i = 0; i < message.restores.length; ++i) + $root.google.cloud.metastore.v1.Restore.encode(message.restores[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.Backup.verify|verify} messages. + * Encodes the specified MetadataManagementActivity message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataManagementActivity.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.Backup + * @memberof google.cloud.metastore.v1.MetadataManagementActivity * @static - * @param {google.cloud.metastore.v1.IBackup} message Backup message or plain object to encode + * @param {google.cloud.metastore.v1.IMetadataManagementActivity} message MetadataManagementActivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Backup.encodeDelimited = function encodeDelimited(message, writer) { + MetadataManagementActivity.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Backup message from the specified reader or buffer. + * Decodes a MetadataManagementActivity message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.Backup + * @memberof google.cloud.metastore.v1.MetadataManagementActivity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.Backup} Backup + * @returns {google.cloud.metastore.v1.MetadataManagementActivity} MetadataManagementActivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Backup.decode = function decode(reader, length) { + MetadataManagementActivity.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.Backup(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.MetadataManagementActivity(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.metadataExports && message.metadataExports.length)) + message.metadataExports = []; + message.metadataExports.push($root.google.cloud.metastore.v1.MetadataExport.decode(reader, reader.uint32())); break; } case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.state = reader.int32(); - break; - } - case 5: { - message.serviceRevision = $root.google.cloud.metastore.v1.Service.decode(reader, reader.uint32()); - break; - } - case 6: { - message.description = reader.string(); - break; - } - case 7: { - if (!(message.restoringServices && message.restoringServices.length)) - message.restoringServices = []; - message.restoringServices.push(reader.string()); + if (!(message.restores && message.restores.length)) + message.restores = []; + message.restores.push($root.google.cloud.metastore.v1.Restore.decode(reader, reader.uint32())); break; } default: @@ -4043,265 +3619,171 @@ }; /** - * Decodes a Backup message from the specified reader or buffer, length delimited. + * Decodes a MetadataManagementActivity message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.Backup + * @memberof google.cloud.metastore.v1.MetadataManagementActivity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.Backup} Backup + * @returns {google.cloud.metastore.v1.MetadataManagementActivity} MetadataManagementActivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Backup.decodeDelimited = function decodeDelimited(reader) { + MetadataManagementActivity.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Backup message. + * Verifies a MetadataManagementActivity message. * @function verify - * @memberof google.cloud.metastore.v1.Backup + * @memberof google.cloud.metastore.v1.MetadataManagementActivity * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Backup.verify = function verify(message) { + MetadataManagementActivity.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; + if (message.metadataExports != null && message.hasOwnProperty("metadataExports")) { + if (!Array.isArray(message.metadataExports)) + return "metadataExports: array expected"; + for (var i = 0; i < message.metadataExports.length; ++i) { + var error = $root.google.cloud.metastore.v1.MetadataExport.verify(message.metadataExports[i]); + if (error) + return "metadataExports." + error; } - if (message.serviceRevision != null && message.hasOwnProperty("serviceRevision")) { - var error = $root.google.cloud.metastore.v1.Service.verify(message.serviceRevision); - if (error) - return "serviceRevision." + error; } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.restoringServices != null && message.hasOwnProperty("restoringServices")) { - if (!Array.isArray(message.restoringServices)) - return "restoringServices: array expected"; - for (var i = 0; i < message.restoringServices.length; ++i) - if (!$util.isString(message.restoringServices[i])) - return "restoringServices: string[] expected"; + if (message.restores != null && message.hasOwnProperty("restores")) { + if (!Array.isArray(message.restores)) + return "restores: array expected"; + for (var i = 0; i < message.restores.length; ++i) { + var error = $root.google.cloud.metastore.v1.Restore.verify(message.restores[i]); + if (error) + return "restores." + error; + } } return null; }; /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * Creates a MetadataManagementActivity message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.Backup + * @memberof google.cloud.metastore.v1.MetadataManagementActivity * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.Backup} Backup + * @returns {google.cloud.metastore.v1.MetadataManagementActivity} MetadataManagementActivity */ - Backup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.Backup) + MetadataManagementActivity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.MetadataManagementActivity) return object; - var message = new $root.google.cloud.metastore.v1.Backup(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.metastore.v1.Backup.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.metastore.v1.Backup.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; + var message = new $root.google.cloud.metastore.v1.MetadataManagementActivity(); + if (object.metadataExports) { + if (!Array.isArray(object.metadataExports)) + throw TypeError(".google.cloud.metastore.v1.MetadataManagementActivity.metadataExports: array expected"); + message.metadataExports = []; + for (var i = 0; i < object.metadataExports.length; ++i) { + if (typeof object.metadataExports[i] !== "object") + throw TypeError(".google.cloud.metastore.v1.MetadataManagementActivity.metadataExports: object expected"); + message.metadataExports[i] = $root.google.cloud.metastore.v1.MetadataExport.fromObject(object.metadataExports[i]); } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "DELETING": - case 2: - message.state = 2; - break; - case "ACTIVE": - case 3: - message.state = 3; - break; - case "FAILED": - case 4: - message.state = 4; - break; - case "RESTORING": - case 5: - message.state = 5; - break; - } - if (object.serviceRevision != null) { - if (typeof object.serviceRevision !== "object") - throw TypeError(".google.cloud.metastore.v1.Backup.serviceRevision: object expected"); - message.serviceRevision = $root.google.cloud.metastore.v1.Service.fromObject(object.serviceRevision); } - if (object.description != null) - message.description = String(object.description); - if (object.restoringServices) { - if (!Array.isArray(object.restoringServices)) - throw TypeError(".google.cloud.metastore.v1.Backup.restoringServices: array expected"); - message.restoringServices = []; - for (var i = 0; i < object.restoringServices.length; ++i) - message.restoringServices[i] = String(object.restoringServices[i]); + if (object.restores) { + if (!Array.isArray(object.restores)) + throw TypeError(".google.cloud.metastore.v1.MetadataManagementActivity.restores: array expected"); + message.restores = []; + for (var i = 0; i < object.restores.length; ++i) { + if (typeof object.restores[i] !== "object") + throw TypeError(".google.cloud.metastore.v1.MetadataManagementActivity.restores: object expected"); + message.restores[i] = $root.google.cloud.metastore.v1.Restore.fromObject(object.restores[i]); + } } return message; }; /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. + * Creates a plain object from a MetadataManagementActivity message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.Backup + * @memberof google.cloud.metastore.v1.MetadataManagementActivity * @static - * @param {google.cloud.metastore.v1.Backup} message Backup + * @param {google.cloud.metastore.v1.MetadataManagementActivity} message MetadataManagementActivity * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Backup.toObject = function toObject(message, options) { + MetadataManagementActivity.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.restoringServices = []; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.serviceRevision = null; - object.description = ""; + if (options.arrays || options.defaults) { + object.metadataExports = []; + object.restores = []; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.metastore.v1.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1.Backup.State[message.state] : message.state; - if (message.serviceRevision != null && message.hasOwnProperty("serviceRevision")) - object.serviceRevision = $root.google.cloud.metastore.v1.Service.toObject(message.serviceRevision, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.restoringServices && message.restoringServices.length) { - object.restoringServices = []; - for (var j = 0; j < message.restoringServices.length; ++j) - object.restoringServices[j] = message.restoringServices[j]; + if (message.metadataExports && message.metadataExports.length) { + object.metadataExports = []; + for (var j = 0; j < message.metadataExports.length; ++j) + object.metadataExports[j] = $root.google.cloud.metastore.v1.MetadataExport.toObject(message.metadataExports[j], options); + } + if (message.restores && message.restores.length) { + object.restores = []; + for (var j = 0; j < message.restores.length; ++j) + object.restores[j] = $root.google.cloud.metastore.v1.Restore.toObject(message.restores[j], options); } return object; }; /** - * Converts this Backup to JSON. + * Converts this MetadataManagementActivity to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.Backup + * @memberof google.cloud.metastore.v1.MetadataManagementActivity * @instance * @returns {Object.} JSON object */ - Backup.prototype.toJSON = function toJSON() { + MetadataManagementActivity.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Backup + * Gets the default type url for MetadataManagementActivity * @function getTypeUrl - * @memberof google.cloud.metastore.v1.Backup + * @memberof google.cloud.metastore.v1.MetadataManagementActivity * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MetadataManagementActivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.Backup"; + return typeUrlPrefix + "/google.cloud.metastore.v1.MetadataManagementActivity"; }; - /** - * State enum. - * @name google.cloud.metastore.v1.Backup.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} DELETING=2 DELETING value - * @property {number} ACTIVE=3 ACTIVE value - * @property {number} FAILED=4 FAILED value - * @property {number} RESTORING=5 RESTORING value - */ - Backup.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "DELETING"] = 2; - values[valuesById[3] = "ACTIVE"] = 3; - values[valuesById[4] = "FAILED"] = 4; - values[valuesById[5] = "RESTORING"] = 5; - return values; - })(); - - return Backup; + return MetadataManagementActivity; })(); - v1.Restore = (function() { - - /** - * Properties of a Restore. - * @memberof google.cloud.metastore.v1 - * @interface IRestore - * @property {google.protobuf.ITimestamp|null} [startTime] Restore startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Restore endTime - * @property {google.cloud.metastore.v1.Restore.State|null} [state] Restore state - * @property {string|null} [backup] Restore backup - * @property {google.cloud.metastore.v1.Restore.RestoreType|null} [type] Restore type - * @property {string|null} [details] Restore details - */ + v1.MetadataImport = (function() { /** - * Constructs a new Restore. + * Properties of a MetadataImport. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a Restore. - * @implements IRestore + * @interface IMetadataImport + * @property {google.cloud.metastore.v1.MetadataImport.IDatabaseDump|null} [databaseDump] MetadataImport databaseDump + * @property {string|null} [name] MetadataImport name + * @property {string|null} [description] MetadataImport description + * @property {google.protobuf.ITimestamp|null} [createTime] MetadataImport createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] MetadataImport updateTime + * @property {google.protobuf.ITimestamp|null} [endTime] MetadataImport endTime + * @property {google.cloud.metastore.v1.MetadataImport.State|null} [state] MetadataImport state + */ + + /** + * Constructs a new MetadataImport. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents a MetadataImport. + * @implements IMetadataImport * @constructor - * @param {google.cloud.metastore.v1.IRestore=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IMetadataImport=} [properties] Properties to set */ - function Restore(properties) { + function MetadataImport(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4309,145 +3791,173 @@ } /** - * Restore startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.metastore.v1.Restore + * MetadataImport databaseDump. + * @member {google.cloud.metastore.v1.MetadataImport.IDatabaseDump|null|undefined} databaseDump + * @memberof google.cloud.metastore.v1.MetadataImport * @instance */ - Restore.prototype.startTime = null; + MetadataImport.prototype.databaseDump = null; /** - * Restore endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.metastore.v1.Restore + * MetadataImport name. + * @member {string} name + * @memberof google.cloud.metastore.v1.MetadataImport * @instance */ - Restore.prototype.endTime = null; + MetadataImport.prototype.name = ""; /** - * Restore state. - * @member {google.cloud.metastore.v1.Restore.State} state - * @memberof google.cloud.metastore.v1.Restore + * MetadataImport description. + * @member {string} description + * @memberof google.cloud.metastore.v1.MetadataImport * @instance */ - Restore.prototype.state = 0; + MetadataImport.prototype.description = ""; /** - * Restore backup. - * @member {string} backup - * @memberof google.cloud.metastore.v1.Restore + * MetadataImport createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.metastore.v1.MetadataImport * @instance */ - Restore.prototype.backup = ""; + MetadataImport.prototype.createTime = null; /** - * Restore type. - * @member {google.cloud.metastore.v1.Restore.RestoreType} type - * @memberof google.cloud.metastore.v1.Restore + * MetadataImport updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.metastore.v1.MetadataImport * @instance */ - Restore.prototype.type = 0; + MetadataImport.prototype.updateTime = null; /** - * Restore details. - * @member {string} details - * @memberof google.cloud.metastore.v1.Restore + * MetadataImport endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1.MetadataImport * @instance */ - Restore.prototype.details = ""; + MetadataImport.prototype.endTime = null; /** - * Creates a new Restore instance using the specified properties. + * MetadataImport state. + * @member {google.cloud.metastore.v1.MetadataImport.State} state + * @memberof google.cloud.metastore.v1.MetadataImport + * @instance + */ + MetadataImport.prototype.state = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MetadataImport metadata. + * @member {"databaseDump"|undefined} metadata + * @memberof google.cloud.metastore.v1.MetadataImport + * @instance + */ + Object.defineProperty(MetadataImport.prototype, "metadata", { + get: $util.oneOfGetter($oneOfFields = ["databaseDump"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MetadataImport instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.Restore + * @memberof google.cloud.metastore.v1.MetadataImport * @static - * @param {google.cloud.metastore.v1.IRestore=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.Restore} Restore instance + * @param {google.cloud.metastore.v1.IMetadataImport=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.MetadataImport} MetadataImport instance */ - Restore.create = function create(properties) { - return new Restore(properties); + MetadataImport.create = function create(properties) { + return new MetadataImport(properties); }; /** - * Encodes the specified Restore message. Does not implicitly {@link google.cloud.metastore.v1.Restore.verify|verify} messages. + * Encodes the specified MetadataImport message. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.Restore + * @memberof google.cloud.metastore.v1.MetadataImport * @static - * @param {google.cloud.metastore.v1.IRestore} message Restore message or plain object to encode + * @param {google.cloud.metastore.v1.IMetadataImport} message MetadataImport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Restore.encode = function encode(message, writer) { + MetadataImport.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.backup); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.details != null && Object.hasOwnProperty.call(message, "details")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.details); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.databaseDump != null && Object.hasOwnProperty.call(message, "databaseDump")) + $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump.encode(message.databaseDump, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified Restore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.Restore.verify|verify} messages. + * Encodes the specified MetadataImport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.Restore + * @memberof google.cloud.metastore.v1.MetadataImport * @static - * @param {google.cloud.metastore.v1.IRestore} message Restore message or plain object to encode + * @param {google.cloud.metastore.v1.IMetadataImport} message MetadataImport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Restore.encodeDelimited = function encodeDelimited(message, writer) { + MetadataImport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Restore message from the specified reader or buffer. + * Decodes a MetadataImport message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.Restore + * @memberof google.cloud.metastore.v1.MetadataImport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.Restore} Restore + * @returns {google.cloud.metastore.v1.MetadataImport} MetadataImport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Restore.decode = function decode(reader, length) { + MetadataImport.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.Restore(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.MetadataImport(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 6: { + message.databaseDump = $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump.decode(reader, reader.uint32()); + break; + } case 1: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.description = reader.string(); break; } case 3: { - message.state = reader.int32(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - message.backup = reader.string(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 5: { - message.type = reader.int32(); + case 7: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 6: { - message.details = reader.string(); + case 5: { + message.state = reader.int32(); break; } default: @@ -4459,36 +3969,56 @@ }; /** - * Decodes a Restore message from the specified reader or buffer, length delimited. + * Decodes a MetadataImport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.Restore + * @memberof google.cloud.metastore.v1.MetadataImport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.Restore} Restore + * @returns {google.cloud.metastore.v1.MetadataImport} MetadataImport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Restore.decodeDelimited = function decodeDelimited(reader) { + MetadataImport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Restore message. + * Verifies a MetadataImport message. * @function verify - * @memberof google.cloud.metastore.v1.Restore + * @memberof google.cloud.metastore.v1.MetadataImport * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Restore.verify = function verify(message) { + MetadataImport.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); + var properties = {}; + if (message.databaseDump != null && message.hasOwnProperty("databaseDump")) { + properties.metadata = 1; + { + var error = $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump.verify(message.databaseDump); + if (error) + return "databaseDump." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "startTime." + error; + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; } if (message.endTime != null && message.hasOwnProperty("endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime); @@ -4506,44 +4036,43 @@ case 4: break; } - if (message.backup != null && message.hasOwnProperty("backup")) - if (!$util.isString(message.backup)) - return "backup: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.details != null && message.hasOwnProperty("details")) - if (!$util.isString(message.details)) - return "details: string expected"; return null; }; /** - * Creates a Restore message from a plain object. Also converts values to their respective internal types. + * Creates a MetadataImport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.Restore + * @memberof google.cloud.metastore.v1.MetadataImport * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.Restore} Restore + * @returns {google.cloud.metastore.v1.MetadataImport} MetadataImport */ - Restore.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.Restore) + MetadataImport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.MetadataImport) return object; - var message = new $root.google.cloud.metastore.v1.Restore(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.metastore.v1.Restore.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + var message = new $root.google.cloud.metastore.v1.MetadataImport(); + if (object.databaseDump != null) { + if (typeof object.databaseDump !== "object") + throw TypeError(".google.cloud.metastore.v1.MetadataImport.databaseDump: object expected"); + message.databaseDump = $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump.fromObject(object.databaseDump); + } + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.metastore.v1.MetadataImport.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.metastore.v1.MetadataImport.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } if (object.endTime != null) { if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.metastore.v1.Restore.endTime: object expected"); + throw TypeError(".google.cloud.metastore.v1.MetadataImport.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } switch (object.state) { @@ -4565,297 +4094,583 @@ case 2: message.state = 2; break; - case "FAILED": + case "UPDATING": case 3: message.state = 3; break; - case "CANCELLED": + case "FAILED": case 4: message.state = 4; break; } - if (object.backup != null) - message.backup = String(object.backup); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "RESTORE_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "FULL": - case 1: - message.type = 1; - break; - case "METADATA_ONLY": - case 2: - message.type = 2; - break; - } - if (object.details != null) - message.details = String(object.details); return message; }; /** - * Creates a plain object from a Restore message. Also converts values to other types if specified. + * Creates a plain object from a MetadataImport message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.Restore + * @memberof google.cloud.metastore.v1.MetadataImport * @static - * @param {google.cloud.metastore.v1.Restore} message Restore + * @param {google.cloud.metastore.v1.MetadataImport} message MetadataImport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Restore.toObject = function toObject(message, options) { + MetadataImport.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.startTime = null; - object.endTime = null; + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.backup = ""; - object.type = options.enums === String ? "RESTORE_TYPE_UNSPECIFIED" : 0; - object.details = ""; + object.endTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1.MetadataImport.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1.MetadataImport.State[message.state] : message.state; + if (message.databaseDump != null && message.hasOwnProperty("databaseDump")) { + object.databaseDump = $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump.toObject(message.databaseDump, options); + if (options.oneofs) + object.metadata = "databaseDump"; } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); if (message.endTime != null && message.hasOwnProperty("endTime")) object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.metastore.v1.Restore.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1.Restore.State[message.state] : message.state; - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = message.backup; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.metastore.v1.Restore.RestoreType[message.type] === undefined ? message.type : $root.google.cloud.metastore.v1.Restore.RestoreType[message.type] : message.type; - if (message.details != null && message.hasOwnProperty("details")) - object.details = message.details; return object; }; /** - * Converts this Restore to JSON. + * Converts this MetadataImport to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.Restore + * @memberof google.cloud.metastore.v1.MetadataImport * @instance * @returns {Object.} JSON object */ - Restore.prototype.toJSON = function toJSON() { + MetadataImport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Restore + * Gets the default type url for MetadataImport * @function getTypeUrl - * @memberof google.cloud.metastore.v1.Restore + * @memberof google.cloud.metastore.v1.MetadataImport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Restore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MetadataImport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.Restore"; + return typeUrlPrefix + "/google.cloud.metastore.v1.MetadataImport"; }; - /** - * State enum. - * @name google.cloud.metastore.v1.Restore.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - * @property {number} CANCELLED=4 CANCELLED value - */ - Restore.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "CANCELLED"] = 4; - return values; - })(); - - /** - * RestoreType enum. - * @name google.cloud.metastore.v1.Restore.RestoreType - * @enum {number} - * @property {number} RESTORE_TYPE_UNSPECIFIED=0 RESTORE_TYPE_UNSPECIFIED value - * @property {number} FULL=1 FULL value - * @property {number} METADATA_ONLY=2 METADATA_ONLY value - */ - Restore.RestoreType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESTORE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FULL"] = 1; - values[valuesById[2] = "METADATA_ONLY"] = 2; - return values; - })(); + MetadataImport.DatabaseDump = (function() { - return Restore; - })(); + /** + * Properties of a DatabaseDump. + * @memberof google.cloud.metastore.v1.MetadataImport + * @interface IDatabaseDump + * @property {google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType|null} [databaseType] DatabaseDump databaseType + * @property {string|null} [gcsUri] DatabaseDump gcsUri + * @property {google.cloud.metastore.v1.DatabaseDumpSpec.Type|null} [type] DatabaseDump type + */ - v1.ListServicesRequest = (function() { + /** + * Constructs a new DatabaseDump. + * @memberof google.cloud.metastore.v1.MetadataImport + * @classdesc Represents a DatabaseDump. + * @implements IDatabaseDump + * @constructor + * @param {google.cloud.metastore.v1.MetadataImport.IDatabaseDump=} [properties] Properties to set + */ + function DatabaseDump(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a ListServicesRequest. - * @memberof google.cloud.metastore.v1 - * @interface IListServicesRequest - * @property {string|null} [parent] ListServicesRequest parent - * @property {number|null} [pageSize] ListServicesRequest pageSize - * @property {string|null} [pageToken] ListServicesRequest pageToken - * @property {string|null} [filter] ListServicesRequest filter - * @property {string|null} [orderBy] ListServicesRequest orderBy - */ + /** + * DatabaseDump databaseType. + * @member {google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType} databaseType + * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @instance + */ + DatabaseDump.prototype.databaseType = 0; - /** - * Constructs a new ListServicesRequest. - * @memberof google.cloud.metastore.v1 - * @classdesc Represents a ListServicesRequest. - * @implements IListServicesRequest - * @constructor - * @param {google.cloud.metastore.v1.IListServicesRequest=} [properties] Properties to set - */ - function ListServicesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * DatabaseDump gcsUri. + * @member {string} gcsUri + * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @instance + */ + DatabaseDump.prototype.gcsUri = ""; - /** - * ListServicesRequest parent. - * @member {string} parent - * @memberof google.cloud.metastore.v1.ListServicesRequest - * @instance - */ - ListServicesRequest.prototype.parent = ""; + /** + * DatabaseDump type. + * @member {google.cloud.metastore.v1.DatabaseDumpSpec.Type} type + * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @instance + */ + DatabaseDump.prototype.type = 0; - /** - * ListServicesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.metastore.v1.ListServicesRequest - * @instance - */ - ListServicesRequest.prototype.pageSize = 0; + /** + * Creates a new DatabaseDump instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @static + * @param {google.cloud.metastore.v1.MetadataImport.IDatabaseDump=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.MetadataImport.DatabaseDump} DatabaseDump instance + */ + DatabaseDump.create = function create(properties) { + return new DatabaseDump(properties); + }; - /** - * ListServicesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.metastore.v1.ListServicesRequest - * @instance - */ - ListServicesRequest.prototype.pageToken = ""; + /** + * Encodes the specified DatabaseDump message. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.DatabaseDump.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @static + * @param {google.cloud.metastore.v1.MetadataImport.IDatabaseDump} message DatabaseDump message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseDump.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.databaseType != null && Object.hasOwnProperty.call(message, "databaseType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.databaseType); + if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsUri); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + return writer; + }; - /** - * ListServicesRequest filter. - * @member {string} filter - * @memberof google.cloud.metastore.v1.ListServicesRequest - * @instance - */ - ListServicesRequest.prototype.filter = ""; + /** + * Encodes the specified DatabaseDump message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataImport.DatabaseDump.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @static + * @param {google.cloud.metastore.v1.MetadataImport.IDatabaseDump} message DatabaseDump message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseDump.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseDump message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1.MetadataImport.DatabaseDump} DatabaseDump + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseDump.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.databaseType = reader.int32(); + break; + } + case 2: { + message.gcsUri = reader.string(); + break; + } + case 4: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseDump message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1.MetadataImport.DatabaseDump} DatabaseDump + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseDump.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseDump message. + * @function verify + * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseDump.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.databaseType != null && message.hasOwnProperty("databaseType")) + switch (message.databaseType) { + default: + return "databaseType: enum value expected"; + case 0: + case 1: + break; + } + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) + if (!$util.isString(message.gcsUri)) + return "gcsUri: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a DatabaseDump message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1.MetadataImport.DatabaseDump} DatabaseDump + */ + DatabaseDump.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump) + return object; + var message = new $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump(); + switch (object.databaseType) { + default: + if (typeof object.databaseType === "number") { + message.databaseType = object.databaseType; + break; + } + break; + case "DATABASE_TYPE_UNSPECIFIED": + case 0: + message.databaseType = 0; + break; + case "MYSQL": + case 1: + message.databaseType = 1; + break; + } + if (object.gcsUri != null) + message.gcsUri = String(object.gcsUri); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "MYSQL": + case 1: + message.type = 1; + break; + case "AVRO": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DatabaseDump message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @static + * @param {google.cloud.metastore.v1.MetadataImport.DatabaseDump} message DatabaseDump + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseDump.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.databaseType = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; + object.gcsUri = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.databaseType != null && message.hasOwnProperty("databaseType")) + object.databaseType = options.enums === String ? $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType[message.databaseType] === undefined ? message.databaseType : $root.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType[message.databaseType] : message.databaseType; + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) + object.gcsUri = message.gcsUri; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.metastore.v1.DatabaseDumpSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.metastore.v1.DatabaseDumpSpec.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this DatabaseDump to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @instance + * @returns {Object.} JSON object + */ + DatabaseDump.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseDump + * @function getTypeUrl + * @memberof google.cloud.metastore.v1.MetadataImport.DatabaseDump + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseDump.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1.MetadataImport.DatabaseDump"; + }; + + /** + * DatabaseType enum. + * @name google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType + * @enum {number} + * @property {number} DATABASE_TYPE_UNSPECIFIED=0 DATABASE_TYPE_UNSPECIFIED value + * @property {number} MYSQL=1 MYSQL value + */ + DatabaseDump.DatabaseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MYSQL"] = 1; + return values; + })(); + + return DatabaseDump; + })(); /** - * ListServicesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.metastore.v1.ListServicesRequest + * State enum. + * @name google.cloud.metastore.v1.MetadataImport.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} UPDATING=3 UPDATING value + * @property {number} FAILED=4 FAILED value + */ + MetadataImport.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "FAILED"] = 4; + return values; + })(); + + return MetadataImport; + })(); + + v1.MetadataExport = (function() { + + /** + * Properties of a MetadataExport. + * @memberof google.cloud.metastore.v1 + * @interface IMetadataExport + * @property {string|null} [destinationGcsUri] MetadataExport destinationGcsUri + * @property {google.protobuf.ITimestamp|null} [startTime] MetadataExport startTime + * @property {google.protobuf.ITimestamp|null} [endTime] MetadataExport endTime + * @property {google.cloud.metastore.v1.MetadataExport.State|null} [state] MetadataExport state + * @property {google.cloud.metastore.v1.DatabaseDumpSpec.Type|null} [databaseDumpType] MetadataExport databaseDumpType + */ + + /** + * Constructs a new MetadataExport. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents a MetadataExport. + * @implements IMetadataExport + * @constructor + * @param {google.cloud.metastore.v1.IMetadataExport=} [properties] Properties to set + */ + function MetadataExport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetadataExport destinationGcsUri. + * @member {string|null|undefined} destinationGcsUri + * @memberof google.cloud.metastore.v1.MetadataExport * @instance */ - ListServicesRequest.prototype.orderBy = ""; + MetadataExport.prototype.destinationGcsUri = null; /** - * Creates a new ListServicesRequest instance using the specified properties. + * MetadataExport startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.metastore.v1.MetadataExport + * @instance + */ + MetadataExport.prototype.startTime = null; + + /** + * MetadataExport endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1.MetadataExport + * @instance + */ + MetadataExport.prototype.endTime = null; + + /** + * MetadataExport state. + * @member {google.cloud.metastore.v1.MetadataExport.State} state + * @memberof google.cloud.metastore.v1.MetadataExport + * @instance + */ + MetadataExport.prototype.state = 0; + + /** + * MetadataExport databaseDumpType. + * @member {google.cloud.metastore.v1.DatabaseDumpSpec.Type} databaseDumpType + * @memberof google.cloud.metastore.v1.MetadataExport + * @instance + */ + MetadataExport.prototype.databaseDumpType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MetadataExport destination. + * @member {"destinationGcsUri"|undefined} destination + * @memberof google.cloud.metastore.v1.MetadataExport + * @instance + */ + Object.defineProperty(MetadataExport.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["destinationGcsUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MetadataExport instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.ListServicesRequest + * @memberof google.cloud.metastore.v1.MetadataExport * @static - * @param {google.cloud.metastore.v1.IListServicesRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.ListServicesRequest} ListServicesRequest instance + * @param {google.cloud.metastore.v1.IMetadataExport=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.MetadataExport} MetadataExport instance */ - ListServicesRequest.create = function create(properties) { - return new ListServicesRequest(properties); + MetadataExport.create = function create(properties) { + return new MetadataExport(properties); }; /** - * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.cloud.metastore.v1.ListServicesRequest.verify|verify} messages. + * Encodes the specified MetadataExport message. Does not implicitly {@link google.cloud.metastore.v1.MetadataExport.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.ListServicesRequest + * @memberof google.cloud.metastore.v1.MetadataExport * @static - * @param {google.cloud.metastore.v1.IListServicesRequest} message ListServicesRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IMetadataExport} message MetadataExport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesRequest.encode = function encode(message, writer) { + MetadataExport.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.destinationGcsUri != null && Object.hasOwnProperty.call(message, "destinationGcsUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationGcsUri); + if (message.databaseDumpType != null && Object.hasOwnProperty.call(message, "databaseDumpType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.databaseDumpType); return writer; }; /** - * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListServicesRequest.verify|verify} messages. + * Encodes the specified MetadataExport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.MetadataExport.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.ListServicesRequest + * @memberof google.cloud.metastore.v1.MetadataExport * @static - * @param {google.cloud.metastore.v1.IListServicesRequest} message ListServicesRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IMetadataExport} message MetadataExport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesRequest.encodeDelimited = function encodeDelimited(message, writer) { + MetadataExport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListServicesRequest message from the specified reader or buffer. + * Decodes a MetadataExport message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.ListServicesRequest + * @memberof google.cloud.metastore.v1.MetadataExport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.ListServicesRequest} ListServicesRequest + * @returns {google.cloud.metastore.v1.MetadataExport} MetadataExport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesRequest.decode = function decode(reader, length) { + MetadataExport.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ListServicesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.MetadataExport(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: { + message.destinationGcsUri = reader.string(); + break; + } case 1: { - message.parent = reader.string(); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.pageSize = reader.int32(); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); + message.state = reader.int32(); break; } case 5: { - message.orderBy = reader.string(); + message.databaseDumpType = reader.int32(); break; } default: @@ -4867,159 +4682,255 @@ }; /** - * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. + * Decodes a MetadataExport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.ListServicesRequest + * @memberof google.cloud.metastore.v1.MetadataExport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.ListServicesRequest} ListServicesRequest + * @returns {google.cloud.metastore.v1.MetadataExport} MetadataExport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesRequest.decodeDelimited = function decodeDelimited(reader) { + MetadataExport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListServicesRequest message. + * Verifies a MetadataExport message. * @function verify - * @memberof google.cloud.metastore.v1.ListServicesRequest + * @memberof google.cloud.metastore.v1.MetadataExport * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListServicesRequest.verify = function verify(message) { + MetadataExport.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + var properties = {}; + if (message.destinationGcsUri != null && message.hasOwnProperty("destinationGcsUri")) { + properties.destination = 1; + if (!$util.isString(message.destinationGcsUri)) + return "destinationGcsUri: string expected"; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) + switch (message.databaseDumpType) { + default: + return "databaseDumpType: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MetadataExport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.ListServicesRequest + * @memberof google.cloud.metastore.v1.MetadataExport * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.ListServicesRequest} ListServicesRequest + * @returns {google.cloud.metastore.v1.MetadataExport} MetadataExport */ - ListServicesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.ListServicesRequest) + MetadataExport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.MetadataExport) return object; - var message = new $root.google.cloud.metastore.v1.ListServicesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1.ListServicesRequest - * @static - * @param {google.cloud.metastore.v1.ListServicesRequest} message ListServicesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListServicesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + var message = new $root.google.cloud.metastore.v1.MetadataExport(); + if (object.destinationGcsUri != null) + message.destinationGcsUri = String(object.destinationGcsUri); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.metastore.v1.MetadataExport.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.metastore.v1.MetadataExport.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + case "CANCELLED": + case 4: + message.state = 4; + break; + } + switch (object.databaseDumpType) { + default: + if (typeof object.databaseDumpType === "number") { + message.databaseDumpType = object.databaseDumpType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.databaseDumpType = 0; + break; + case "MYSQL": + case 1: + message.databaseDumpType = 1; + break; + case "AVRO": + case 2: + message.databaseDumpType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a MetadataExport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1.MetadataExport + * @static + * @param {google.cloud.metastore.v1.MetadataExport} message MetadataExport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetadataExport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.databaseDumpType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1.MetadataExport.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1.MetadataExport.State[message.state] : message.state; + if (message.destinationGcsUri != null && message.hasOwnProperty("destinationGcsUri")) { + object.destinationGcsUri = message.destinationGcsUri; + if (options.oneofs) + object.destination = "destinationGcsUri"; + } + if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) + object.databaseDumpType = options.enums === String ? $root.google.cloud.metastore.v1.DatabaseDumpSpec.Type[message.databaseDumpType] === undefined ? message.databaseDumpType : $root.google.cloud.metastore.v1.DatabaseDumpSpec.Type[message.databaseDumpType] : message.databaseDumpType; return object; }; /** - * Converts this ListServicesRequest to JSON. + * Converts this MetadataExport to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.ListServicesRequest + * @memberof google.cloud.metastore.v1.MetadataExport * @instance * @returns {Object.} JSON object */ - ListServicesRequest.prototype.toJSON = function toJSON() { + MetadataExport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListServicesRequest + * Gets the default type url for MetadataExport * @function getTypeUrl - * @memberof google.cloud.metastore.v1.ListServicesRequest + * @memberof google.cloud.metastore.v1.MetadataExport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListServicesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MetadataExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.ListServicesRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.MetadataExport"; }; - return ListServicesRequest; + /** + * State enum. + * @name google.cloud.metastore.v1.MetadataExport.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} CANCELLED=4 CANCELLED value + */ + MetadataExport.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "CANCELLED"] = 4; + return values; + })(); + + return MetadataExport; })(); - v1.ListServicesResponse = (function() { + v1.Backup = (function() { /** - * Properties of a ListServicesResponse. + * Properties of a Backup. * @memberof google.cloud.metastore.v1 - * @interface IListServicesResponse - * @property {Array.|null} [services] ListServicesResponse services - * @property {string|null} [nextPageToken] ListServicesResponse nextPageToken - * @property {Array.|null} [unreachable] ListServicesResponse unreachable + * @interface IBackup + * @property {string|null} [name] Backup name + * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime + * @property {google.protobuf.ITimestamp|null} [endTime] Backup endTime + * @property {google.cloud.metastore.v1.Backup.State|null} [state] Backup state + * @property {google.cloud.metastore.v1.IService|null} [serviceRevision] Backup serviceRevision + * @property {string|null} [description] Backup description + * @property {Array.|null} [restoringServices] Backup restoringServices */ /** - * Constructs a new ListServicesResponse. + * Constructs a new Backup. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a ListServicesResponse. - * @implements IListServicesResponse + * @classdesc Represents a Backup. + * @implements IBackup * @constructor - * @param {google.cloud.metastore.v1.IListServicesResponse=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IBackup=} [properties] Properties to set */ - function ListServicesResponse(properties) { - this.services = []; - this.unreachable = []; + function Backup(properties) { + this.restoringServices = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5027,109 +4938,162 @@ } /** - * ListServicesResponse services. - * @member {Array.} services - * @memberof google.cloud.metastore.v1.ListServicesResponse + * Backup name. + * @member {string} name + * @memberof google.cloud.metastore.v1.Backup * @instance */ - ListServicesResponse.prototype.services = $util.emptyArray; + Backup.prototype.name = ""; /** - * ListServicesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.metastore.v1.ListServicesResponse + * Backup createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.metastore.v1.Backup * @instance */ - ListServicesResponse.prototype.nextPageToken = ""; + Backup.prototype.createTime = null; /** - * ListServicesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.metastore.v1.ListServicesResponse + * Backup endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1.Backup * @instance */ - ListServicesResponse.prototype.unreachable = $util.emptyArray; + Backup.prototype.endTime = null; /** - * Creates a new ListServicesResponse instance using the specified properties. + * Backup state. + * @member {google.cloud.metastore.v1.Backup.State} state + * @memberof google.cloud.metastore.v1.Backup + * @instance + */ + Backup.prototype.state = 0; + + /** + * Backup serviceRevision. + * @member {google.cloud.metastore.v1.IService|null|undefined} serviceRevision + * @memberof google.cloud.metastore.v1.Backup + * @instance + */ + Backup.prototype.serviceRevision = null; + + /** + * Backup description. + * @member {string} description + * @memberof google.cloud.metastore.v1.Backup + * @instance + */ + Backup.prototype.description = ""; + + /** + * Backup restoringServices. + * @member {Array.} restoringServices + * @memberof google.cloud.metastore.v1.Backup + * @instance + */ + Backup.prototype.restoringServices = $util.emptyArray; + + /** + * Creates a new Backup instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.ListServicesResponse + * @memberof google.cloud.metastore.v1.Backup * @static - * @param {google.cloud.metastore.v1.IListServicesResponse=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.ListServicesResponse} ListServicesResponse instance + * @param {google.cloud.metastore.v1.IBackup=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.Backup} Backup instance */ - ListServicesResponse.create = function create(properties) { - return new ListServicesResponse(properties); + Backup.create = function create(properties) { + return new Backup(properties); }; /** - * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.cloud.metastore.v1.ListServicesResponse.verify|verify} messages. + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.metastore.v1.Backup.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.ListServicesResponse + * @memberof google.cloud.metastore.v1.Backup * @static - * @param {google.cloud.metastore.v1.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {google.cloud.metastore.v1.IBackup} message Backup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesResponse.encode = function encode(message, writer) { + Backup.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.services != null && message.services.length) - for (var i = 0; i < message.services.length; ++i) - $root.google.cloud.metastore.v1.Service.encode(message.services[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.serviceRevision != null && Object.hasOwnProperty.call(message, "serviceRevision")) + $root.google.cloud.metastore.v1.Service.encode(message.serviceRevision, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.restoringServices != null && message.restoringServices.length) + for (var i = 0; i < message.restoringServices.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.restoringServices[i]); return writer; }; /** - * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListServicesResponse.verify|verify} messages. + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.Backup.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.ListServicesResponse + * @memberof google.cloud.metastore.v1.Backup * @static - * @param {google.cloud.metastore.v1.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {google.cloud.metastore.v1.IBackup} message Backup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesResponse.encodeDelimited = function encodeDelimited(message, writer) { + Backup.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListServicesResponse message from the specified reader or buffer. + * Decodes a Backup message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.ListServicesResponse + * @memberof google.cloud.metastore.v1.Backup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.ListServicesResponse} ListServicesResponse + * @returns {google.cloud.metastore.v1.Backup} Backup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesResponse.decode = function decode(reader, length) { + Backup.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ListServicesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.Backup(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.services && message.services.length)) - message.services = []; - message.services.push($root.google.cloud.metastore.v1.Service.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.serviceRevision = $root.google.cloud.metastore.v1.Service.decode(reader, reader.uint32()); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + if (!(message.restoringServices && message.restoringServices.length)) + message.restoringServices = []; + message.restoringServices.push(reader.string()); break; } default: @@ -5141,169 +5105,265 @@ }; /** - * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. + * Decodes a Backup message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.ListServicesResponse + * @memberof google.cloud.metastore.v1.Backup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.ListServicesResponse} ListServicesResponse + * @returns {google.cloud.metastore.v1.Backup} Backup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesResponse.decodeDelimited = function decodeDelimited(reader) { + Backup.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListServicesResponse message. + * Verifies a Backup message. * @function verify - * @memberof google.cloud.metastore.v1.ListServicesResponse + * @memberof google.cloud.metastore.v1.Backup * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListServicesResponse.verify = function verify(message) { + Backup.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.services != null && message.hasOwnProperty("services")) { - if (!Array.isArray(message.services)) - return "services: array expected"; - for (var i = 0; i < message.services.length; ++i) { - var error = $root.google.cloud.metastore.v1.Service.verify(message.services[i]); - if (error) - return "services." + error; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; } + if (message.serviceRevision != null && message.hasOwnProperty("serviceRevision")) { + var error = $root.google.cloud.metastore.v1.Service.verify(message.serviceRevision); + if (error) + return "serviceRevision." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.restoringServices != null && message.hasOwnProperty("restoringServices")) { + if (!Array.isArray(message.restoringServices)) + return "restoringServices: array expected"; + for (var i = 0; i < message.restoringServices.length; ++i) + if (!$util.isString(message.restoringServices[i])) + return "restoringServices: string[] expected"; } return null; }; /** - * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Backup message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.ListServicesResponse + * @memberof google.cloud.metastore.v1.Backup * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.ListServicesResponse} ListServicesResponse + * @returns {google.cloud.metastore.v1.Backup} Backup */ - ListServicesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.ListServicesResponse) + Backup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.Backup) return object; - var message = new $root.google.cloud.metastore.v1.ListServicesResponse(); - if (object.services) { - if (!Array.isArray(object.services)) - throw TypeError(".google.cloud.metastore.v1.ListServicesResponse.services: array expected"); - message.services = []; - for (var i = 0; i < object.services.length; ++i) { - if (typeof object.services[i] !== "object") - throw TypeError(".google.cloud.metastore.v1.ListServicesResponse.services: object expected"); - message.services[i] = $root.google.cloud.metastore.v1.Service.fromObject(object.services[i]); + var message = new $root.google.cloud.metastore.v1.Backup(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.metastore.v1.Backup.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.metastore.v1.Backup.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "DELETING": + case 2: + message.state = 2; + break; + case "ACTIVE": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "RESTORING": + case 5: + message.state = 5; + break; } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.metastore.v1.ListServicesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); + if (object.serviceRevision != null) { + if (typeof object.serviceRevision !== "object") + throw TypeError(".google.cloud.metastore.v1.Backup.serviceRevision: object expected"); + message.serviceRevision = $root.google.cloud.metastore.v1.Service.fromObject(object.serviceRevision); + } + if (object.description != null) + message.description = String(object.description); + if (object.restoringServices) { + if (!Array.isArray(object.restoringServices)) + throw TypeError(".google.cloud.metastore.v1.Backup.restoringServices: array expected"); + message.restoringServices = []; + for (var i = 0; i < object.restoringServices.length; ++i) + message.restoringServices[i] = String(object.restoringServices[i]); } return message; }; /** - * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. + * Creates a plain object from a Backup message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.ListServicesResponse + * @memberof google.cloud.metastore.v1.Backup * @static - * @param {google.cloud.metastore.v1.ListServicesResponse} message ListServicesResponse + * @param {google.cloud.metastore.v1.Backup} message Backup * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListServicesResponse.toObject = function toObject(message, options) { + Backup.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.services = []; - object.unreachable = []; + if (options.arrays || options.defaults) + object.restoringServices = []; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.serviceRevision = null; + object.description = ""; } - if (options.defaults) - object.nextPageToken = ""; - if (message.services && message.services.length) { - object.services = []; - for (var j = 0; j < message.services.length; ++j) - object.services[j] = $root.google.cloud.metastore.v1.Service.toObject(message.services[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1.Backup.State[message.state] : message.state; + if (message.serviceRevision != null && message.hasOwnProperty("serviceRevision")) + object.serviceRevision = $root.google.cloud.metastore.v1.Service.toObject(message.serviceRevision, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.restoringServices && message.restoringServices.length) { + object.restoringServices = []; + for (var j = 0; j < message.restoringServices.length; ++j) + object.restoringServices[j] = message.restoringServices[j]; } return object; }; /** - * Converts this ListServicesResponse to JSON. + * Converts this Backup to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.ListServicesResponse + * @memberof google.cloud.metastore.v1.Backup * @instance * @returns {Object.} JSON object */ - ListServicesResponse.prototype.toJSON = function toJSON() { + Backup.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListServicesResponse + * Gets the default type url for Backup * @function getTypeUrl - * @memberof google.cloud.metastore.v1.ListServicesResponse + * @memberof google.cloud.metastore.v1.Backup * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListServicesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.ListServicesResponse"; + return typeUrlPrefix + "/google.cloud.metastore.v1.Backup"; }; - return ListServicesResponse; + /** + * State enum. + * @name google.cloud.metastore.v1.Backup.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} DELETING=2 DELETING value + * @property {number} ACTIVE=3 ACTIVE value + * @property {number} FAILED=4 FAILED value + * @property {number} RESTORING=5 RESTORING value + */ + Backup.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "DELETING"] = 2; + values[valuesById[3] = "ACTIVE"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "RESTORING"] = 5; + return values; + })(); + + return Backup; })(); - v1.GetServiceRequest = (function() { + v1.Restore = (function() { /** - * Properties of a GetServiceRequest. + * Properties of a Restore. * @memberof google.cloud.metastore.v1 - * @interface IGetServiceRequest - * @property {string|null} [name] GetServiceRequest name + * @interface IRestore + * @property {google.protobuf.ITimestamp|null} [startTime] Restore startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Restore endTime + * @property {google.cloud.metastore.v1.Restore.State|null} [state] Restore state + * @property {string|null} [backup] Restore backup + * @property {google.cloud.metastore.v1.Restore.RestoreType|null} [type] Restore type + * @property {string|null} [details] Restore details */ /** - * Constructs a new GetServiceRequest. + * Constructs a new Restore. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a GetServiceRequest. - * @implements IGetServiceRequest + * @classdesc Represents a Restore. + * @implements IRestore * @constructor - * @param {google.cloud.metastore.v1.IGetServiceRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IRestore=} [properties] Properties to set */ - function GetServiceRequest(properties) { + function Restore(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5311,75 +5371,145 @@ } /** - * GetServiceRequest name. - * @member {string} name - * @memberof google.cloud.metastore.v1.GetServiceRequest + * Restore startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.metastore.v1.Restore * @instance */ - GetServiceRequest.prototype.name = ""; + Restore.prototype.startTime = null; /** - * Creates a new GetServiceRequest instance using the specified properties. + * Restore endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1.Restore + * @instance + */ + Restore.prototype.endTime = null; + + /** + * Restore state. + * @member {google.cloud.metastore.v1.Restore.State} state + * @memberof google.cloud.metastore.v1.Restore + * @instance + */ + Restore.prototype.state = 0; + + /** + * Restore backup. + * @member {string} backup + * @memberof google.cloud.metastore.v1.Restore + * @instance + */ + Restore.prototype.backup = ""; + + /** + * Restore type. + * @member {google.cloud.metastore.v1.Restore.RestoreType} type + * @memberof google.cloud.metastore.v1.Restore + * @instance + */ + Restore.prototype.type = 0; + + /** + * Restore details. + * @member {string} details + * @memberof google.cloud.metastore.v1.Restore + * @instance + */ + Restore.prototype.details = ""; + + /** + * Creates a new Restore instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.GetServiceRequest + * @memberof google.cloud.metastore.v1.Restore * @static - * @param {google.cloud.metastore.v1.IGetServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.GetServiceRequest} GetServiceRequest instance + * @param {google.cloud.metastore.v1.IRestore=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.Restore} Restore instance */ - GetServiceRequest.create = function create(properties) { - return new GetServiceRequest(properties); + Restore.create = function create(properties) { + return new Restore(properties); }; /** - * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.GetServiceRequest.verify|verify} messages. + * Encodes the specified Restore message. Does not implicitly {@link google.cloud.metastore.v1.Restore.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.GetServiceRequest + * @memberof google.cloud.metastore.v1.Restore * @static - * @param {google.cloud.metastore.v1.IGetServiceRequest} message GetServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IRestore} message Restore message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetServiceRequest.encode = function encode(message, writer) { + Restore.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.backup); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.details); return writer; }; /** - * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.GetServiceRequest.verify|verify} messages. + * Encodes the specified Restore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.Restore.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.GetServiceRequest + * @memberof google.cloud.metastore.v1.Restore * @static - * @param {google.cloud.metastore.v1.IGetServiceRequest} message GetServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IRestore} message Restore message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + Restore.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetServiceRequest message from the specified reader or buffer. + * Decodes a Restore message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.GetServiceRequest + * @memberof google.cloud.metastore.v1.Restore * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.GetServiceRequest} GetServiceRequest + * @returns {google.cloud.metastore.v1.Restore} Restore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetServiceRequest.decode = function decode(reader, length) { + Restore.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.GetServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.Restore(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.backup = reader.string(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.details = reader.string(); break; } default: @@ -5391,125 +5521,271 @@ }; /** - * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a Restore message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.GetServiceRequest + * @memberof google.cloud.metastore.v1.Restore * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.GetServiceRequest} GetServiceRequest + * @returns {google.cloud.metastore.v1.Restore} Restore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetServiceRequest.decodeDelimited = function decodeDelimited(reader) { + Restore.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetServiceRequest message. + * Verifies a Restore message. * @function verify - * @memberof google.cloud.metastore.v1.GetServiceRequest + * @memberof google.cloud.metastore.v1.Restore * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetServiceRequest.verify = function verify(message) { + Restore.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.backup != null && message.hasOwnProperty("backup")) + if (!$util.isString(message.backup)) + return "backup: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.details != null && message.hasOwnProperty("details")) + if (!$util.isString(message.details)) + return "details: string expected"; return null; }; /** - * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Restore message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.GetServiceRequest + * @memberof google.cloud.metastore.v1.Restore * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.GetServiceRequest} GetServiceRequest + * @returns {google.cloud.metastore.v1.Restore} Restore */ - GetServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.GetServiceRequest) + Restore.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.Restore) return object; - var message = new $root.google.cloud.metastore.v1.GetServiceRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.metastore.v1.Restore(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.metastore.v1.Restore.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.metastore.v1.Restore.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + case "CANCELLED": + case 4: + message.state = 4; + break; + } + if (object.backup != null) + message.backup = String(object.backup); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "RESTORE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "FULL": + case 1: + message.type = 1; + break; + case "METADATA_ONLY": + case 2: + message.type = 2; + break; + } + if (object.details != null) + message.details = String(object.details); return message; }; /** - * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a Restore message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.GetServiceRequest + * @memberof google.cloud.metastore.v1.Restore * @static - * @param {google.cloud.metastore.v1.GetServiceRequest} message GetServiceRequest + * @param {google.cloud.metastore.v1.Restore} message Restore * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetServiceRequest.toObject = function toObject(message, options) { + Restore.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.backup = ""; + object.type = options.enums === String ? "RESTORE_TYPE_UNSPECIFIED" : 0; + object.details = ""; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1.Restore.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1.Restore.State[message.state] : message.state; + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = message.backup; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.metastore.v1.Restore.RestoreType[message.type] === undefined ? message.type : $root.google.cloud.metastore.v1.Restore.RestoreType[message.type] : message.type; + if (message.details != null && message.hasOwnProperty("details")) + object.details = message.details; return object; }; /** - * Converts this GetServiceRequest to JSON. + * Converts this Restore to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.GetServiceRequest + * @memberof google.cloud.metastore.v1.Restore * @instance * @returns {Object.} JSON object */ - GetServiceRequest.prototype.toJSON = function toJSON() { + Restore.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetServiceRequest + * Gets the default type url for Restore * @function getTypeUrl - * @memberof google.cloud.metastore.v1.GetServiceRequest + * @memberof google.cloud.metastore.v1.Restore * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Restore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.GetServiceRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.Restore"; }; - return GetServiceRequest; + /** + * State enum. + * @name google.cloud.metastore.v1.Restore.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} CANCELLED=4 CANCELLED value + */ + Restore.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "CANCELLED"] = 4; + return values; + })(); + + /** + * RestoreType enum. + * @name google.cloud.metastore.v1.Restore.RestoreType + * @enum {number} + * @property {number} RESTORE_TYPE_UNSPECIFIED=0 RESTORE_TYPE_UNSPECIFIED value + * @property {number} FULL=1 FULL value + * @property {number} METADATA_ONLY=2 METADATA_ONLY value + */ + Restore.RestoreType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTORE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FULL"] = 1; + values[valuesById[2] = "METADATA_ONLY"] = 2; + return values; + })(); + + return Restore; })(); - v1.CreateServiceRequest = (function() { + v1.ListServicesRequest = (function() { /** - * Properties of a CreateServiceRequest. + * Properties of a ListServicesRequest. * @memberof google.cloud.metastore.v1 - * @interface ICreateServiceRequest - * @property {string|null} [parent] CreateServiceRequest parent - * @property {string|null} [serviceId] CreateServiceRequest serviceId - * @property {google.cloud.metastore.v1.IService|null} [service] CreateServiceRequest service - * @property {string|null} [requestId] CreateServiceRequest requestId + * @interface IListServicesRequest + * @property {string|null} [parent] ListServicesRequest parent + * @property {number|null} [pageSize] ListServicesRequest pageSize + * @property {string|null} [pageToken] ListServicesRequest pageToken + * @property {string|null} [filter] ListServicesRequest filter + * @property {string|null} [orderBy] ListServicesRequest orderBy */ /** - * Constructs a new CreateServiceRequest. + * Constructs a new ListServicesRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a CreateServiceRequest. - * @implements ICreateServiceRequest + * @classdesc Represents a ListServicesRequest. + * @implements IListServicesRequest * @constructor - * @param {google.cloud.metastore.v1.ICreateServiceRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IListServicesRequest=} [properties] Properties to set */ - function CreateServiceRequest(properties) { + function ListServicesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5517,100 +5793,110 @@ } /** - * CreateServiceRequest parent. + * ListServicesRequest parent. * @member {string} parent - * @memberof google.cloud.metastore.v1.CreateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesRequest * @instance */ - CreateServiceRequest.prototype.parent = ""; + ListServicesRequest.prototype.parent = ""; /** - * CreateServiceRequest serviceId. - * @member {string} serviceId - * @memberof google.cloud.metastore.v1.CreateServiceRequest + * ListServicesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.metastore.v1.ListServicesRequest * @instance */ - CreateServiceRequest.prototype.serviceId = ""; + ListServicesRequest.prototype.pageSize = 0; /** - * CreateServiceRequest service. - * @member {google.cloud.metastore.v1.IService|null|undefined} service - * @memberof google.cloud.metastore.v1.CreateServiceRequest + * ListServicesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.metastore.v1.ListServicesRequest * @instance */ - CreateServiceRequest.prototype.service = null; + ListServicesRequest.prototype.pageToken = ""; /** - * CreateServiceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1.CreateServiceRequest + * ListServicesRequest filter. + * @member {string} filter + * @memberof google.cloud.metastore.v1.ListServicesRequest * @instance */ - CreateServiceRequest.prototype.requestId = ""; + ListServicesRequest.prototype.filter = ""; /** - * Creates a new CreateServiceRequest instance using the specified properties. + * ListServicesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.metastore.v1.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListServicesRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.CreateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesRequest * @static - * @param {google.cloud.metastore.v1.ICreateServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.CreateServiceRequest} CreateServiceRequest instance + * @param {google.cloud.metastore.v1.IListServicesRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.ListServicesRequest} ListServicesRequest instance */ - CreateServiceRequest.create = function create(properties) { - return new CreateServiceRequest(properties); + ListServicesRequest.create = function create(properties) { + return new ListServicesRequest(properties); }; /** - * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.CreateServiceRequest.verify|verify} messages. + * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.cloud.metastore.v1.ListServicesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.CreateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesRequest * @static - * @param {google.cloud.metastore.v1.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IListServicesRequest} message ListServicesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateServiceRequest.encode = function encode(message, writer) { + ListServicesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.serviceId != null && Object.hasOwnProperty.call(message, "serviceId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceId); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - $root.google.cloud.metastore.v1.Service.encode(message.service, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.CreateServiceRequest.verify|verify} messages. + * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListServicesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.CreateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesRequest * @static - * @param {google.cloud.metastore.v1.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IListServicesRequest} message ListServicesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListServicesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer. + * Decodes a ListServicesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.CreateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.CreateServiceRequest} CreateServiceRequest + * @returns {google.cloud.metastore.v1.ListServicesRequest} ListServicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateServiceRequest.decode = function decode(reader, length) { + ListServicesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.CreateServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ListServicesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -5619,15 +5905,19 @@ break; } case 2: { - message.serviceId = reader.string(); + message.pageSize = reader.int32(); break; } case 3: { - message.service = $root.google.cloud.metastore.v1.Service.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } case 4: { - message.requestId = reader.string(); + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -5639,154 +5929,159 @@ }; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.CreateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.CreateServiceRequest} CreateServiceRequest + * @returns {google.cloud.metastore.v1.ListServicesRequest} ListServicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateServiceRequest.decodeDelimited = function decodeDelimited(reader) { + ListServicesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateServiceRequest message. + * Verifies a ListServicesRequest message. * @function verify - * @memberof google.cloud.metastore.v1.CreateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateServiceRequest.verify = function verify(message) { + ListServicesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.serviceId != null && message.hasOwnProperty("serviceId")) - if (!$util.isString(message.serviceId)) - return "serviceId: string expected"; - if (message.service != null && message.hasOwnProperty("service")) { - var error = $root.google.cloud.metastore.v1.Service.verify(message.service); - if (error) - return "service." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.CreateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.CreateServiceRequest} CreateServiceRequest + * @returns {google.cloud.metastore.v1.ListServicesRequest} ListServicesRequest */ - CreateServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.CreateServiceRequest) + ListServicesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.ListServicesRequest) return object; - var message = new $root.google.cloud.metastore.v1.CreateServiceRequest(); + var message = new $root.google.cloud.metastore.v1.ListServicesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.serviceId != null) - message.serviceId = String(object.serviceId); - if (object.service != null) { - if (typeof object.service !== "object") - throw TypeError(".google.cloud.metastore.v1.CreateServiceRequest.service: object expected"); - message.service = $root.google.cloud.metastore.v1.Service.fromObject(object.service); - } - if (object.requestId != null) - message.requestId = String(object.requestId); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.CreateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesRequest * @static - * @param {google.cloud.metastore.v1.CreateServiceRequest} message CreateServiceRequest + * @param {google.cloud.metastore.v1.ListServicesRequest} message ListServicesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateServiceRequest.toObject = function toObject(message, options) { + ListServicesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.serviceId = ""; - object.service = null; - object.requestId = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.serviceId != null && message.hasOwnProperty("serviceId")) - object.serviceId = message.serviceId; - if (message.service != null && message.hasOwnProperty("service")) - object.service = $root.google.cloud.metastore.v1.Service.toObject(message.service, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this CreateServiceRequest to JSON. + * Converts this ListServicesRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.CreateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesRequest * @instance * @returns {Object.} JSON object */ - CreateServiceRequest.prototype.toJSON = function toJSON() { + ListServicesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateServiceRequest + * Gets the default type url for ListServicesRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.CreateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListServicesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.CreateServiceRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.ListServicesRequest"; }; - return CreateServiceRequest; + return ListServicesRequest; })(); - v1.UpdateServiceRequest = (function() { + v1.ListServicesResponse = (function() { /** - * Properties of an UpdateServiceRequest. + * Properties of a ListServicesResponse. * @memberof google.cloud.metastore.v1 - * @interface IUpdateServiceRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateServiceRequest updateMask - * @property {google.cloud.metastore.v1.IService|null} [service] UpdateServiceRequest service - * @property {string|null} [requestId] UpdateServiceRequest requestId + * @interface IListServicesResponse + * @property {Array.|null} [services] ListServicesResponse services + * @property {string|null} [nextPageToken] ListServicesResponse nextPageToken + * @property {Array.|null} [unreachable] ListServicesResponse unreachable */ /** - * Constructs a new UpdateServiceRequest. + * Constructs a new ListServicesResponse. * @memberof google.cloud.metastore.v1 - * @classdesc Represents an UpdateServiceRequest. - * @implements IUpdateServiceRequest + * @classdesc Represents a ListServicesResponse. + * @implements IListServicesResponse * @constructor - * @param {google.cloud.metastore.v1.IUpdateServiceRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IListServicesResponse=} [properties] Properties to set */ - function UpdateServiceRequest(properties) { + function ListServicesResponse(properties) { + this.services = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5794,103 +6089,109 @@ } /** - * UpdateServiceRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.metastore.v1.UpdateServiceRequest + * ListServicesResponse services. + * @member {Array.} services + * @memberof google.cloud.metastore.v1.ListServicesResponse * @instance */ - UpdateServiceRequest.prototype.updateMask = null; + ListServicesResponse.prototype.services = $util.emptyArray; /** - * UpdateServiceRequest service. - * @member {google.cloud.metastore.v1.IService|null|undefined} service - * @memberof google.cloud.metastore.v1.UpdateServiceRequest + * ListServicesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.metastore.v1.ListServicesResponse * @instance */ - UpdateServiceRequest.prototype.service = null; + ListServicesResponse.prototype.nextPageToken = ""; /** - * UpdateServiceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1.UpdateServiceRequest + * ListServicesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.metastore.v1.ListServicesResponse * @instance */ - UpdateServiceRequest.prototype.requestId = ""; + ListServicesResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new UpdateServiceRequest instance using the specified properties. + * Creates a new ListServicesResponse instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.UpdateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesResponse * @static - * @param {google.cloud.metastore.v1.IUpdateServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.UpdateServiceRequest} UpdateServiceRequest instance + * @param {google.cloud.metastore.v1.IListServicesResponse=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.ListServicesResponse} ListServicesResponse instance */ - UpdateServiceRequest.create = function create(properties) { - return new UpdateServiceRequest(properties); + ListServicesResponse.create = function create(properties) { + return new ListServicesResponse(properties); }; /** - * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.UpdateServiceRequest.verify|verify} messages. + * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.cloud.metastore.v1.ListServicesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.UpdateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesResponse * @static - * @param {google.cloud.metastore.v1.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IListServicesResponse} message ListServicesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateServiceRequest.encode = function encode(message, writer) { + ListServicesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - $root.google.cloud.metastore.v1.Service.encode(message.service, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.services != null && message.services.length) + for (var i = 0; i < message.services.length; ++i) + $root.google.cloud.metastore.v1.Service.encode(message.services[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.UpdateServiceRequest.verify|verify} messages. + * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListServicesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.UpdateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesResponse * @static - * @param {google.cloud.metastore.v1.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IListServicesResponse} message ListServicesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListServicesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer. + * Decodes a ListServicesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.UpdateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.UpdateServiceRequest} UpdateServiceRequest + * @returns {google.cloud.metastore.v1.ListServicesResponse} ListServicesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateServiceRequest.decode = function decode(reader, length) { + ListServicesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.UpdateServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ListServicesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + if (!(message.services && message.services.length)) + message.services = []; + message.services.push($root.google.cloud.metastore.v1.Service.decode(reader, reader.uint32())); break; } case 2: { - message.service = $root.google.cloud.metastore.v1.Service.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } case 3: { - message.requestId = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -5902,150 +6203,169 @@ }; /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.UpdateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.UpdateServiceRequest} UpdateServiceRequest + * @returns {google.cloud.metastore.v1.ListServicesResponse} ListServicesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateServiceRequest.decodeDelimited = function decodeDelimited(reader) { + ListServicesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateServiceRequest message. + * Verifies a ListServicesResponse message. * @function verify - * @memberof google.cloud.metastore.v1.UpdateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateServiceRequest.verify = function verify(message) { + ListServicesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.services != null && message.hasOwnProperty("services")) { + if (!Array.isArray(message.services)) + return "services: array expected"; + for (var i = 0; i < message.services.length; ++i) { + var error = $root.google.cloud.metastore.v1.Service.verify(message.services[i]); + if (error) + return "services." + error; + } } - if (message.service != null && message.hasOwnProperty("service")) { - var error = $root.google.cloud.metastore.v1.Service.verify(message.service); - if (error) - return "service." + error; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates an UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.UpdateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.UpdateServiceRequest} UpdateServiceRequest + * @returns {google.cloud.metastore.v1.ListServicesResponse} ListServicesResponse */ - UpdateServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.UpdateServiceRequest) + ListServicesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.ListServicesResponse) return object; - var message = new $root.google.cloud.metastore.v1.UpdateServiceRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.metastore.v1.UpdateServiceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.metastore.v1.ListServicesResponse(); + if (object.services) { + if (!Array.isArray(object.services)) + throw TypeError(".google.cloud.metastore.v1.ListServicesResponse.services: array expected"); + message.services = []; + for (var i = 0; i < object.services.length; ++i) { + if (typeof object.services[i] !== "object") + throw TypeError(".google.cloud.metastore.v1.ListServicesResponse.services: object expected"); + message.services[i] = $root.google.cloud.metastore.v1.Service.fromObject(object.services[i]); + } } - if (object.service != null) { - if (typeof object.service !== "object") - throw TypeError(".google.cloud.metastore.v1.UpdateServiceRequest.service: object expected"); - message.service = $root.google.cloud.metastore.v1.Service.fromObject(object.service); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.metastore.v1.ListServicesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.UpdateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesResponse * @static - * @param {google.cloud.metastore.v1.UpdateServiceRequest} message UpdateServiceRequest + * @param {google.cloud.metastore.v1.ListServicesResponse} message ListServicesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateServiceRequest.toObject = function toObject(message, options) { + ListServicesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.service = null; - object.requestId = ""; + if (options.arrays || options.defaults) { + object.services = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.services && message.services.length) { + object.services = []; + for (var j = 0; j < message.services.length; ++j) + object.services[j] = $root.google.cloud.metastore.v1.Service.toObject(message.services[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.service != null && message.hasOwnProperty("service")) - object.service = $root.google.cloud.metastore.v1.Service.toObject(message.service, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; return object; }; /** - * Converts this UpdateServiceRequest to JSON. + * Converts this ListServicesResponse to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.UpdateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesResponse * @instance * @returns {Object.} JSON object */ - UpdateServiceRequest.prototype.toJSON = function toJSON() { + ListServicesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateServiceRequest + * Gets the default type url for ListServicesResponse * @function getTypeUrl - * @memberof google.cloud.metastore.v1.UpdateServiceRequest + * @memberof google.cloud.metastore.v1.ListServicesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListServicesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.UpdateServiceRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.ListServicesResponse"; }; - return UpdateServiceRequest; + return ListServicesResponse; })(); - v1.DeleteServiceRequest = (function() { + v1.GetServiceRequest = (function() { /** - * Properties of a DeleteServiceRequest. + * Properties of a GetServiceRequest. * @memberof google.cloud.metastore.v1 - * @interface IDeleteServiceRequest - * @property {string|null} [name] DeleteServiceRequest name - * @property {string|null} [requestId] DeleteServiceRequest requestId + * @interface IGetServiceRequest + * @property {string|null} [name] GetServiceRequest name */ /** - * Constructs a new DeleteServiceRequest. + * Constructs a new GetServiceRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a DeleteServiceRequest. - * @implements IDeleteServiceRequest + * @classdesc Represents a GetServiceRequest. + * @implements IGetServiceRequest * @constructor - * @param {google.cloud.metastore.v1.IDeleteServiceRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IGetServiceRequest=} [properties] Properties to set */ - function DeleteServiceRequest(properties) { + function GetServiceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6053,80 +6373,70 @@ } /** - * DeleteServiceRequest name. + * GetServiceRequest name. * @member {string} name - * @memberof google.cloud.metastore.v1.DeleteServiceRequest - * @instance - */ - DeleteServiceRequest.prototype.name = ""; - - /** - * DeleteServiceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1.DeleteServiceRequest + * @memberof google.cloud.metastore.v1.GetServiceRequest * @instance */ - DeleteServiceRequest.prototype.requestId = ""; + GetServiceRequest.prototype.name = ""; /** - * Creates a new DeleteServiceRequest instance using the specified properties. + * Creates a new GetServiceRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.DeleteServiceRequest + * @memberof google.cloud.metastore.v1.GetServiceRequest * @static - * @param {google.cloud.metastore.v1.IDeleteServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.DeleteServiceRequest} DeleteServiceRequest instance + * @param {google.cloud.metastore.v1.IGetServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.GetServiceRequest} GetServiceRequest instance */ - DeleteServiceRequest.create = function create(properties) { - return new DeleteServiceRequest(properties); + GetServiceRequest.create = function create(properties) { + return new GetServiceRequest(properties); }; /** - * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.DeleteServiceRequest.verify|verify} messages. + * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.GetServiceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.DeleteServiceRequest + * @memberof google.cloud.metastore.v1.GetServiceRequest * @static - * @param {google.cloud.metastore.v1.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IGetServiceRequest} message GetServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteServiceRequest.encode = function encode(message, writer) { + GetServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.DeleteServiceRequest.verify|verify} messages. + * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.GetServiceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.DeleteServiceRequest + * @memberof google.cloud.metastore.v1.GetServiceRequest * @static - * @param {google.cloud.metastore.v1.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IGetServiceRequest} message GetServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * Decodes a GetServiceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.DeleteServiceRequest + * @memberof google.cloud.metastore.v1.GetServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.DeleteServiceRequest} DeleteServiceRequest + * @returns {google.cloud.metastore.v1.GetServiceRequest} GetServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteServiceRequest.decode = function decode(reader, length) { + GetServiceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.DeleteServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.GetServiceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -6134,10 +6444,6 @@ message.name = reader.string(); break; } - case 2: { - message.requestId = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -6147,135 +6453,125 @@ }; /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.DeleteServiceRequest + * @memberof google.cloud.metastore.v1.GetServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.DeleteServiceRequest} DeleteServiceRequest + * @returns {google.cloud.metastore.v1.GetServiceRequest} GetServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteServiceRequest.decodeDelimited = function decodeDelimited(reader) { + GetServiceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteServiceRequest message. + * Verifies a GetServiceRequest message. * @function verify - * @memberof google.cloud.metastore.v1.DeleteServiceRequest + * @memberof google.cloud.metastore.v1.GetServiceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteServiceRequest.verify = function verify(message) { + GetServiceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.DeleteServiceRequest + * @memberof google.cloud.metastore.v1.GetServiceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.DeleteServiceRequest} DeleteServiceRequest + * @returns {google.cloud.metastore.v1.GetServiceRequest} GetServiceRequest */ - DeleteServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.DeleteServiceRequest) + GetServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.GetServiceRequest) return object; - var message = new $root.google.cloud.metastore.v1.DeleteServiceRequest(); + var message = new $root.google.cloud.metastore.v1.GetServiceRequest(); if (object.name != null) message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.DeleteServiceRequest + * @memberof google.cloud.metastore.v1.GetServiceRequest * @static - * @param {google.cloud.metastore.v1.DeleteServiceRequest} message DeleteServiceRequest + * @param {google.cloud.metastore.v1.GetServiceRequest} message GetServiceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteServiceRequest.toObject = function toObject(message, options) { + GetServiceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.requestId = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; return object; }; /** - * Converts this DeleteServiceRequest to JSON. + * Converts this GetServiceRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.DeleteServiceRequest + * @memberof google.cloud.metastore.v1.GetServiceRequest * @instance * @returns {Object.} JSON object */ - DeleteServiceRequest.prototype.toJSON = function toJSON() { + GetServiceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteServiceRequest + * Gets the default type url for GetServiceRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.DeleteServiceRequest + * @memberof google.cloud.metastore.v1.GetServiceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.DeleteServiceRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.GetServiceRequest"; }; - return DeleteServiceRequest; + return GetServiceRequest; })(); - v1.ListMetadataImportsRequest = (function() { + v1.CreateServiceRequest = (function() { /** - * Properties of a ListMetadataImportsRequest. + * Properties of a CreateServiceRequest. * @memberof google.cloud.metastore.v1 - * @interface IListMetadataImportsRequest - * @property {string|null} [parent] ListMetadataImportsRequest parent - * @property {number|null} [pageSize] ListMetadataImportsRequest pageSize - * @property {string|null} [pageToken] ListMetadataImportsRequest pageToken - * @property {string|null} [filter] ListMetadataImportsRequest filter - * @property {string|null} [orderBy] ListMetadataImportsRequest orderBy + * @interface ICreateServiceRequest + * @property {string|null} [parent] CreateServiceRequest parent + * @property {string|null} [serviceId] CreateServiceRequest serviceId + * @property {google.cloud.metastore.v1.IService|null} [service] CreateServiceRequest service + * @property {string|null} [requestId] CreateServiceRequest requestId */ /** - * Constructs a new ListMetadataImportsRequest. + * Constructs a new CreateServiceRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a ListMetadataImportsRequest. - * @implements IListMetadataImportsRequest + * @classdesc Represents a CreateServiceRequest. + * @implements ICreateServiceRequest * @constructor - * @param {google.cloud.metastore.v1.IListMetadataImportsRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1.ICreateServiceRequest=} [properties] Properties to set */ - function ListMetadataImportsRequest(properties) { + function CreateServiceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6283,110 +6579,100 @@ } /** - * ListMetadataImportsRequest parent. + * CreateServiceRequest parent. * @member {string} parent - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest - * @instance - */ - ListMetadataImportsRequest.prototype.parent = ""; - - /** - * ListMetadataImportsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1.CreateServiceRequest * @instance */ - ListMetadataImportsRequest.prototype.pageSize = 0; + CreateServiceRequest.prototype.parent = ""; /** - * ListMetadataImportsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * CreateServiceRequest serviceId. + * @member {string} serviceId + * @memberof google.cloud.metastore.v1.CreateServiceRequest * @instance */ - ListMetadataImportsRequest.prototype.pageToken = ""; + CreateServiceRequest.prototype.serviceId = ""; /** - * ListMetadataImportsRequest filter. - * @member {string} filter - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * CreateServiceRequest service. + * @member {google.cloud.metastore.v1.IService|null|undefined} service + * @memberof google.cloud.metastore.v1.CreateServiceRequest * @instance */ - ListMetadataImportsRequest.prototype.filter = ""; + CreateServiceRequest.prototype.service = null; /** - * ListMetadataImportsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * CreateServiceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1.CreateServiceRequest * @instance */ - ListMetadataImportsRequest.prototype.orderBy = ""; + CreateServiceRequest.prototype.requestId = ""; /** - * Creates a new ListMetadataImportsRequest instance using the specified properties. + * Creates a new CreateServiceRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1.CreateServiceRequest * @static - * @param {google.cloud.metastore.v1.IListMetadataImportsRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.ListMetadataImportsRequest} ListMetadataImportsRequest instance + * @param {google.cloud.metastore.v1.ICreateServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.CreateServiceRequest} CreateServiceRequest instance */ - ListMetadataImportsRequest.create = function create(properties) { - return new ListMetadataImportsRequest(properties); + CreateServiceRequest.create = function create(properties) { + return new CreateServiceRequest(properties); }; /** - * Encodes the specified ListMetadataImportsRequest message. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsRequest.verify|verify} messages. + * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.CreateServiceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1.CreateServiceRequest * @static - * @param {google.cloud.metastore.v1.IListMetadataImportsRequest} message ListMetadataImportsRequest message or plain object to encode + * @param {google.cloud.metastore.v1.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetadataImportsRequest.encode = function encode(message, writer) { + CreateServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.serviceId != null && Object.hasOwnProperty.call(message, "serviceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceId); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + $root.google.cloud.metastore.v1.Service.encode(message.service, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; /** - * Encodes the specified ListMetadataImportsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsRequest.verify|verify} messages. + * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.CreateServiceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1.CreateServiceRequest * @static - * @param {google.cloud.metastore.v1.IListMetadataImportsRequest} message ListMetadataImportsRequest message or plain object to encode + * @param {google.cloud.metastore.v1.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetadataImportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMetadataImportsRequest message from the specified reader or buffer. + * Decodes a CreateServiceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1.CreateServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.ListMetadataImportsRequest} ListMetadataImportsRequest + * @returns {google.cloud.metastore.v1.CreateServiceRequest} CreateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetadataImportsRequest.decode = function decode(reader, length) { + CreateServiceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ListMetadataImportsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.CreateServiceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -6395,19 +6681,15 @@ break; } case 2: { - message.pageSize = reader.int32(); + message.serviceId = reader.string(); break; } case 3: { - message.pageToken = reader.string(); + message.service = $root.google.cloud.metastore.v1.Service.decode(reader, reader.uint32()); break; } case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.requestId = reader.string(); break; } default: @@ -6419,159 +6701,154 @@ }; /** - * Decodes a ListMetadataImportsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1.CreateServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.ListMetadataImportsRequest} ListMetadataImportsRequest + * @returns {google.cloud.metastore.v1.CreateServiceRequest} CreateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetadataImportsRequest.decodeDelimited = function decodeDelimited(reader) { + CreateServiceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMetadataImportsRequest message. + * Verifies a CreateServiceRequest message. * @function verify - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1.CreateServiceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMetadataImportsRequest.verify = function verify(message) { + CreateServiceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.serviceId != null && message.hasOwnProperty("serviceId")) + if (!$util.isString(message.serviceId)) + return "serviceId: string expected"; + if (message.service != null && message.hasOwnProperty("service")) { + var error = $root.google.cloud.metastore.v1.Service.verify(message.service); + if (error) + return "service." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a ListMetadataImportsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1.CreateServiceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.ListMetadataImportsRequest} ListMetadataImportsRequest + * @returns {google.cloud.metastore.v1.CreateServiceRequest} CreateServiceRequest */ - ListMetadataImportsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.ListMetadataImportsRequest) + CreateServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.CreateServiceRequest) return object; - var message = new $root.google.cloud.metastore.v1.ListMetadataImportsRequest(); + var message = new $root.google.cloud.metastore.v1.CreateServiceRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + if (object.serviceId != null) + message.serviceId = String(object.serviceId); + if (object.service != null) { + if (typeof object.service !== "object") + throw TypeError(".google.cloud.metastore.v1.CreateServiceRequest.service: object expected"); + message.service = $root.google.cloud.metastore.v1.Service.fromObject(object.service); + } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a ListMetadataImportsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1.CreateServiceRequest * @static - * @param {google.cloud.metastore.v1.ListMetadataImportsRequest} message ListMetadataImportsRequest + * @param {google.cloud.metastore.v1.CreateServiceRequest} message CreateServiceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMetadataImportsRequest.toObject = function toObject(message, options) { + CreateServiceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + object.serviceId = ""; + object.service = null; + object.requestId = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (message.serviceId != null && message.hasOwnProperty("serviceId")) + object.serviceId = message.serviceId; + if (message.service != null && message.hasOwnProperty("service")) + object.service = $root.google.cloud.metastore.v1.Service.toObject(message.service, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this ListMetadataImportsRequest to JSON. + * Converts this CreateServiceRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1.CreateServiceRequest * @instance * @returns {Object.} JSON object */ - ListMetadataImportsRequest.prototype.toJSON = function toJSON() { + CreateServiceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListMetadataImportsRequest + * Gets the default type url for CreateServiceRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1.CreateServiceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListMetadataImportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.ListMetadataImportsRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.CreateServiceRequest"; }; - return ListMetadataImportsRequest; + return CreateServiceRequest; })(); - v1.ListMetadataImportsResponse = (function() { + v1.UpdateServiceRequest = (function() { /** - * Properties of a ListMetadataImportsResponse. + * Properties of an UpdateServiceRequest. * @memberof google.cloud.metastore.v1 - * @interface IListMetadataImportsResponse - * @property {Array.|null} [metadataImports] ListMetadataImportsResponse metadataImports - * @property {string|null} [nextPageToken] ListMetadataImportsResponse nextPageToken - * @property {Array.|null} [unreachable] ListMetadataImportsResponse unreachable + * @interface IUpdateServiceRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateServiceRequest updateMask + * @property {google.cloud.metastore.v1.IService|null} [service] UpdateServiceRequest service + * @property {string|null} [requestId] UpdateServiceRequest requestId */ /** - * Constructs a new ListMetadataImportsResponse. + * Constructs a new UpdateServiceRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a ListMetadataImportsResponse. - * @implements IListMetadataImportsResponse + * @classdesc Represents an UpdateServiceRequest. + * @implements IUpdateServiceRequest * @constructor - * @param {google.cloud.metastore.v1.IListMetadataImportsResponse=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IUpdateServiceRequest=} [properties] Properties to set */ - function ListMetadataImportsResponse(properties) { - this.metadataImports = []; - this.unreachable = []; + function UpdateServiceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6579,109 +6856,103 @@ } /** - * ListMetadataImportsResponse metadataImports. - * @member {Array.} metadataImports - * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse + * UpdateServiceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.metastore.v1.UpdateServiceRequest * @instance */ - ListMetadataImportsResponse.prototype.metadataImports = $util.emptyArray; + UpdateServiceRequest.prototype.updateMask = null; /** - * ListMetadataImportsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse + * UpdateServiceRequest service. + * @member {google.cloud.metastore.v1.IService|null|undefined} service + * @memberof google.cloud.metastore.v1.UpdateServiceRequest * @instance */ - ListMetadataImportsResponse.prototype.nextPageToken = ""; + UpdateServiceRequest.prototype.service = null; /** - * ListMetadataImportsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse + * UpdateServiceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1.UpdateServiceRequest * @instance */ - ListMetadataImportsResponse.prototype.unreachable = $util.emptyArray; + UpdateServiceRequest.prototype.requestId = ""; /** - * Creates a new ListMetadataImportsResponse instance using the specified properties. + * Creates a new UpdateServiceRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1.UpdateServiceRequest * @static - * @param {google.cloud.metastore.v1.IListMetadataImportsResponse=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.ListMetadataImportsResponse} ListMetadataImportsResponse instance + * @param {google.cloud.metastore.v1.IUpdateServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.UpdateServiceRequest} UpdateServiceRequest instance */ - ListMetadataImportsResponse.create = function create(properties) { - return new ListMetadataImportsResponse(properties); + UpdateServiceRequest.create = function create(properties) { + return new UpdateServiceRequest(properties); }; /** - * Encodes the specified ListMetadataImportsResponse message. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsResponse.verify|verify} messages. + * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.UpdateServiceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1.UpdateServiceRequest * @static - * @param {google.cloud.metastore.v1.IListMetadataImportsResponse} message ListMetadataImportsResponse message or plain object to encode + * @param {google.cloud.metastore.v1.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetadataImportsResponse.encode = function encode(message, writer) { + UpdateServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metadataImports != null && message.metadataImports.length) - for (var i = 0; i < message.metadataImports.length; ++i) - $root.google.cloud.metastore.v1.MetadataImport.encode(message.metadataImports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + $root.google.cloud.metastore.v1.Service.encode(message.service, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified ListMetadataImportsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsResponse.verify|verify} messages. + * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.UpdateServiceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1.UpdateServiceRequest * @static - * @param {google.cloud.metastore.v1.IListMetadataImportsResponse} message ListMetadataImportsResponse message or plain object to encode + * @param {google.cloud.metastore.v1.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetadataImportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMetadataImportsResponse message from the specified reader or buffer. + * Decodes an UpdateServiceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1.UpdateServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.ListMetadataImportsResponse} ListMetadataImportsResponse + * @returns {google.cloud.metastore.v1.UpdateServiceRequest} UpdateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetadataImportsResponse.decode = function decode(reader, length) { + UpdateServiceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ListMetadataImportsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.UpdateServiceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.metadataImports && message.metadataImports.length)) - message.metadataImports = []; - message.metadataImports.push($root.google.cloud.metastore.v1.MetadataImport.decode(reader, reader.uint32())); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.nextPageToken = reader.string(); + message.service = $root.google.cloud.metastore.v1.Service.decode(reader, reader.uint32()); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.requestId = reader.string(); break; } default: @@ -6693,169 +6964,150 @@ }; /** - * Decodes a ListMetadataImportsResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1.UpdateServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.ListMetadataImportsResponse} ListMetadataImportsResponse + * @returns {google.cloud.metastore.v1.UpdateServiceRequest} UpdateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetadataImportsResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateServiceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMetadataImportsResponse message. + * Verifies an UpdateServiceRequest message. * @function verify - * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1.UpdateServiceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMetadataImportsResponse.verify = function verify(message) { + UpdateServiceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metadataImports != null && message.hasOwnProperty("metadataImports")) { - if (!Array.isArray(message.metadataImports)) - return "metadataImports: array expected"; - for (var i = 0; i < message.metadataImports.length; ++i) { - var error = $root.google.cloud.metastore.v1.MetadataImport.verify(message.metadataImports[i]); - if (error) - return "metadataImports." + error; - } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; + if (message.service != null && message.hasOwnProperty("service")) { + var error = $root.google.cloud.metastore.v1.Service.verify(message.service); + if (error) + return "service." + error; } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a ListMetadataImportsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1.UpdateServiceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.ListMetadataImportsResponse} ListMetadataImportsResponse + * @returns {google.cloud.metastore.v1.UpdateServiceRequest} UpdateServiceRequest */ - ListMetadataImportsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.ListMetadataImportsResponse) + UpdateServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.UpdateServiceRequest) return object; - var message = new $root.google.cloud.metastore.v1.ListMetadataImportsResponse(); - if (object.metadataImports) { - if (!Array.isArray(object.metadataImports)) - throw TypeError(".google.cloud.metastore.v1.ListMetadataImportsResponse.metadataImports: array expected"); - message.metadataImports = []; - for (var i = 0; i < object.metadataImports.length; ++i) { - if (typeof object.metadataImports[i] !== "object") - throw TypeError(".google.cloud.metastore.v1.ListMetadataImportsResponse.metadataImports: object expected"); - message.metadataImports[i] = $root.google.cloud.metastore.v1.MetadataImport.fromObject(object.metadataImports[i]); - } + var message = new $root.google.cloud.metastore.v1.UpdateServiceRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.metastore.v1.UpdateServiceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.metastore.v1.ListMetadataImportsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); + if (object.service != null) { + if (typeof object.service !== "object") + throw TypeError(".google.cloud.metastore.v1.UpdateServiceRequest.service: object expected"); + message.service = $root.google.cloud.metastore.v1.Service.fromObject(object.service); } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a ListMetadataImportsResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1.UpdateServiceRequest * @static - * @param {google.cloud.metastore.v1.ListMetadataImportsResponse} message ListMetadataImportsResponse + * @param {google.cloud.metastore.v1.UpdateServiceRequest} message UpdateServiceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMetadataImportsResponse.toObject = function toObject(message, options) { + UpdateServiceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.metadataImports = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.metadataImports && message.metadataImports.length) { - object.metadataImports = []; - for (var j = 0; j < message.metadataImports.length; ++j) - object.metadataImports[j] = $root.google.cloud.metastore.v1.MetadataImport.toObject(message.metadataImports[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.updateMask = null; + object.service = null; + object.requestId = ""; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.service != null && message.hasOwnProperty("service")) + object.service = $root.google.cloud.metastore.v1.Service.toObject(message.service, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this ListMetadataImportsResponse to JSON. + * Converts this UpdateServiceRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1.UpdateServiceRequest * @instance * @returns {Object.} JSON object */ - ListMetadataImportsResponse.prototype.toJSON = function toJSON() { + UpdateServiceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListMetadataImportsResponse + * Gets the default type url for UpdateServiceRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1.UpdateServiceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListMetadataImportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.ListMetadataImportsResponse"; + return typeUrlPrefix + "/google.cloud.metastore.v1.UpdateServiceRequest"; }; - return ListMetadataImportsResponse; + return UpdateServiceRequest; })(); - v1.GetMetadataImportRequest = (function() { + v1.DeleteServiceRequest = (function() { /** - * Properties of a GetMetadataImportRequest. + * Properties of a DeleteServiceRequest. * @memberof google.cloud.metastore.v1 - * @interface IGetMetadataImportRequest - * @property {string|null} [name] GetMetadataImportRequest name + * @interface IDeleteServiceRequest + * @property {string|null} [name] DeleteServiceRequest name + * @property {string|null} [requestId] DeleteServiceRequest requestId */ /** - * Constructs a new GetMetadataImportRequest. + * Constructs a new DeleteServiceRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a GetMetadataImportRequest. - * @implements IGetMetadataImportRequest + * @classdesc Represents a DeleteServiceRequest. + * @implements IDeleteServiceRequest * @constructor - * @param {google.cloud.metastore.v1.IGetMetadataImportRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IDeleteServiceRequest=} [properties] Properties to set */ - function GetMetadataImportRequest(properties) { + function DeleteServiceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6863,70 +7115,80 @@ } /** - * GetMetadataImportRequest name. + * DeleteServiceRequest name. * @member {string} name - * @memberof google.cloud.metastore.v1.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1.DeleteServiceRequest * @instance */ - GetMetadataImportRequest.prototype.name = ""; + DeleteServiceRequest.prototype.name = ""; /** - * Creates a new GetMetadataImportRequest instance using the specified properties. - * @function create - * @memberof google.cloud.metastore.v1.GetMetadataImportRequest - * @static - * @param {google.cloud.metastore.v1.IGetMetadataImportRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.GetMetadataImportRequest} GetMetadataImportRequest instance + * DeleteServiceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1.DeleteServiceRequest + * @instance */ - GetMetadataImportRequest.create = function create(properties) { - return new GetMetadataImportRequest(properties); - }; + DeleteServiceRequest.prototype.requestId = ""; /** - * Encodes the specified GetMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1.GetMetadataImportRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.metastore.v1.GetMetadataImportRequest - * @static - * @param {google.cloud.metastore.v1.IGetMetadataImportRequest} message GetMetadataImportRequest message or plain object to encode + * Creates a new DeleteServiceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1.DeleteServiceRequest + * @static + * @param {google.cloud.metastore.v1.IDeleteServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.DeleteServiceRequest} DeleteServiceRequest instance + */ + DeleteServiceRequest.create = function create(properties) { + return new DeleteServiceRequest(properties); + }; + + /** + * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.DeleteServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1.DeleteServiceRequest + * @static + * @param {google.cloud.metastore.v1.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMetadataImportRequest.encode = function encode(message, writer) { + DeleteServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified GetMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.GetMetadataImportRequest.verify|verify} messages. + * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.DeleteServiceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1.DeleteServiceRequest * @static - * @param {google.cloud.metastore.v1.IGetMetadataImportRequest} message GetMetadataImportRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetMetadataImportRequest message from the specified reader or buffer. + * Decodes a DeleteServiceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1.DeleteServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.GetMetadataImportRequest} GetMetadataImportRequest + * @returns {google.cloud.metastore.v1.DeleteServiceRequest} DeleteServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetMetadataImportRequest.decode = function decode(reader, length) { + DeleteServiceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.GetMetadataImportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.DeleteServiceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -6934,6 +7196,10 @@ message.name = reader.string(); break; } + case 2: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6943,125 +7209,135 @@ }; /** - * Decodes a GetMetadataImportRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1.DeleteServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.GetMetadataImportRequest} GetMetadataImportRequest + * @returns {google.cloud.metastore.v1.DeleteServiceRequest} DeleteServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteServiceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetMetadataImportRequest message. + * Verifies a DeleteServiceRequest message. * @function verify - * @memberof google.cloud.metastore.v1.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1.DeleteServiceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetMetadataImportRequest.verify = function verify(message) { + DeleteServiceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a GetMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1.DeleteServiceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.GetMetadataImportRequest} GetMetadataImportRequest + * @returns {google.cloud.metastore.v1.DeleteServiceRequest} DeleteServiceRequest */ - GetMetadataImportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.GetMetadataImportRequest) + DeleteServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.DeleteServiceRequest) return object; - var message = new $root.google.cloud.metastore.v1.GetMetadataImportRequest(); + var message = new $root.google.cloud.metastore.v1.DeleteServiceRequest(); if (object.name != null) message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a GetMetadataImportRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1.DeleteServiceRequest * @static - * @param {google.cloud.metastore.v1.GetMetadataImportRequest} message GetMetadataImportRequest + * @param {google.cloud.metastore.v1.DeleteServiceRequest} message DeleteServiceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetMetadataImportRequest.toObject = function toObject(message, options) { + DeleteServiceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.requestId = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this GetMetadataImportRequest to JSON. + * Converts this DeleteServiceRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1.DeleteServiceRequest * @instance * @returns {Object.} JSON object */ - GetMetadataImportRequest.prototype.toJSON = function toJSON() { + DeleteServiceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetMetadataImportRequest + * Gets the default type url for DeleteServiceRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1.DeleteServiceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.GetMetadataImportRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.DeleteServiceRequest"; }; - return GetMetadataImportRequest; + return DeleteServiceRequest; })(); - v1.CreateMetadataImportRequest = (function() { + v1.ListMetadataImportsRequest = (function() { /** - * Properties of a CreateMetadataImportRequest. + * Properties of a ListMetadataImportsRequest. * @memberof google.cloud.metastore.v1 - * @interface ICreateMetadataImportRequest - * @property {string|null} [parent] CreateMetadataImportRequest parent - * @property {string|null} [metadataImportId] CreateMetadataImportRequest metadataImportId - * @property {google.cloud.metastore.v1.IMetadataImport|null} [metadataImport] CreateMetadataImportRequest metadataImport - * @property {string|null} [requestId] CreateMetadataImportRequest requestId + * @interface IListMetadataImportsRequest + * @property {string|null} [parent] ListMetadataImportsRequest parent + * @property {number|null} [pageSize] ListMetadataImportsRequest pageSize + * @property {string|null} [pageToken] ListMetadataImportsRequest pageToken + * @property {string|null} [filter] ListMetadataImportsRequest filter + * @property {string|null} [orderBy] ListMetadataImportsRequest orderBy */ /** - * Constructs a new CreateMetadataImportRequest. + * Constructs a new ListMetadataImportsRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a CreateMetadataImportRequest. - * @implements ICreateMetadataImportRequest + * @classdesc Represents a ListMetadataImportsRequest. + * @implements IListMetadataImportsRequest * @constructor - * @param {google.cloud.metastore.v1.ICreateMetadataImportRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IListMetadataImportsRequest=} [properties] Properties to set */ - function CreateMetadataImportRequest(properties) { + function ListMetadataImportsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7069,100 +7345,110 @@ } /** - * CreateMetadataImportRequest parent. + * ListMetadataImportsRequest parent. * @member {string} parent - * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest * @instance */ - CreateMetadataImportRequest.prototype.parent = ""; + ListMetadataImportsRequest.prototype.parent = ""; /** - * CreateMetadataImportRequest metadataImportId. - * @member {string} metadataImportId - * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * ListMetadataImportsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest * @instance */ - CreateMetadataImportRequest.prototype.metadataImportId = ""; + ListMetadataImportsRequest.prototype.pageSize = 0; /** - * CreateMetadataImportRequest metadataImport. - * @member {google.cloud.metastore.v1.IMetadataImport|null|undefined} metadataImport - * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * ListMetadataImportsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest * @instance */ - CreateMetadataImportRequest.prototype.metadataImport = null; + ListMetadataImportsRequest.prototype.pageToken = ""; /** - * CreateMetadataImportRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * ListMetadataImportsRequest filter. + * @member {string} filter + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest * @instance */ - CreateMetadataImportRequest.prototype.requestId = ""; + ListMetadataImportsRequest.prototype.filter = ""; /** - * Creates a new CreateMetadataImportRequest instance using the specified properties. + * ListMetadataImportsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest + * @instance + */ + ListMetadataImportsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListMetadataImportsRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest * @static - * @param {google.cloud.metastore.v1.ICreateMetadataImportRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.CreateMetadataImportRequest} CreateMetadataImportRequest instance + * @param {google.cloud.metastore.v1.IListMetadataImportsRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.ListMetadataImportsRequest} ListMetadataImportsRequest instance */ - CreateMetadataImportRequest.create = function create(properties) { - return new CreateMetadataImportRequest(properties); + ListMetadataImportsRequest.create = function create(properties) { + return new ListMetadataImportsRequest(properties); }; /** - * Encodes the specified CreateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1.CreateMetadataImportRequest.verify|verify} messages. + * Encodes the specified ListMetadataImportsRequest message. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest * @static - * @param {google.cloud.metastore.v1.ICreateMetadataImportRequest} message CreateMetadataImportRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IListMetadataImportsRequest} message ListMetadataImportsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMetadataImportRequest.encode = function encode(message, writer) { + ListMetadataImportsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.metadataImportId != null && Object.hasOwnProperty.call(message, "metadataImportId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataImportId); - if (message.metadataImport != null && Object.hasOwnProperty.call(message, "metadataImport")) - $root.google.cloud.metastore.v1.MetadataImport.encode(message.metadataImport, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified CreateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.CreateMetadataImportRequest.verify|verify} messages. + * Encodes the specified ListMetadataImportsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest * @static - * @param {google.cloud.metastore.v1.ICreateMetadataImportRequest} message CreateMetadataImportRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IListMetadataImportsRequest} message ListMetadataImportsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMetadataImportsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateMetadataImportRequest message from the specified reader or buffer. + * Decodes a ListMetadataImportsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.CreateMetadataImportRequest} CreateMetadataImportRequest + * @returns {google.cloud.metastore.v1.ListMetadataImportsRequest} ListMetadataImportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMetadataImportRequest.decode = function decode(reader, length) { + ListMetadataImportsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.CreateMetadataImportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ListMetadataImportsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -7171,15 +7457,19 @@ break; } case 2: { - message.metadataImportId = reader.string(); + message.pageSize = reader.int32(); break; } case 3: { - message.metadataImport = $root.google.cloud.metastore.v1.MetadataImport.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } case 4: { - message.requestId = reader.string(); + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -7191,154 +7481,159 @@ }; /** - * Decodes a CreateMetadataImportRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMetadataImportsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.CreateMetadataImportRequest} CreateMetadataImportRequest + * @returns {google.cloud.metastore.v1.ListMetadataImportsRequest} ListMetadataImportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { + ListMetadataImportsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateMetadataImportRequest message. + * Verifies a ListMetadataImportsRequest message. * @function verify - * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateMetadataImportRequest.verify = function verify(message) { + ListMetadataImportsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.metadataImportId != null && message.hasOwnProperty("metadataImportId")) - if (!$util.isString(message.metadataImportId)) - return "metadataImportId: string expected"; - if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) { - var error = $root.google.cloud.metastore.v1.MetadataImport.verify(message.metadataImport); - if (error) - return "metadataImport." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a CreateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetadataImportsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.CreateMetadataImportRequest} CreateMetadataImportRequest + * @returns {google.cloud.metastore.v1.ListMetadataImportsRequest} ListMetadataImportsRequest */ - CreateMetadataImportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.CreateMetadataImportRequest) + ListMetadataImportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.ListMetadataImportsRequest) return object; - var message = new $root.google.cloud.metastore.v1.CreateMetadataImportRequest(); + var message = new $root.google.cloud.metastore.v1.ListMetadataImportsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.metadataImportId != null) - message.metadataImportId = String(object.metadataImportId); - if (object.metadataImport != null) { - if (typeof object.metadataImport !== "object") - throw TypeError(".google.cloud.metastore.v1.CreateMetadataImportRequest.metadataImport: object expected"); - message.metadataImport = $root.google.cloud.metastore.v1.MetadataImport.fromObject(object.metadataImport); - } - if (object.requestId != null) - message.requestId = String(object.requestId); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a CreateMetadataImportRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMetadataImportsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest * @static - * @param {google.cloud.metastore.v1.CreateMetadataImportRequest} message CreateMetadataImportRequest + * @param {google.cloud.metastore.v1.ListMetadataImportsRequest} message ListMetadataImportsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateMetadataImportRequest.toObject = function toObject(message, options) { + ListMetadataImportsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.metadataImportId = ""; - object.metadataImport = null; - object.requestId = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.metadataImportId != null && message.hasOwnProperty("metadataImportId")) - object.metadataImportId = message.metadataImportId; - if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) - object.metadataImport = $root.google.cloud.metastore.v1.MetadataImport.toObject(message.metadataImport, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this CreateMetadataImportRequest to JSON. + * Converts this ListMetadataImportsRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest * @instance * @returns {Object.} JSON object */ - CreateMetadataImportRequest.prototype.toJSON = function toJSON() { + ListMetadataImportsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateMetadataImportRequest + * Gets the default type url for ListMetadataImportsRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListMetadataImportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.CreateMetadataImportRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.ListMetadataImportsRequest"; }; - return CreateMetadataImportRequest; + return ListMetadataImportsRequest; })(); - v1.UpdateMetadataImportRequest = (function() { + v1.ListMetadataImportsResponse = (function() { /** - * Properties of an UpdateMetadataImportRequest. + * Properties of a ListMetadataImportsResponse. * @memberof google.cloud.metastore.v1 - * @interface IUpdateMetadataImportRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMetadataImportRequest updateMask - * @property {google.cloud.metastore.v1.IMetadataImport|null} [metadataImport] UpdateMetadataImportRequest metadataImport - * @property {string|null} [requestId] UpdateMetadataImportRequest requestId + * @interface IListMetadataImportsResponse + * @property {Array.|null} [metadataImports] ListMetadataImportsResponse metadataImports + * @property {string|null} [nextPageToken] ListMetadataImportsResponse nextPageToken + * @property {Array.|null} [unreachable] ListMetadataImportsResponse unreachable */ /** - * Constructs a new UpdateMetadataImportRequest. + * Constructs a new ListMetadataImportsResponse. * @memberof google.cloud.metastore.v1 - * @classdesc Represents an UpdateMetadataImportRequest. - * @implements IUpdateMetadataImportRequest + * @classdesc Represents a ListMetadataImportsResponse. + * @implements IListMetadataImportsResponse * @constructor - * @param {google.cloud.metastore.v1.IUpdateMetadataImportRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IListMetadataImportsResponse=} [properties] Properties to set */ - function UpdateMetadataImportRequest(properties) { + function ListMetadataImportsResponse(properties) { + this.metadataImports = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7346,103 +7641,109 @@ } /** - * UpdateMetadataImportRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * ListMetadataImportsResponse metadataImports. + * @member {Array.} metadataImports + * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse * @instance */ - UpdateMetadataImportRequest.prototype.updateMask = null; + ListMetadataImportsResponse.prototype.metadataImports = $util.emptyArray; /** - * UpdateMetadataImportRequest metadataImport. - * @member {google.cloud.metastore.v1.IMetadataImport|null|undefined} metadataImport - * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * ListMetadataImportsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse * @instance */ - UpdateMetadataImportRequest.prototype.metadataImport = null; + ListMetadataImportsResponse.prototype.nextPageToken = ""; /** - * UpdateMetadataImportRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * ListMetadataImportsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse * @instance */ - UpdateMetadataImportRequest.prototype.requestId = ""; + ListMetadataImportsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new UpdateMetadataImportRequest instance using the specified properties. + * Creates a new ListMetadataImportsResponse instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse * @static - * @param {google.cloud.metastore.v1.IUpdateMetadataImportRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.UpdateMetadataImportRequest} UpdateMetadataImportRequest instance + * @param {google.cloud.metastore.v1.IListMetadataImportsResponse=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.ListMetadataImportsResponse} ListMetadataImportsResponse instance */ - UpdateMetadataImportRequest.create = function create(properties) { - return new UpdateMetadataImportRequest(properties); + ListMetadataImportsResponse.create = function create(properties) { + return new ListMetadataImportsResponse(properties); }; /** - * Encodes the specified UpdateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1.UpdateMetadataImportRequest.verify|verify} messages. + * Encodes the specified ListMetadataImportsResponse message. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse * @static - * @param {google.cloud.metastore.v1.IUpdateMetadataImportRequest} message UpdateMetadataImportRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IListMetadataImportsResponse} message ListMetadataImportsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateMetadataImportRequest.encode = function encode(message, writer) { + ListMetadataImportsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metadataImport != null && Object.hasOwnProperty.call(message, "metadataImport")) - $root.google.cloud.metastore.v1.MetadataImport.encode(message.metadataImport, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.metadataImports != null && message.metadataImports.length) + for (var i = 0; i < message.metadataImports.length; ++i) + $root.google.cloud.metastore.v1.MetadataImport.encode(message.metadataImports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified UpdateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.UpdateMetadataImportRequest.verify|verify} messages. + * Encodes the specified ListMetadataImportsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListMetadataImportsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse * @static - * @param {google.cloud.metastore.v1.IUpdateMetadataImportRequest} message UpdateMetadataImportRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IListMetadataImportsResponse} message ListMetadataImportsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMetadataImportsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer. + * Decodes a ListMetadataImportsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.UpdateMetadataImportRequest} UpdateMetadataImportRequest + * @returns {google.cloud.metastore.v1.ListMetadataImportsResponse} ListMetadataImportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateMetadataImportRequest.decode = function decode(reader, length) { + ListMetadataImportsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.UpdateMetadataImportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ListMetadataImportsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + if (!(message.metadataImports && message.metadataImports.length)) + message.metadataImports = []; + message.metadataImports.push($root.google.cloud.metastore.v1.MetadataImport.decode(reader, reader.uint32())); break; } case 2: { - message.metadataImport = $root.google.cloud.metastore.v1.MetadataImport.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } case 3: { - message.requestId = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -7454,153 +7755,169 @@ }; /** - * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMetadataImportsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.UpdateMetadataImportRequest} UpdateMetadataImportRequest + * @returns {google.cloud.metastore.v1.ListMetadataImportsResponse} ListMetadataImportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { + ListMetadataImportsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateMetadataImportRequest message. + * Verifies a ListMetadataImportsResponse message. * @function verify - * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateMetadataImportRequest.verify = function verify(message) { + ListMetadataImportsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.metadataImports != null && message.hasOwnProperty("metadataImports")) { + if (!Array.isArray(message.metadataImports)) + return "metadataImports: array expected"; + for (var i = 0; i < message.metadataImports.length; ++i) { + var error = $root.google.cloud.metastore.v1.MetadataImport.verify(message.metadataImports[i]); + if (error) + return "metadataImports." + error; + } } - if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) { - var error = $root.google.cloud.metastore.v1.MetadataImport.verify(message.metadataImport); - if (error) - return "metadataImport." + error; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates an UpdateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetadataImportsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.UpdateMetadataImportRequest} UpdateMetadataImportRequest + * @returns {google.cloud.metastore.v1.ListMetadataImportsResponse} ListMetadataImportsResponse */ - UpdateMetadataImportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.UpdateMetadataImportRequest) + ListMetadataImportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.ListMetadataImportsResponse) return object; - var message = new $root.google.cloud.metastore.v1.UpdateMetadataImportRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.metastore.v1.UpdateMetadataImportRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.metadataImport != null) { - if (typeof object.metadataImport !== "object") - throw TypeError(".google.cloud.metastore.v1.UpdateMetadataImportRequest.metadataImport: object expected"); - message.metadataImport = $root.google.cloud.metastore.v1.MetadataImport.fromObject(object.metadataImport); + var message = new $root.google.cloud.metastore.v1.ListMetadataImportsResponse(); + if (object.metadataImports) { + if (!Array.isArray(object.metadataImports)) + throw TypeError(".google.cloud.metastore.v1.ListMetadataImportsResponse.metadataImports: array expected"); + message.metadataImports = []; + for (var i = 0; i < object.metadataImports.length; ++i) { + if (typeof object.metadataImports[i] !== "object") + throw TypeError(".google.cloud.metastore.v1.ListMetadataImportsResponse.metadataImports: object expected"); + message.metadataImports[i] = $root.google.cloud.metastore.v1.MetadataImport.fromObject(object.metadataImports[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.metastore.v1.ListMetadataImportsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from an UpdateMetadataImportRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMetadataImportsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse * @static - * @param {google.cloud.metastore.v1.UpdateMetadataImportRequest} message UpdateMetadataImportRequest + * @param {google.cloud.metastore.v1.ListMetadataImportsResponse} message ListMetadataImportsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateMetadataImportRequest.toObject = function toObject(message, options) { + ListMetadataImportsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.metadataImport = null; - object.requestId = ""; + if (options.arrays || options.defaults) { + object.metadataImports = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.metadataImports && message.metadataImports.length) { + object.metadataImports = []; + for (var j = 0; j < message.metadataImports.length; ++j) + object.metadataImports[j] = $root.google.cloud.metastore.v1.MetadataImport.toObject(message.metadataImports[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) - object.metadataImport = $root.google.cloud.metastore.v1.MetadataImport.toObject(message.metadataImport, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; return object; }; /** - * Converts this UpdateMetadataImportRequest to JSON. + * Converts this ListMetadataImportsResponse to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse * @instance * @returns {Object.} JSON object */ - UpdateMetadataImportRequest.prototype.toJSON = function toJSON() { + ListMetadataImportsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateMetadataImportRequest + * Gets the default type url for ListMetadataImportsResponse * @function getTypeUrl - * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1.ListMetadataImportsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListMetadataImportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.UpdateMetadataImportRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.ListMetadataImportsResponse"; }; - return UpdateMetadataImportRequest; + return ListMetadataImportsResponse; })(); - v1.ListBackupsRequest = (function() { + v1.GetMetadataImportRequest = (function() { /** - * Properties of a ListBackupsRequest. + * Properties of a GetMetadataImportRequest. * @memberof google.cloud.metastore.v1 - * @interface IListBackupsRequest - * @property {string|null} [parent] ListBackupsRequest parent - * @property {number|null} [pageSize] ListBackupsRequest pageSize - * @property {string|null} [pageToken] ListBackupsRequest pageToken - * @property {string|null} [filter] ListBackupsRequest filter - * @property {string|null} [orderBy] ListBackupsRequest orderBy + * @interface IGetMetadataImportRequest + * @property {string|null} [name] GetMetadataImportRequest name */ /** - * Constructs a new ListBackupsRequest. + * Constructs a new GetMetadataImportRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a ListBackupsRequest. - * @implements IListBackupsRequest + * @classdesc Represents a GetMetadataImportRequest. + * @implements IGetMetadataImportRequest * @constructor - * @param {google.cloud.metastore.v1.IListBackupsRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IGetMetadataImportRequest=} [properties] Properties to set */ - function ListBackupsRequest(properties) { + function GetMetadataImportRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7608,131 +7925,75 @@ } /** - * ListBackupsRequest parent. - * @member {string} parent - * @memberof google.cloud.metastore.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.parent = ""; - - /** - * ListBackupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.metastore.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.pageSize = 0; - - /** - * ListBackupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.metastore.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.pageToken = ""; - - /** - * ListBackupsRequest filter. - * @member {string} filter - * @memberof google.cloud.metastore.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.filter = ""; - - /** - * ListBackupsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.metastore.v1.ListBackupsRequest + * GetMetadataImportRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1.GetMetadataImportRequest * @instance */ - ListBackupsRequest.prototype.orderBy = ""; + GetMetadataImportRequest.prototype.name = ""; /** - * Creates a new ListBackupsRequest instance using the specified properties. + * Creates a new GetMetadataImportRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.ListBackupsRequest + * @memberof google.cloud.metastore.v1.GetMetadataImportRequest * @static - * @param {google.cloud.metastore.v1.IListBackupsRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.ListBackupsRequest} ListBackupsRequest instance + * @param {google.cloud.metastore.v1.IGetMetadataImportRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.GetMetadataImportRequest} GetMetadataImportRequest instance */ - ListBackupsRequest.create = function create(properties) { - return new ListBackupsRequest(properties); + GetMetadataImportRequest.create = function create(properties) { + return new GetMetadataImportRequest(properties); }; /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsRequest.verify|verify} messages. + * Encodes the specified GetMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1.GetMetadataImportRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.ListBackupsRequest + * @memberof google.cloud.metastore.v1.GetMetadataImportRequest * @static - * @param {google.cloud.metastore.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IGetMetadataImportRequest} message GetMetadataImportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsRequest.encode = function encode(message, writer) { + GetMetadataImportRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsRequest.verify|verify} messages. + * Encodes the specified GetMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.GetMetadataImportRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.ListBackupsRequest + * @memberof google.cloud.metastore.v1.GetMetadataImportRequest * @static - * @param {google.cloud.metastore.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IGetMetadataImportRequest} message GetMetadataImportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. + * Decodes a GetMetadataImportRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.ListBackupsRequest + * @memberof google.cloud.metastore.v1.GetMetadataImportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.metastore.v1.GetMetadataImportRequest} GetMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsRequest.decode = function decode(reader, length) { + GetMetadataImportRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ListBackupsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.GetMetadataImportRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.name = reader.string(); break; } default: @@ -7744,159 +8005,125 @@ }; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetMetadataImportRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.ListBackupsRequest + * @memberof google.cloud.metastore.v1.GetMetadataImportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.metastore.v1.GetMetadataImportRequest} GetMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { + GetMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBackupsRequest message. + * Verifies a GetMetadataImportRequest message. * @function verify - * @memberof google.cloud.metastore.v1.ListBackupsRequest + * @memberof google.cloud.metastore.v1.GetMetadataImportRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBackupsRequest.verify = function verify(message) { + GetMetadataImportRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.ListBackupsRequest + * @memberof google.cloud.metastore.v1.GetMetadataImportRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.metastore.v1.GetMetadataImportRequest} GetMetadataImportRequest */ - ListBackupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.ListBackupsRequest) + GetMetadataImportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.GetMetadataImportRequest) return object; - var message = new $root.google.cloud.metastore.v1.ListBackupsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.metastore.v1.GetMetadataImportRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetMetadataImportRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.ListBackupsRequest + * @memberof google.cloud.metastore.v1.GetMetadataImportRequest * @static - * @param {google.cloud.metastore.v1.ListBackupsRequest} message ListBackupsRequest + * @param {google.cloud.metastore.v1.GetMetadataImportRequest} message GetMetadataImportRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBackupsRequest.toObject = function toObject(message, options) { + GetMetadataImportRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListBackupsRequest to JSON. + * Converts this GetMetadataImportRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.ListBackupsRequest + * @memberof google.cloud.metastore.v1.GetMetadataImportRequest * @instance * @returns {Object.} JSON object */ - ListBackupsRequest.prototype.toJSON = function toJSON() { + GetMetadataImportRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBackupsRequest + * Gets the default type url for GetMetadataImportRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.ListBackupsRequest + * @memberof google.cloud.metastore.v1.GetMetadataImportRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.ListBackupsRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.GetMetadataImportRequest"; }; - return ListBackupsRequest; + return GetMetadataImportRequest; })(); - v1.ListBackupsResponse = (function() { + v1.CreateMetadataImportRequest = (function() { /** - * Properties of a ListBackupsResponse. + * Properties of a CreateMetadataImportRequest. * @memberof google.cloud.metastore.v1 - * @interface IListBackupsResponse - * @property {Array.|null} [backups] ListBackupsResponse backups - * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupsResponse unreachable + * @interface ICreateMetadataImportRequest + * @property {string|null} [parent] CreateMetadataImportRequest parent + * @property {string|null} [metadataImportId] CreateMetadataImportRequest metadataImportId + * @property {google.cloud.metastore.v1.IMetadataImport|null} [metadataImport] CreateMetadataImportRequest metadataImport + * @property {string|null} [requestId] CreateMetadataImportRequest requestId */ /** - * Constructs a new ListBackupsResponse. + * Constructs a new CreateMetadataImportRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a ListBackupsResponse. - * @implements IListBackupsResponse + * @classdesc Represents a CreateMetadataImportRequest. + * @implements ICreateMetadataImportRequest * @constructor - * @param {google.cloud.metastore.v1.IListBackupsResponse=} [properties] Properties to set + * @param {google.cloud.metastore.v1.ICreateMetadataImportRequest=} [properties] Properties to set */ - function ListBackupsResponse(properties) { - this.backups = []; - this.unreachable = []; + function CreateMetadataImportRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7904,109 +8131,117 @@ } /** - * ListBackupsResponse backups. - * @member {Array.} backups - * @memberof google.cloud.metastore.v1.ListBackupsResponse + * CreateMetadataImportRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest * @instance */ - ListBackupsResponse.prototype.backups = $util.emptyArray; + CreateMetadataImportRequest.prototype.parent = ""; /** - * ListBackupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.metastore.v1.ListBackupsResponse + * CreateMetadataImportRequest metadataImportId. + * @member {string} metadataImportId + * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest * @instance */ - ListBackupsResponse.prototype.nextPageToken = ""; + CreateMetadataImportRequest.prototype.metadataImportId = ""; /** - * ListBackupsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.metastore.v1.ListBackupsResponse + * CreateMetadataImportRequest metadataImport. + * @member {google.cloud.metastore.v1.IMetadataImport|null|undefined} metadataImport + * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest * @instance */ - ListBackupsResponse.prototype.unreachable = $util.emptyArray; + CreateMetadataImportRequest.prototype.metadataImport = null; /** - * Creates a new ListBackupsResponse instance using the specified properties. + * CreateMetadataImportRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest + * @instance + */ + CreateMetadataImportRequest.prototype.requestId = ""; + + /** + * Creates a new CreateMetadataImportRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.ListBackupsResponse + * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1.IListBackupsResponse=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.ListBackupsResponse} ListBackupsResponse instance + * @param {google.cloud.metastore.v1.ICreateMetadataImportRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.CreateMetadataImportRequest} CreateMetadataImportRequest instance */ - ListBackupsResponse.create = function create(properties) { - return new ListBackupsResponse(properties); + CreateMetadataImportRequest.create = function create(properties) { + return new CreateMetadataImportRequest(properties); }; /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsResponse.verify|verify} messages. + * Encodes the specified CreateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1.CreateMetadataImportRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.ListBackupsResponse + * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {google.cloud.metastore.v1.ICreateMetadataImportRequest} message CreateMetadataImportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsResponse.encode = function encode(message, writer) { + CreateMetadataImportRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.backups != null && message.backups.length) - for (var i = 0; i < message.backups.length; ++i) - $root.google.cloud.metastore.v1.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.metadataImportId != null && Object.hasOwnProperty.call(message, "metadataImportId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataImportId); + if (message.metadataImport != null && Object.hasOwnProperty.call(message, "metadataImport")) + $root.google.cloud.metastore.v1.MetadataImport.encode(message.metadataImport, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; /** - * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsResponse.verify|verify} messages. + * Encodes the specified CreateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.CreateMetadataImportRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.ListBackupsResponse + * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {google.cloud.metastore.v1.ICreateMetadataImportRequest} message CreateMetadataImportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. + * Decodes a CreateMetadataImportRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.ListBackupsResponse + * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.ListBackupsResponse} ListBackupsResponse + * @returns {google.cloud.metastore.v1.CreateMetadataImportRequest} CreateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsResponse.decode = function decode(reader, length) { + CreateMetadataImportRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ListBackupsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.CreateMetadataImportRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.backups && message.backups.length)) - message.backups = []; - message.backups.push($root.google.cloud.metastore.v1.Backup.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.metadataImportId = reader.string(); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.metadataImport = $root.google.cloud.metastore.v1.MetadataImport.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); break; } default: @@ -8018,169 +8253,154 @@ }; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateMetadataImportRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.ListBackupsResponse + * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.ListBackupsResponse} ListBackupsResponse + * @returns {google.cloud.metastore.v1.CreateMetadataImportRequest} CreateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { + CreateMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBackupsResponse message. + * Verifies a CreateMetadataImportRequest message. * @function verify - * @memberof google.cloud.metastore.v1.ListBackupsResponse + * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBackupsResponse.verify = function verify(message) { + CreateMetadataImportRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.backups != null && message.hasOwnProperty("backups")) { - if (!Array.isArray(message.backups)) - return "backups: array expected"; - for (var i = 0; i < message.backups.length; ++i) { - var error = $root.google.cloud.metastore.v1.Backup.verify(message.backups[i]); - if (error) - return "backups." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.metadataImportId != null && message.hasOwnProperty("metadataImportId")) + if (!$util.isString(message.metadataImportId)) + return "metadataImportId: string expected"; + if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) { + var error = $root.google.cloud.metastore.v1.MetadataImport.verify(message.metadataImport); + if (error) + return "metadataImport." + error; } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.ListBackupsResponse + * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.ListBackupsResponse} ListBackupsResponse + * @returns {google.cloud.metastore.v1.CreateMetadataImportRequest} CreateMetadataImportRequest */ - ListBackupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.ListBackupsResponse) + CreateMetadataImportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.CreateMetadataImportRequest) return object; - var message = new $root.google.cloud.metastore.v1.ListBackupsResponse(); - if (object.backups) { - if (!Array.isArray(object.backups)) - throw TypeError(".google.cloud.metastore.v1.ListBackupsResponse.backups: array expected"); - message.backups = []; - for (var i = 0; i < object.backups.length; ++i) { - if (typeof object.backups[i] !== "object") - throw TypeError(".google.cloud.metastore.v1.ListBackupsResponse.backups: object expected"); - message.backups[i] = $root.google.cloud.metastore.v1.Backup.fromObject(object.backups[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.metastore.v1.ListBackupsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); + var message = new $root.google.cloud.metastore.v1.CreateMetadataImportRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.metadataImportId != null) + message.metadataImportId = String(object.metadataImportId); + if (object.metadataImport != null) { + if (typeof object.metadataImport !== "object") + throw TypeError(".google.cloud.metastore.v1.CreateMetadataImportRequest.metadataImport: object expected"); + message.metadataImport = $root.google.cloud.metastore.v1.MetadataImport.fromObject(object.metadataImport); } - return message; + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; }; /** - * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateMetadataImportRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.ListBackupsResponse + * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1.ListBackupsResponse} message ListBackupsResponse + * @param {google.cloud.metastore.v1.CreateMetadataImportRequest} message CreateMetadataImportRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBackupsResponse.toObject = function toObject(message, options) { + CreateMetadataImportRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.backups = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backups && message.backups.length) { - object.backups = []; - for (var j = 0; j < message.backups.length; ++j) - object.backups[j] = $root.google.cloud.metastore.v1.Backup.toObject(message.backups[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.parent = ""; + object.metadataImportId = ""; + object.metadataImport = null; + object.requestId = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.metadataImportId != null && message.hasOwnProperty("metadataImportId")) + object.metadataImportId = message.metadataImportId; + if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) + object.metadataImport = $root.google.cloud.metastore.v1.MetadataImport.toObject(message.metadataImport, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this ListBackupsResponse to JSON. + * Converts this CreateMetadataImportRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.ListBackupsResponse + * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest * @instance * @returns {Object.} JSON object */ - ListBackupsResponse.prototype.toJSON = function toJSON() { + CreateMetadataImportRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBackupsResponse + * Gets the default type url for CreateMetadataImportRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.ListBackupsResponse + * @memberof google.cloud.metastore.v1.CreateMetadataImportRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.ListBackupsResponse"; + return typeUrlPrefix + "/google.cloud.metastore.v1.CreateMetadataImportRequest"; }; - return ListBackupsResponse; + return CreateMetadataImportRequest; })(); - v1.GetBackupRequest = (function() { + v1.UpdateMetadataImportRequest = (function() { /** - * Properties of a GetBackupRequest. + * Properties of an UpdateMetadataImportRequest. * @memberof google.cloud.metastore.v1 - * @interface IGetBackupRequest - * @property {string|null} [name] GetBackupRequest name + * @interface IUpdateMetadataImportRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMetadataImportRequest updateMask + * @property {google.cloud.metastore.v1.IMetadataImport|null} [metadataImport] UpdateMetadataImportRequest metadataImport + * @property {string|null} [requestId] UpdateMetadataImportRequest requestId */ /** - * Constructs a new GetBackupRequest. + * Constructs a new UpdateMetadataImportRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a GetBackupRequest. - * @implements IGetBackupRequest + * @classdesc Represents an UpdateMetadataImportRequest. + * @implements IUpdateMetadataImportRequest * @constructor - * @param {google.cloud.metastore.v1.IGetBackupRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IUpdateMetadataImportRequest=} [properties] Properties to set */ - function GetBackupRequest(properties) { + function UpdateMetadataImportRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8188,75 +8408,103 @@ } /** - * GetBackupRequest name. - * @member {string} name - * @memberof google.cloud.metastore.v1.GetBackupRequest + * UpdateMetadataImportRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest * @instance */ - GetBackupRequest.prototype.name = ""; + UpdateMetadataImportRequest.prototype.updateMask = null; /** - * Creates a new GetBackupRequest instance using the specified properties. + * UpdateMetadataImportRequest metadataImport. + * @member {google.cloud.metastore.v1.IMetadataImport|null|undefined} metadataImport + * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * @instance + */ + UpdateMetadataImportRequest.prototype.metadataImport = null; + + /** + * UpdateMetadataImportRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest + * @instance + */ + UpdateMetadataImportRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateMetadataImportRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.GetBackupRequest + * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1.IGetBackupRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.GetBackupRequest} GetBackupRequest instance + * @param {google.cloud.metastore.v1.IUpdateMetadataImportRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.UpdateMetadataImportRequest} UpdateMetadataImportRequest instance */ - GetBackupRequest.create = function create(properties) { - return new GetBackupRequest(properties); + UpdateMetadataImportRequest.create = function create(properties) { + return new UpdateMetadataImportRequest(properties); }; /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1.GetBackupRequest.verify|verify} messages. + * Encodes the specified UpdateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1.UpdateMetadataImportRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.GetBackupRequest + * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IUpdateMetadataImportRequest} message UpdateMetadataImportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupRequest.encode = function encode(message, writer) { + UpdateMetadataImportRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metadataImport != null && Object.hasOwnProperty.call(message, "metadataImport")) + $root.google.cloud.metastore.v1.MetadataImport.encode(message.metadataImport, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.GetBackupRequest.verify|verify} messages. + * Encodes the specified UpdateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.UpdateMetadataImportRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.GetBackupRequest + * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IUpdateMetadataImportRequest} message UpdateMetadataImportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBackupRequest message from the specified reader or buffer. + * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.GetBackupRequest + * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.GetBackupRequest} GetBackupRequest + * @returns {google.cloud.metastore.v1.UpdateMetadataImportRequest} UpdateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupRequest.decode = function decode(reader, length) { + UpdateMetadataImportRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.GetBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.UpdateMetadataImportRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.metadataImport = $root.google.cloud.metastore.v1.MetadataImport.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); break; } default: @@ -8268,125 +8516,153 @@ }; /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.GetBackupRequest + * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.GetBackupRequest} GetBackupRequest + * @returns {google.cloud.metastore.v1.UpdateMetadataImportRequest} UpdateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBackupRequest message. + * Verifies an UpdateMetadataImportRequest message. * @function verify - * @memberof google.cloud.metastore.v1.GetBackupRequest + * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBackupRequest.verify = function verify(message) { + UpdateMetadataImportRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) { + var error = $root.google.cloud.metastore.v1.MetadataImport.verify(message.metadataImport); + if (error) + return "metadataImport." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.GetBackupRequest + * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.GetBackupRequest} GetBackupRequest + * @returns {google.cloud.metastore.v1.UpdateMetadataImportRequest} UpdateMetadataImportRequest */ - GetBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.GetBackupRequest) + UpdateMetadataImportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.UpdateMetadataImportRequest) return object; - var message = new $root.google.cloud.metastore.v1.GetBackupRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.metastore.v1.UpdateMetadataImportRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.metastore.v1.UpdateMetadataImportRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.metadataImport != null) { + if (typeof object.metadataImport !== "object") + throw TypeError(".google.cloud.metastore.v1.UpdateMetadataImportRequest.metadataImport: object expected"); + message.metadataImport = $root.google.cloud.metastore.v1.MetadataImport.fromObject(object.metadataImport); + } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateMetadataImportRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.GetBackupRequest + * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1.GetBackupRequest} message GetBackupRequest + * @param {google.cloud.metastore.v1.UpdateMetadataImportRequest} message UpdateMetadataImportRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBackupRequest.toObject = function toObject(message, options) { + UpdateMetadataImportRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.updateMask = null; + object.metadataImport = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) + object.metadataImport = $root.google.cloud.metastore.v1.MetadataImport.toObject(message.metadataImport, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this GetBackupRequest to JSON. + * Converts this UpdateMetadataImportRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.GetBackupRequest + * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest * @instance * @returns {Object.} JSON object */ - GetBackupRequest.prototype.toJSON = function toJSON() { + UpdateMetadataImportRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetBackupRequest + * Gets the default type url for UpdateMetadataImportRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.GetBackupRequest + * @memberof google.cloud.metastore.v1.UpdateMetadataImportRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.GetBackupRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.UpdateMetadataImportRequest"; }; - return GetBackupRequest; + return UpdateMetadataImportRequest; })(); - v1.CreateBackupRequest = (function() { + v1.ListBackupsRequest = (function() { /** - * Properties of a CreateBackupRequest. + * Properties of a ListBackupsRequest. * @memberof google.cloud.metastore.v1 - * @interface ICreateBackupRequest - * @property {string|null} [parent] CreateBackupRequest parent - * @property {string|null} [backupId] CreateBackupRequest backupId - * @property {google.cloud.metastore.v1.IBackup|null} [backup] CreateBackupRequest backup - * @property {string|null} [requestId] CreateBackupRequest requestId + * @interface IListBackupsRequest + * @property {string|null} [parent] ListBackupsRequest parent + * @property {number|null} [pageSize] ListBackupsRequest pageSize + * @property {string|null} [pageToken] ListBackupsRequest pageToken + * @property {string|null} [filter] ListBackupsRequest filter + * @property {string|null} [orderBy] ListBackupsRequest orderBy */ /** - * Constructs a new CreateBackupRequest. + * Constructs a new ListBackupsRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a CreateBackupRequest. - * @implements ICreateBackupRequest + * @classdesc Represents a ListBackupsRequest. + * @implements IListBackupsRequest * @constructor - * @param {google.cloud.metastore.v1.ICreateBackupRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IListBackupsRequest=} [properties] Properties to set */ - function CreateBackupRequest(properties) { + function ListBackupsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8394,100 +8670,110 @@ } /** - * CreateBackupRequest parent. + * ListBackupsRequest parent. * @member {string} parent - * @memberof google.cloud.metastore.v1.CreateBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsRequest * @instance */ - CreateBackupRequest.prototype.parent = ""; + ListBackupsRequest.prototype.parent = ""; /** - * CreateBackupRequest backupId. - * @member {string} backupId - * @memberof google.cloud.metastore.v1.CreateBackupRequest + * ListBackupsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.metastore.v1.ListBackupsRequest * @instance */ - CreateBackupRequest.prototype.backupId = ""; + ListBackupsRequest.prototype.pageSize = 0; /** - * CreateBackupRequest backup. - * @member {google.cloud.metastore.v1.IBackup|null|undefined} backup - * @memberof google.cloud.metastore.v1.CreateBackupRequest + * ListBackupsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.metastore.v1.ListBackupsRequest * @instance */ - CreateBackupRequest.prototype.backup = null; + ListBackupsRequest.prototype.pageToken = ""; /** - * CreateBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1.CreateBackupRequest + * ListBackupsRequest filter. + * @member {string} filter + * @memberof google.cloud.metastore.v1.ListBackupsRequest * @instance */ - CreateBackupRequest.prototype.requestId = ""; + ListBackupsRequest.prototype.filter = ""; /** - * Creates a new CreateBackupRequest instance using the specified properties. + * ListBackupsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.metastore.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListBackupsRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.CreateBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsRequest * @static - * @param {google.cloud.metastore.v1.ICreateBackupRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.CreateBackupRequest} CreateBackupRequest instance + * @param {google.cloud.metastore.v1.IListBackupsRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.ListBackupsRequest} ListBackupsRequest instance */ - CreateBackupRequest.create = function create(properties) { - return new CreateBackupRequest(properties); + ListBackupsRequest.create = function create(properties) { + return new ListBackupsRequest(properties); }; /** - * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1.CreateBackupRequest.verify|verify} messages. + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.CreateBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsRequest * @static - * @param {google.cloud.metastore.v1.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBackupRequest.encode = function encode(message, writer) { + ListBackupsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupId); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - $root.google.cloud.metastore.v1.Backup.encode(message.backup, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.CreateBackupRequest.verify|verify} messages. + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.CreateBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsRequest * @static - * @param {google.cloud.metastore.v1.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateBackupRequest message from the specified reader or buffer. + * Decodes a ListBackupsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.CreateBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.CreateBackupRequest} CreateBackupRequest + * @returns {google.cloud.metastore.v1.ListBackupsRequest} ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBackupRequest.decode = function decode(reader, length) { + ListBackupsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.CreateBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ListBackupsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -8496,15 +8782,19 @@ break; } case 2: { - message.backupId = reader.string(); + message.pageSize = reader.int32(); break; } case 3: { - message.backup = $root.google.cloud.metastore.v1.Backup.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } case 4: { - message.requestId = reader.string(); + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -8516,153 +8806,159 @@ }; /** - * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.CreateBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.CreateBackupRequest} CreateBackupRequest + * @returns {google.cloud.metastore.v1.ListBackupsRequest} ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateBackupRequest message. + * Verifies a ListBackupsRequest message. * @function verify - * @memberof google.cloud.metastore.v1.CreateBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateBackupRequest.verify = function verify(message) { + ListBackupsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.backupId != null && message.hasOwnProperty("backupId")) - if (!$util.isString(message.backupId)) - return "backupId: string expected"; - if (message.backup != null && message.hasOwnProperty("backup")) { - var error = $root.google.cloud.metastore.v1.Backup.verify(message.backup); - if (error) - return "backup." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.CreateBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.CreateBackupRequest} CreateBackupRequest + * @returns {google.cloud.metastore.v1.ListBackupsRequest} ListBackupsRequest */ - CreateBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.CreateBackupRequest) + ListBackupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.ListBackupsRequest) return object; - var message = new $root.google.cloud.metastore.v1.CreateBackupRequest(); + var message = new $root.google.cloud.metastore.v1.ListBackupsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.backupId != null) - message.backupId = String(object.backupId); - if (object.backup != null) { - if (typeof object.backup !== "object") - throw TypeError(".google.cloud.metastore.v1.CreateBackupRequest.backup: object expected"); - message.backup = $root.google.cloud.metastore.v1.Backup.fromObject(object.backup); - } - if (object.requestId != null) - message.requestId = String(object.requestId); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.CreateBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsRequest * @static - * @param {google.cloud.metastore.v1.CreateBackupRequest} message CreateBackupRequest + * @param {google.cloud.metastore.v1.ListBackupsRequest} message ListBackupsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateBackupRequest.toObject = function toObject(message, options) { + ListBackupsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.backupId = ""; - object.backup = null; - object.requestId = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.backupId != null && message.hasOwnProperty("backupId")) - object.backupId = message.backupId; - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = $root.google.cloud.metastore.v1.Backup.toObject(message.backup, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this CreateBackupRequest to JSON. + * Converts this ListBackupsRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.CreateBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsRequest * @instance * @returns {Object.} JSON object */ - CreateBackupRequest.prototype.toJSON = function toJSON() { + ListBackupsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateBackupRequest + * Gets the default type url for ListBackupsRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.CreateBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.CreateBackupRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.ListBackupsRequest"; }; - return CreateBackupRequest; + return ListBackupsRequest; })(); - v1.DeleteBackupRequest = (function() { + v1.ListBackupsResponse = (function() { /** - * Properties of a DeleteBackupRequest. + * Properties of a ListBackupsResponse. * @memberof google.cloud.metastore.v1 - * @interface IDeleteBackupRequest - * @property {string|null} [name] DeleteBackupRequest name - * @property {string|null} [requestId] DeleteBackupRequest requestId + * @interface IListBackupsResponse + * @property {Array.|null} [backups] ListBackupsResponse backups + * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupsResponse unreachable */ /** - * Constructs a new DeleteBackupRequest. + * Constructs a new ListBackupsResponse. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a DeleteBackupRequest. - * @implements IDeleteBackupRequest + * @classdesc Represents a ListBackupsResponse. + * @implements IListBackupsResponse * @constructor - * @param {google.cloud.metastore.v1.IDeleteBackupRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IListBackupsResponse=} [properties] Properties to set */ - function DeleteBackupRequest(properties) { + function ListBackupsResponse(properties) { + this.backups = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8670,89 +8966,109 @@ } /** - * DeleteBackupRequest name. - * @member {string} name - * @memberof google.cloud.metastore.v1.DeleteBackupRequest + * ListBackupsResponse backups. + * @member {Array.} backups + * @memberof google.cloud.metastore.v1.ListBackupsResponse * @instance */ - DeleteBackupRequest.prototype.name = ""; + ListBackupsResponse.prototype.backups = $util.emptyArray; /** - * DeleteBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1.DeleteBackupRequest + * ListBackupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.metastore.v1.ListBackupsResponse * @instance */ - DeleteBackupRequest.prototype.requestId = ""; + ListBackupsResponse.prototype.nextPageToken = ""; /** - * Creates a new DeleteBackupRequest instance using the specified properties. + * ListBackupsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.metastore.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupsResponse instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.DeleteBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsResponse * @static - * @param {google.cloud.metastore.v1.IDeleteBackupRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.DeleteBackupRequest} DeleteBackupRequest instance + * @param {google.cloud.metastore.v1.IListBackupsResponse=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.ListBackupsResponse} ListBackupsResponse instance */ - DeleteBackupRequest.create = function create(properties) { - return new DeleteBackupRequest(properties); + ListBackupsResponse.create = function create(properties) { + return new ListBackupsResponse(properties); }; /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1.DeleteBackupRequest.verify|verify} messages. + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.DeleteBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsResponse * @static - * @param {google.cloud.metastore.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBackupRequest.encode = function encode(message, writer) { + ListBackupsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.backups != null && message.backups.length) + for (var i = 0; i < message.backups.length; ++i) + $root.google.cloud.metastore.v1.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.DeleteBackupRequest.verify|verify} messages. + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListBackupsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.DeleteBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsResponse * @static - * @param {google.cloud.metastore.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * Decodes a ListBackupsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.DeleteBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.DeleteBackupRequest} DeleteBackupRequest + * @returns {google.cloud.metastore.v1.ListBackupsResponse} ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBackupRequest.decode = function decode(reader, length) { + ListBackupsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.DeleteBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ListBackupsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.google.cloud.metastore.v1.Backup.decode(reader, reader.uint32())); break; } case 2: { - message.requestId = reader.string(); + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -8764,134 +9080,169 @@ }; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.DeleteBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.DeleteBackupRequest} DeleteBackupRequest + * @returns {google.cloud.metastore.v1.ListBackupsResponse} ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { + ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteBackupRequest message. + * Verifies a ListBackupsResponse message. * @function verify - * @memberof google.cloud.metastore.v1.DeleteBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteBackupRequest.verify = function verify(message) { + ListBackupsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.backups != null && message.hasOwnProperty("backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (var i = 0; i < message.backups.length; ++i) { + var error = $root.google.cloud.metastore.v1.Backup.verify(message.backups[i]); + if (error) + return "backups." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } return null; }; /** - * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.DeleteBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.DeleteBackupRequest} DeleteBackupRequest + * @returns {google.cloud.metastore.v1.ListBackupsResponse} ListBackupsResponse */ - DeleteBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.DeleteBackupRequest) + ListBackupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.ListBackupsResponse) return object; - var message = new $root.google.cloud.metastore.v1.DeleteBackupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); + var message = new $root.google.cloud.metastore.v1.ListBackupsResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".google.cloud.metastore.v1.ListBackupsResponse.backups: array expected"); + message.backups = []; + for (var i = 0; i < object.backups.length; ++i) { + if (typeof object.backups[i] !== "object") + throw TypeError(".google.cloud.metastore.v1.ListBackupsResponse.backups: object expected"); + message.backups[i] = $root.google.cloud.metastore.v1.Backup.fromObject(object.backups[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.metastore.v1.ListBackupsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; /** - * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.DeleteBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsResponse * @static - * @param {google.cloud.metastore.v1.DeleteBackupRequest} message DeleteBackupRequest + * @param {google.cloud.metastore.v1.ListBackupsResponse} message ListBackupsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteBackupRequest.toObject = function toObject(message, options) { + ListBackupsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; + if (options.arrays || options.defaults) { + object.backups = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backups && message.backups.length) { + object.backups = []; + for (var j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.google.cloud.metastore.v1.Backup.toObject(message.backups[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; return object; }; /** - * Converts this DeleteBackupRequest to JSON. + * Converts this ListBackupsResponse to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.DeleteBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsResponse * @instance * @returns {Object.} JSON object */ - DeleteBackupRequest.prototype.toJSON = function toJSON() { + ListBackupsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteBackupRequest + * Gets the default type url for ListBackupsResponse * @function getTypeUrl - * @memberof google.cloud.metastore.v1.DeleteBackupRequest + * @memberof google.cloud.metastore.v1.ListBackupsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.DeleteBackupRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.ListBackupsResponse"; }; - return DeleteBackupRequest; + return ListBackupsResponse; })(); - v1.ExportMetadataRequest = (function() { + v1.GetBackupRequest = (function() { /** - * Properties of an ExportMetadataRequest. + * Properties of a GetBackupRequest. * @memberof google.cloud.metastore.v1 - * @interface IExportMetadataRequest - * @property {string|null} [destinationGcsFolder] ExportMetadataRequest destinationGcsFolder - * @property {string|null} [service] ExportMetadataRequest service - * @property {string|null} [requestId] ExportMetadataRequest requestId - * @property {google.cloud.metastore.v1.DatabaseDumpSpec.Type|null} [databaseDumpType] ExportMetadataRequest databaseDumpType + * @interface IGetBackupRequest + * @property {string|null} [name] GetBackupRequest name */ /** - * Constructs a new ExportMetadataRequest. + * Constructs a new GetBackupRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents an ExportMetadataRequest. - * @implements IExportMetadataRequest + * @classdesc Represents a GetBackupRequest. + * @implements IGetBackupRequest * @constructor - * @param {google.cloud.metastore.v1.IExportMetadataRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IGetBackupRequest=} [properties] Properties to set */ - function ExportMetadataRequest(properties) { + function GetBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8899,131 +9250,75 @@ } /** - * ExportMetadataRequest destinationGcsFolder. - * @member {string|null|undefined} destinationGcsFolder - * @memberof google.cloud.metastore.v1.ExportMetadataRequest - * @instance - */ - ExportMetadataRequest.prototype.destinationGcsFolder = null; - - /** - * ExportMetadataRequest service. - * @member {string} service - * @memberof google.cloud.metastore.v1.ExportMetadataRequest - * @instance - */ - ExportMetadataRequest.prototype.service = ""; - - /** - * ExportMetadataRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1.ExportMetadataRequest - * @instance - */ - ExportMetadataRequest.prototype.requestId = ""; - - /** - * ExportMetadataRequest databaseDumpType. - * @member {google.cloud.metastore.v1.DatabaseDumpSpec.Type} databaseDumpType - * @memberof google.cloud.metastore.v1.ExportMetadataRequest - * @instance - */ - ExportMetadataRequest.prototype.databaseDumpType = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ExportMetadataRequest destination. - * @member {"destinationGcsFolder"|undefined} destination - * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * GetBackupRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1.GetBackupRequest * @instance */ - Object.defineProperty(ExportMetadataRequest.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["destinationGcsFolder"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetBackupRequest.prototype.name = ""; /** - * Creates a new ExportMetadataRequest instance using the specified properties. + * Creates a new GetBackupRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @memberof google.cloud.metastore.v1.GetBackupRequest * @static - * @param {google.cloud.metastore.v1.IExportMetadataRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.ExportMetadataRequest} ExportMetadataRequest instance + * @param {google.cloud.metastore.v1.IGetBackupRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.GetBackupRequest} GetBackupRequest instance */ - ExportMetadataRequest.create = function create(properties) { - return new ExportMetadataRequest(properties); + GetBackupRequest.create = function create(properties) { + return new GetBackupRequest(properties); }; /** - * Encodes the specified ExportMetadataRequest message. Does not implicitly {@link google.cloud.metastore.v1.ExportMetadataRequest.verify|verify} messages. + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1.GetBackupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @memberof google.cloud.metastore.v1.GetBackupRequest * @static - * @param {google.cloud.metastore.v1.IExportMetadataRequest} message ExportMetadataRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportMetadataRequest.encode = function encode(message, writer) { + GetBackupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - if (message.destinationGcsFolder != null && Object.hasOwnProperty.call(message, "destinationGcsFolder")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationGcsFolder); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - if (message.databaseDumpType != null && Object.hasOwnProperty.call(message, "databaseDumpType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.databaseDumpType); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ExportMetadataRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ExportMetadataRequest.verify|verify} messages. + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.GetBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @memberof google.cloud.metastore.v1.GetBackupRequest * @static - * @param {google.cloud.metastore.v1.IExportMetadataRequest} message ExportMetadataRequest message or plain object to encode + * @param {google.cloud.metastore.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportMetadataRequest message from the specified reader or buffer. + * Decodes a GetBackupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @memberof google.cloud.metastore.v1.GetBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.ExportMetadataRequest} ExportMetadataRequest + * @returns {google.cloud.metastore.v1.GetBackupRequest} GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportMetadataRequest.decode = function decode(reader, length) { + GetBackupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ExportMetadataRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.GetBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.destinationGcsFolder = reader.string(); - break; - } case 1: { - message.service = reader.string(); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - case 4: { - message.databaseDumpType = reader.int32(); + message.name = reader.string(); break; } default: @@ -9035,179 +9330,125 @@ }; /** - * Decodes an ExportMetadataRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @memberof google.cloud.metastore.v1.GetBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.ExportMetadataRequest} ExportMetadataRequest + * @returns {google.cloud.metastore.v1.GetBackupRequest} GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportMetadataRequest.decodeDelimited = function decodeDelimited(reader) { + GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportMetadataRequest message. + * Verifies a GetBackupRequest message. * @function verify - * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @memberof google.cloud.metastore.v1.GetBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportMetadataRequest.verify = function verify(message) { + GetBackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.destinationGcsFolder != null && message.hasOwnProperty("destinationGcsFolder")) { - properties.destination = 1; - if (!$util.isString(message.destinationGcsFolder)) - return "destinationGcsFolder: string expected"; - } - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) - switch (message.databaseDumpType) { - default: - return "databaseDumpType: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an ExportMetadataRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @memberof google.cloud.metastore.v1.GetBackupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.ExportMetadataRequest} ExportMetadataRequest + * @returns {google.cloud.metastore.v1.GetBackupRequest} GetBackupRequest */ - ExportMetadataRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.ExportMetadataRequest) + GetBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.GetBackupRequest) return object; - var message = new $root.google.cloud.metastore.v1.ExportMetadataRequest(); - if (object.destinationGcsFolder != null) - message.destinationGcsFolder = String(object.destinationGcsFolder); - if (object.service != null) - message.service = String(object.service); - if (object.requestId != null) - message.requestId = String(object.requestId); - switch (object.databaseDumpType) { - default: - if (typeof object.databaseDumpType === "number") { - message.databaseDumpType = object.databaseDumpType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.databaseDumpType = 0; - break; - case "MYSQL": - case 1: - message.databaseDumpType = 1; - break; - case "AVRO": - case 2: - message.databaseDumpType = 2; - break; - } + var message = new $root.google.cloud.metastore.v1.GetBackupRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an ExportMetadataRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @memberof google.cloud.metastore.v1.GetBackupRequest * @static - * @param {google.cloud.metastore.v1.ExportMetadataRequest} message ExportMetadataRequest + * @param {google.cloud.metastore.v1.GetBackupRequest} message GetBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportMetadataRequest.toObject = function toObject(message, options) { + GetBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.service = ""; - object.requestId = ""; - object.databaseDumpType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - } - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.destinationGcsFolder != null && message.hasOwnProperty("destinationGcsFolder")) { - object.destinationGcsFolder = message.destinationGcsFolder; - if (options.oneofs) - object.destination = "destinationGcsFolder"; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) - object.databaseDumpType = options.enums === String ? $root.google.cloud.metastore.v1.DatabaseDumpSpec.Type[message.databaseDumpType] === undefined ? message.databaseDumpType : $root.google.cloud.metastore.v1.DatabaseDumpSpec.Type[message.databaseDumpType] : message.databaseDumpType; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ExportMetadataRequest to JSON. + * Converts this GetBackupRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @memberof google.cloud.metastore.v1.GetBackupRequest * @instance * @returns {Object.} JSON object */ - ExportMetadataRequest.prototype.toJSON = function toJSON() { + GetBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportMetadataRequest + * Gets the default type url for GetBackupRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @memberof google.cloud.metastore.v1.GetBackupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportMetadataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.ExportMetadataRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.GetBackupRequest"; }; - return ExportMetadataRequest; + return GetBackupRequest; })(); - v1.RestoreServiceRequest = (function() { + v1.CreateBackupRequest = (function() { /** - * Properties of a RestoreServiceRequest. + * Properties of a CreateBackupRequest. * @memberof google.cloud.metastore.v1 - * @interface IRestoreServiceRequest - * @property {string|null} [service] RestoreServiceRequest service - * @property {string|null} [backup] RestoreServiceRequest backup - * @property {google.cloud.metastore.v1.Restore.RestoreType|null} [restoreType] RestoreServiceRequest restoreType - * @property {string|null} [requestId] RestoreServiceRequest requestId + * @interface ICreateBackupRequest + * @property {string|null} [parent] CreateBackupRequest parent + * @property {string|null} [backupId] CreateBackupRequest backupId + * @property {google.cloud.metastore.v1.IBackup|null} [backup] CreateBackupRequest backup + * @property {string|null} [requestId] CreateBackupRequest requestId */ /** - * Constructs a new RestoreServiceRequest. + * Constructs a new CreateBackupRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a RestoreServiceRequest. - * @implements IRestoreServiceRequest + * @classdesc Represents a CreateBackupRequest. + * @implements ICreateBackupRequest * @constructor - * @param {google.cloud.metastore.v1.IRestoreServiceRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1.ICreateBackupRequest=} [properties] Properties to set */ - function RestoreServiceRequest(properties) { + function CreateBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9215,113 +9456,113 @@ } /** - * RestoreServiceRequest service. - * @member {string} service - * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * CreateBackupRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1.CreateBackupRequest * @instance */ - RestoreServiceRequest.prototype.service = ""; + CreateBackupRequest.prototype.parent = ""; /** - * RestoreServiceRequest backup. - * @member {string} backup - * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * CreateBackupRequest backupId. + * @member {string} backupId + * @memberof google.cloud.metastore.v1.CreateBackupRequest * @instance */ - RestoreServiceRequest.prototype.backup = ""; + CreateBackupRequest.prototype.backupId = ""; /** - * RestoreServiceRequest restoreType. - * @member {google.cloud.metastore.v1.Restore.RestoreType} restoreType - * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * CreateBackupRequest backup. + * @member {google.cloud.metastore.v1.IBackup|null|undefined} backup + * @memberof google.cloud.metastore.v1.CreateBackupRequest * @instance */ - RestoreServiceRequest.prototype.restoreType = 0; + CreateBackupRequest.prototype.backup = null; /** - * RestoreServiceRequest requestId. + * CreateBackupRequest requestId. * @member {string} requestId - * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @memberof google.cloud.metastore.v1.CreateBackupRequest * @instance */ - RestoreServiceRequest.prototype.requestId = ""; + CreateBackupRequest.prototype.requestId = ""; /** - * Creates a new RestoreServiceRequest instance using the specified properties. + * Creates a new CreateBackupRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @memberof google.cloud.metastore.v1.CreateBackupRequest * @static - * @param {google.cloud.metastore.v1.IRestoreServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.RestoreServiceRequest} RestoreServiceRequest instance + * @param {google.cloud.metastore.v1.ICreateBackupRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.CreateBackupRequest} CreateBackupRequest instance */ - RestoreServiceRequest.create = function create(properties) { - return new RestoreServiceRequest(properties); + CreateBackupRequest.create = function create(properties) { + return new CreateBackupRequest(properties); }; /** - * Encodes the specified RestoreServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.RestoreServiceRequest.verify|verify} messages. + * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1.CreateBackupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @memberof google.cloud.metastore.v1.CreateBackupRequest * @static - * @param {google.cloud.metastore.v1.IRestoreServiceRequest} message RestoreServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreServiceRequest.encode = function encode(message, writer) { + CreateBackupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupId); if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backup); - if (message.restoreType != null && Object.hasOwnProperty.call(message, "restoreType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.restoreType); + $root.google.cloud.metastore.v1.Backup.encode(message.backup, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; /** - * Encodes the specified RestoreServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.RestoreServiceRequest.verify|verify} messages. + * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.CreateBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @memberof google.cloud.metastore.v1.CreateBackupRequest * @static - * @param {google.cloud.metastore.v1.IRestoreServiceRequest} message RestoreServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RestoreServiceRequest message from the specified reader or buffer. + * Decodes a CreateBackupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @memberof google.cloud.metastore.v1.CreateBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.RestoreServiceRequest} RestoreServiceRequest + * @returns {google.cloud.metastore.v1.CreateBackupRequest} CreateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreServiceRequest.decode = function decode(reader, length) { + CreateBackupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.RestoreServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.CreateBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.service = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.backup = reader.string(); + message.backupId = reader.string(); break; } case 3: { - message.restoreType = reader.int32(); + message.backup = $root.google.cloud.metastore.v1.Backup.decode(reader, reader.uint32()); break; } case 4: { @@ -9337,47 +9578,43 @@ }; /** - * Decodes a RestoreServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @memberof google.cloud.metastore.v1.CreateBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.RestoreServiceRequest} RestoreServiceRequest + * @returns {google.cloud.metastore.v1.CreateBackupRequest} CreateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreServiceRequest.decodeDelimited = function decodeDelimited(reader) { + CreateBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RestoreServiceRequest message. + * Verifies a CreateBackupRequest message. * @function verify - * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @memberof google.cloud.metastore.v1.CreateBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RestoreServiceRequest.verify = function verify(message) { + CreateBackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.backup != null && message.hasOwnProperty("backup")) - if (!$util.isString(message.backup)) - return "backup: string expected"; - if (message.restoreType != null && message.hasOwnProperty("restoreType")) - switch (message.restoreType) { - default: - return "restoreType: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.backupId != null && message.hasOwnProperty("backupId")) + if (!$util.isString(message.backupId)) + return "backupId: string expected"; + if (message.backup != null && message.hasOwnProperty("backup")) { + var error = $root.google.cloud.metastore.v1.Backup.verify(message.backup); + if (error) + return "backup." + error; + } if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; @@ -9385,40 +9622,25 @@ }; /** - * Creates a RestoreServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @memberof google.cloud.metastore.v1.CreateBackupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.RestoreServiceRequest} RestoreServiceRequest + * @returns {google.cloud.metastore.v1.CreateBackupRequest} CreateBackupRequest */ - RestoreServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.RestoreServiceRequest) + CreateBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.CreateBackupRequest) return object; - var message = new $root.google.cloud.metastore.v1.RestoreServiceRequest(); - if (object.service != null) - message.service = String(object.service); - if (object.backup != null) - message.backup = String(object.backup); - switch (object.restoreType) { - default: - if (typeof object.restoreType === "number") { - message.restoreType = object.restoreType; - break; - } - break; - case "RESTORE_TYPE_UNSPECIFIED": - case 0: - message.restoreType = 0; - break; - case "FULL": - case 1: - message.restoreType = 1; - break; - case "METADATA_ONLY": - case 2: - message.restoreType = 2; - break; + var message = new $root.google.cloud.metastore.v1.CreateBackupRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupId != null) + message.backupId = String(object.backupId); + if (object.backup != null) { + if (typeof object.backup !== "object") + throw TypeError(".google.cloud.metastore.v1.CreateBackupRequest.backup: object expected"); + message.backup = $root.google.cloud.metastore.v1.Backup.fromObject(object.backup); } if (object.requestId != null) message.requestId = String(object.requestId); @@ -9426,88 +9648,83 @@ }; /** - * Creates a plain object from a RestoreServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @memberof google.cloud.metastore.v1.CreateBackupRequest * @static - * @param {google.cloud.metastore.v1.RestoreServiceRequest} message RestoreServiceRequest + * @param {google.cloud.metastore.v1.CreateBackupRequest} message CreateBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestoreServiceRequest.toObject = function toObject(message, options) { + CreateBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.service = ""; - object.backup = ""; - object.restoreType = options.enums === String ? "RESTORE_TYPE_UNSPECIFIED" : 0; + object.parent = ""; + object.backupId = ""; + object.backup = null; object.requestId = ""; } - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupId != null && message.hasOwnProperty("backupId")) + object.backupId = message.backupId; if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = message.backup; - if (message.restoreType != null && message.hasOwnProperty("restoreType")) - object.restoreType = options.enums === String ? $root.google.cloud.metastore.v1.Restore.RestoreType[message.restoreType] === undefined ? message.restoreType : $root.google.cloud.metastore.v1.Restore.RestoreType[message.restoreType] : message.restoreType; + object.backup = $root.google.cloud.metastore.v1.Backup.toObject(message.backup, options); if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; return object; }; /** - * Converts this RestoreServiceRequest to JSON. + * Converts this CreateBackupRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @memberof google.cloud.metastore.v1.CreateBackupRequest * @instance * @returns {Object.} JSON object */ - RestoreServiceRequest.prototype.toJSON = function toJSON() { + CreateBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RestoreServiceRequest + * Gets the default type url for CreateBackupRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @memberof google.cloud.metastore.v1.CreateBackupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RestoreServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.RestoreServiceRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1.CreateBackupRequest"; }; - return RestoreServiceRequest; + return CreateBackupRequest; })(); - v1.OperationMetadata = (function() { + v1.DeleteBackupRequest = (function() { /** - * Properties of an OperationMetadata. + * Properties of a DeleteBackupRequest. * @memberof google.cloud.metastore.v1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion + * @interface IDeleteBackupRequest + * @property {string|null} [name] DeleteBackupRequest name + * @property {string|null} [requestId] DeleteBackupRequest requestId */ /** - * Constructs a new OperationMetadata. + * Constructs a new DeleteBackupRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata + * @classdesc Represents a DeleteBackupRequest. + * @implements IDeleteBackupRequest * @constructor - * @param {google.cloud.metastore.v1.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IDeleteBackupRequest=} [properties] Properties to set */ - function OperationMetadata(properties) { + function DeleteBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9515,159 +9732,89 @@ } /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.metastore.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.metastore.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.metastore.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.metastore.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.metastore.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusMessage = ""; - - /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.metastore.v1.OperationMetadata + * DeleteBackupRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1.DeleteBackupRequest * @instance */ - OperationMetadata.prototype.requestedCancellation = false; + DeleteBackupRequest.prototype.name = ""; /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.metastore.v1.OperationMetadata + * DeleteBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1.DeleteBackupRequest * @instance */ - OperationMetadata.prototype.apiVersion = ""; + DeleteBackupRequest.prototype.requestId = ""; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new DeleteBackupRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1.OperationMetadata + * @memberof google.cloud.metastore.v1.DeleteBackupRequest * @static - * @param {google.cloud.metastore.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.OperationMetadata} OperationMetadata instance + * @param {google.cloud.metastore.v1.IDeleteBackupRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.DeleteBackupRequest} DeleteBackupRequest instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + DeleteBackupRequest.create = function create(properties) { + return new DeleteBackupRequest(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.metastore.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1.DeleteBackupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.OperationMetadata + * @memberof google.cloud.metastore.v1.DeleteBackupRequest * @static - * @param {google.cloud.metastore.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.metastore.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + DeleteBackupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.DeleteBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.OperationMetadata + * @memberof google.cloud.metastore.v1.DeleteBackupRequest * @static - * @param {google.cloud.metastore.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.metastore.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a DeleteBackupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.OperationMetadata + * @memberof google.cloud.metastore.v1.DeleteBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.metastore.v1.DeleteBackupRequest} DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decode = function decode(reader, length) { + DeleteBackupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.DeleteBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.target = reader.string(); - break; - } - case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.statusMessage = reader.string(); - break; - } - case 6: { - message.requestedCancellation = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); + message.requestId = reader.string(); break; } default: @@ -9679,182 +9826,134 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.OperationMetadata + * @memberof google.cloud.metastore.v1.DeleteBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.metastore.v1.DeleteBackupRequest} DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies a DeleteBackupRequest message. * @function verify - * @memberof google.cloud.metastore.v1.OperationMetadata + * @memberof google.cloud.metastore.v1.DeleteBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationMetadata.verify = function verify(message) { + DeleteBackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.OperationMetadata + * @memberof google.cloud.metastore.v1.DeleteBackupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.metastore.v1.DeleteBackupRequest} DeleteBackupRequest */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.OperationMetadata) + DeleteBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.DeleteBackupRequest) return object; - var message = new $root.google.cloud.metastore.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.metastore.v1.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.metastore.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); + var message = new $root.google.cloud.metastore.v1.DeleteBackupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.OperationMetadata + * @memberof google.cloud.metastore.v1.DeleteBackupRequest * @static - * @param {google.cloud.metastore.v1.OperationMetadata} message OperationMetadata + * @param {google.cloud.metastore.v1.DeleteBackupRequest} message DeleteBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options) { + DeleteBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; + object.name = ""; + object.requestId = ""; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this DeleteBackupRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.OperationMetadata + * @memberof google.cloud.metastore.v1.DeleteBackupRequest * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + DeleteBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for DeleteBackupRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.OperationMetadata + * @memberof google.cloud.metastore.v1.DeleteBackupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.OperationMetadata"; + return typeUrlPrefix + "/google.cloud.metastore.v1.DeleteBackupRequest"; }; - return OperationMetadata; + return DeleteBackupRequest; })(); - v1.LocationMetadata = (function() { + v1.ExportMetadataRequest = (function() { /** - * Properties of a LocationMetadata. + * Properties of an ExportMetadataRequest. * @memberof google.cloud.metastore.v1 - * @interface ILocationMetadata - * @property {Array.|null} [supportedHiveMetastoreVersions] LocationMetadata supportedHiveMetastoreVersions + * @interface IExportMetadataRequest + * @property {string|null} [destinationGcsFolder] ExportMetadataRequest destinationGcsFolder + * @property {string|null} [service] ExportMetadataRequest service + * @property {string|null} [requestId] ExportMetadataRequest requestId + * @property {google.cloud.metastore.v1.DatabaseDumpSpec.Type|null} [databaseDumpType] ExportMetadataRequest databaseDumpType */ /** - * Constructs a new LocationMetadata. + * Constructs a new ExportMetadataRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a LocationMetadata. - * @implements ILocationMetadata + * @classdesc Represents an ExportMetadataRequest. + * @implements IExportMetadataRequest * @constructor - * @param {google.cloud.metastore.v1.ILocationMetadata=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IExportMetadataRequest=} [properties] Properties to set */ - function LocationMetadata(properties) { - this.supportedHiveMetastoreVersions = []; + function ExportMetadataRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9862,78 +9961,131 @@ } /** - * LocationMetadata supportedHiveMetastoreVersions. - * @member {Array.} supportedHiveMetastoreVersions - * @memberof google.cloud.metastore.v1.LocationMetadata + * ExportMetadataRequest destinationGcsFolder. + * @member {string|null|undefined} destinationGcsFolder + * @memberof google.cloud.metastore.v1.ExportMetadataRequest * @instance */ - LocationMetadata.prototype.supportedHiveMetastoreVersions = $util.emptyArray; + ExportMetadataRequest.prototype.destinationGcsFolder = null; /** - * Creates a new LocationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.metastore.v1.LocationMetadata - * @static - * @param {google.cloud.metastore.v1.ILocationMetadata=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.LocationMetadata} LocationMetadata instance + * ExportMetadataRequest service. + * @member {string} service + * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @instance */ - LocationMetadata.create = function create(properties) { - return new LocationMetadata(properties); + ExportMetadataRequest.prototype.service = ""; + + /** + * ExportMetadataRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @instance + */ + ExportMetadataRequest.prototype.requestId = ""; + + /** + * ExportMetadataRequest databaseDumpType. + * @member {google.cloud.metastore.v1.DatabaseDumpSpec.Type} databaseDumpType + * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @instance + */ + ExportMetadataRequest.prototype.databaseDumpType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExportMetadataRequest destination. + * @member {"destinationGcsFolder"|undefined} destination + * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @instance + */ + Object.defineProperty(ExportMetadataRequest.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["destinationGcsFolder"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportMetadataRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1.ExportMetadataRequest + * @static + * @param {google.cloud.metastore.v1.IExportMetadataRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.ExportMetadataRequest} ExportMetadataRequest instance + */ + ExportMetadataRequest.create = function create(properties) { + return new ExportMetadataRequest(properties); }; /** - * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.verify|verify} messages. + * Encodes the specified ExportMetadataRequest message. Does not implicitly {@link google.cloud.metastore.v1.ExportMetadataRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1.LocationMetadata + * @memberof google.cloud.metastore.v1.ExportMetadataRequest * @static - * @param {google.cloud.metastore.v1.ILocationMetadata} message LocationMetadata message or plain object to encode + * @param {google.cloud.metastore.v1.IExportMetadataRequest} message ExportMetadataRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LocationMetadata.encode = function encode(message, writer) { + ExportMetadataRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.supportedHiveMetastoreVersions != null && message.supportedHiveMetastoreVersions.length) - for (var i = 0; i < message.supportedHiveMetastoreVersions.length; ++i) - $root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.encode(message.supportedHiveMetastoreVersions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.destinationGcsFolder != null && Object.hasOwnProperty.call(message, "destinationGcsFolder")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationGcsFolder); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.databaseDumpType != null && Object.hasOwnProperty.call(message, "databaseDumpType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.databaseDumpType); return writer; }; /** - * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.verify|verify} messages. + * Encodes the specified ExportMetadataRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ExportMetadataRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1.LocationMetadata + * @memberof google.cloud.metastore.v1.ExportMetadataRequest * @static - * @param {google.cloud.metastore.v1.ILocationMetadata} message LocationMetadata message or plain object to encode + * @param {google.cloud.metastore.v1.IExportMetadataRequest} message ExportMetadataRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LocationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ExportMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LocationMetadata message from the specified reader or buffer. + * Decodes an ExportMetadataRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.LocationMetadata + * @memberof google.cloud.metastore.v1.ExportMetadataRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.LocationMetadata} LocationMetadata + * @returns {google.cloud.metastore.v1.ExportMetadataRequest} ExportMetadataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LocationMetadata.decode = function decode(reader, length) { + ExportMetadataRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.LocationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ExportMetadataRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: { + message.destinationGcsFolder = reader.string(); + break; + } case 1: { - if (!(message.supportedHiveMetastoreVersions && message.supportedHiveMetastoreVersions.length)) - message.supportedHiveMetastoreVersions = []; - message.supportedHiveMetastoreVersions.push($root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.decode(reader, reader.uint32())); + message.service = reader.string(); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + case 4: { + message.databaseDumpType = reader.int32(); break; } default: @@ -9945,365 +10097,179 @@ }; /** - * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. + * Decodes an ExportMetadataRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.LocationMetadata + * @memberof google.cloud.metastore.v1.ExportMetadataRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.LocationMetadata} LocationMetadata + * @returns {google.cloud.metastore.v1.ExportMetadataRequest} ExportMetadataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LocationMetadata.decodeDelimited = function decodeDelimited(reader) { + ExportMetadataRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LocationMetadata message. + * Verifies an ExportMetadataRequest message. * @function verify - * @memberof google.cloud.metastore.v1.LocationMetadata + * @memberof google.cloud.metastore.v1.ExportMetadataRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LocationMetadata.verify = function verify(message) { + ExportMetadataRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.supportedHiveMetastoreVersions != null && message.hasOwnProperty("supportedHiveMetastoreVersions")) { - if (!Array.isArray(message.supportedHiveMetastoreVersions)) - return "supportedHiveMetastoreVersions: array expected"; - for (var i = 0; i < message.supportedHiveMetastoreVersions.length; ++i) { - var error = $root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.verify(message.supportedHiveMetastoreVersions[i]); - if (error) - return "supportedHiveMetastoreVersions." + error; - } + var properties = {}; + if (message.destinationGcsFolder != null && message.hasOwnProperty("destinationGcsFolder")) { + properties.destination = 1; + if (!$util.isString(message.destinationGcsFolder)) + return "destinationGcsFolder: string expected"; } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) + switch (message.databaseDumpType) { + default: + return "databaseDumpType: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ExportMetadataRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.LocationMetadata + * @memberof google.cloud.metastore.v1.ExportMetadataRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.LocationMetadata} LocationMetadata + * @returns {google.cloud.metastore.v1.ExportMetadataRequest} ExportMetadataRequest */ - LocationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.LocationMetadata) + ExportMetadataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.ExportMetadataRequest) return object; - var message = new $root.google.cloud.metastore.v1.LocationMetadata(); - if (object.supportedHiveMetastoreVersions) { - if (!Array.isArray(object.supportedHiveMetastoreVersions)) - throw TypeError(".google.cloud.metastore.v1.LocationMetadata.supportedHiveMetastoreVersions: array expected"); - message.supportedHiveMetastoreVersions = []; - for (var i = 0; i < object.supportedHiveMetastoreVersions.length; ++i) { - if (typeof object.supportedHiveMetastoreVersions[i] !== "object") - throw TypeError(".google.cloud.metastore.v1.LocationMetadata.supportedHiveMetastoreVersions: object expected"); - message.supportedHiveMetastoreVersions[i] = $root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.fromObject(object.supportedHiveMetastoreVersions[i]); + var message = new $root.google.cloud.metastore.v1.ExportMetadataRequest(); + if (object.destinationGcsFolder != null) + message.destinationGcsFolder = String(object.destinationGcsFolder); + if (object.service != null) + message.service = String(object.service); + if (object.requestId != null) + message.requestId = String(object.requestId); + switch (object.databaseDumpType) { + default: + if (typeof object.databaseDumpType === "number") { + message.databaseDumpType = object.databaseDumpType; + break; } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.databaseDumpType = 0; + break; + case "MYSQL": + case 1: + message.databaseDumpType = 1; + break; + case "AVRO": + case 2: + message.databaseDumpType = 2; + break; } return message; }; /** - * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ExportMetadataRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.LocationMetadata + * @memberof google.cloud.metastore.v1.ExportMetadataRequest * @static - * @param {google.cloud.metastore.v1.LocationMetadata} message LocationMetadata + * @param {google.cloud.metastore.v1.ExportMetadataRequest} message ExportMetadataRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LocationMetadata.toObject = function toObject(message, options) { + ExportMetadataRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.supportedHiveMetastoreVersions = []; - if (message.supportedHiveMetastoreVersions && message.supportedHiveMetastoreVersions.length) { - object.supportedHiveMetastoreVersions = []; - for (var j = 0; j < message.supportedHiveMetastoreVersions.length; ++j) - object.supportedHiveMetastoreVersions[j] = $root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.toObject(message.supportedHiveMetastoreVersions[j], options); + if (options.defaults) { + object.service = ""; + object.requestId = ""; + object.databaseDumpType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.destinationGcsFolder != null && message.hasOwnProperty("destinationGcsFolder")) { + object.destinationGcsFolder = message.destinationGcsFolder; + if (options.oneofs) + object.destination = "destinationGcsFolder"; } + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) + object.databaseDumpType = options.enums === String ? $root.google.cloud.metastore.v1.DatabaseDumpSpec.Type[message.databaseDumpType] === undefined ? message.databaseDumpType : $root.google.cloud.metastore.v1.DatabaseDumpSpec.Type[message.databaseDumpType] : message.databaseDumpType; return object; }; /** - * Converts this LocationMetadata to JSON. + * Converts this ExportMetadataRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.LocationMetadata + * @memberof google.cloud.metastore.v1.ExportMetadataRequest * @instance * @returns {Object.} JSON object */ - LocationMetadata.prototype.toJSON = function toJSON() { + ExportMetadataRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LocationMetadata + * Gets the default type url for ExportMetadataRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.LocationMetadata + * @memberof google.cloud.metastore.v1.ExportMetadataRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LocationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportMetadataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.LocationMetadata"; + return typeUrlPrefix + "/google.cloud.metastore.v1.ExportMetadataRequest"; }; - LocationMetadata.HiveMetastoreVersion = (function() { - - /** - * Properties of a HiveMetastoreVersion. - * @memberof google.cloud.metastore.v1.LocationMetadata - * @interface IHiveMetastoreVersion - * @property {string|null} [version] HiveMetastoreVersion version - * @property {boolean|null} [isDefault] HiveMetastoreVersion isDefault - */ - - /** - * Constructs a new HiveMetastoreVersion. - * @memberof google.cloud.metastore.v1.LocationMetadata - * @classdesc Represents a HiveMetastoreVersion. - * @implements IHiveMetastoreVersion - * @constructor - * @param {google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion=} [properties] Properties to set - */ - function HiveMetastoreVersion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HiveMetastoreVersion version. - * @member {string} version - * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - * @instance - */ - HiveMetastoreVersion.prototype.version = ""; - - /** - * HiveMetastoreVersion isDefault. - * @member {boolean} isDefault - * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - * @instance - */ - HiveMetastoreVersion.prototype.isDefault = false; - - /** - * Creates a new HiveMetastoreVersion instance using the specified properties. - * @function create - * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - * @static - * @param {google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion instance - */ - HiveMetastoreVersion.create = function create(properties) { - return new HiveMetastoreVersion(properties); - }; - - /** - * Encodes the specified HiveMetastoreVersion message. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. - * @function encode - * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - * @static - * @param {google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion} message HiveMetastoreVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HiveMetastoreVersion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDefault); - return writer; - }; - - /** - * Encodes the specified HiveMetastoreVersion message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - * @static - * @param {google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion} message HiveMetastoreVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HiveMetastoreVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HiveMetastoreVersion message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HiveMetastoreVersion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.isDefault = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HiveMetastoreVersion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HiveMetastoreVersion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HiveMetastoreVersion message. - * @function verify - * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HiveMetastoreVersion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.isDefault != null && message.hasOwnProperty("isDefault")) - if (typeof message.isDefault !== "boolean") - return "isDefault: boolean expected"; - return null; - }; - - /** - * Creates a HiveMetastoreVersion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion - */ - HiveMetastoreVersion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) - return object; - var message = new $root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion(); - if (object.version != null) - message.version = String(object.version); - if (object.isDefault != null) - message.isDefault = Boolean(object.isDefault); - return message; - }; - - /** - * Creates a plain object from a HiveMetastoreVersion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - * @static - * @param {google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion} message HiveMetastoreVersion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HiveMetastoreVersion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.isDefault = false; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.isDefault != null && message.hasOwnProperty("isDefault")) - object.isDefault = message.isDefault; - return object; - }; - - /** - * Converts this HiveMetastoreVersion to JSON. - * @function toJSON - * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - * @instance - * @returns {Object.} JSON object - */ - HiveMetastoreVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HiveMetastoreVersion - * @function getTypeUrl - * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HiveMetastoreVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion"; - }; - - return HiveMetastoreVersion; - })(); - - return LocationMetadata; + return ExportMetadataRequest; })(); - v1.DatabaseDumpSpec = (function() { + v1.RestoreServiceRequest = (function() { /** - * Properties of a DatabaseDumpSpec. + * Properties of a RestoreServiceRequest. * @memberof google.cloud.metastore.v1 - * @interface IDatabaseDumpSpec + * @interface IRestoreServiceRequest + * @property {string|null} [service] RestoreServiceRequest service + * @property {string|null} [backup] RestoreServiceRequest backup + * @property {google.cloud.metastore.v1.Restore.RestoreType|null} [restoreType] RestoreServiceRequest restoreType + * @property {string|null} [requestId] RestoreServiceRequest requestId */ /** - * Constructs a new DatabaseDumpSpec. + * Constructs a new RestoreServiceRequest. * @memberof google.cloud.metastore.v1 - * @classdesc Represents a DatabaseDumpSpec. - * @implements IDatabaseDumpSpec + * @classdesc Represents a RestoreServiceRequest. + * @implements IRestoreServiceRequest * @constructor - * @param {google.cloud.metastore.v1.IDatabaseDumpSpec=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IRestoreServiceRequest=} [properties] Properties to set */ - function DatabaseDumpSpec(properties) { + function RestoreServiceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10311,63 +10277,119 @@ } /** - * Creates a new DatabaseDumpSpec instance using the specified properties. - * @function create - * @memberof google.cloud.metastore.v1.DatabaseDumpSpec - * @static - * @param {google.cloud.metastore.v1.IDatabaseDumpSpec=} [properties] Properties to set - * @returns {google.cloud.metastore.v1.DatabaseDumpSpec} DatabaseDumpSpec instance + * RestoreServiceRequest service. + * @member {string} service + * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @instance */ - DatabaseDumpSpec.create = function create(properties) { - return new DatabaseDumpSpec(properties); - }; + RestoreServiceRequest.prototype.service = ""; /** - * Encodes the specified DatabaseDumpSpec message. Does not implicitly {@link google.cloud.metastore.v1.DatabaseDumpSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.metastore.v1.DatabaseDumpSpec - * @static - * @param {google.cloud.metastore.v1.IDatabaseDumpSpec} message DatabaseDumpSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * RestoreServiceRequest backup. + * @member {string} backup + * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @instance */ - DatabaseDumpSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + RestoreServiceRequest.prototype.backup = ""; /** - * Encodes the specified DatabaseDumpSpec message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.DatabaseDumpSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.metastore.v1.DatabaseDumpSpec - * @static - * @param {google.cloud.metastore.v1.IDatabaseDumpSpec} message DatabaseDumpSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseDumpSpec.encodeDelimited = function encodeDelimited(message, writer) { + * RestoreServiceRequest restoreType. + * @member {google.cloud.metastore.v1.Restore.RestoreType} restoreType + * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @instance + */ + RestoreServiceRequest.prototype.restoreType = 0; + + /** + * RestoreServiceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @instance + */ + RestoreServiceRequest.prototype.requestId = ""; + + /** + * Creates a new RestoreServiceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @static + * @param {google.cloud.metastore.v1.IRestoreServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.RestoreServiceRequest} RestoreServiceRequest instance + */ + RestoreServiceRequest.create = function create(properties) { + return new RestoreServiceRequest(properties); + }; + + /** + * Encodes the specified RestoreServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1.RestoreServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @static + * @param {google.cloud.metastore.v1.IRestoreServiceRequest} message RestoreServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backup); + if (message.restoreType != null && Object.hasOwnProperty.call(message, "restoreType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.restoreType); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified RestoreServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.RestoreServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1.RestoreServiceRequest + * @static + * @param {google.cloud.metastore.v1.IRestoreServiceRequest} message RestoreServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DatabaseDumpSpec message from the specified reader or buffer. + * Decodes a RestoreServiceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1.RestoreServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1.DatabaseDumpSpec} DatabaseDumpSpec + * @returns {google.cloud.metastore.v1.RestoreServiceRequest} RestoreServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseDumpSpec.decode = function decode(reader, length) { + RestoreServiceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.DatabaseDumpSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.RestoreServiceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 2: { + message.backup = reader.string(); + break; + } + case 3: { + message.restoreType = reader.int32(); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10377,687 +10399,1376 @@ }; /** - * Decodes a DatabaseDumpSpec message from the specified reader or buffer, length delimited. + * Decodes a RestoreServiceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1.RestoreServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1.DatabaseDumpSpec} DatabaseDumpSpec + * @returns {google.cloud.metastore.v1.RestoreServiceRequest} RestoreServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseDumpSpec.decodeDelimited = function decodeDelimited(reader) { + RestoreServiceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DatabaseDumpSpec message. + * Verifies a RestoreServiceRequest message. * @function verify - * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1.RestoreServiceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DatabaseDumpSpec.verify = function verify(message) { + RestoreServiceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.backup != null && message.hasOwnProperty("backup")) + if (!$util.isString(message.backup)) + return "backup: string expected"; + if (message.restoreType != null && message.hasOwnProperty("restoreType")) + switch (message.restoreType) { + default: + return "restoreType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a DatabaseDumpSpec message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreServiceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1.RestoreServiceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1.DatabaseDumpSpec} DatabaseDumpSpec + * @returns {google.cloud.metastore.v1.RestoreServiceRequest} RestoreServiceRequest */ - DatabaseDumpSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1.DatabaseDumpSpec) + RestoreServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.RestoreServiceRequest) return object; - return new $root.google.cloud.metastore.v1.DatabaseDumpSpec(); + var message = new $root.google.cloud.metastore.v1.RestoreServiceRequest(); + if (object.service != null) + message.service = String(object.service); + if (object.backup != null) + message.backup = String(object.backup); + switch (object.restoreType) { + default: + if (typeof object.restoreType === "number") { + message.restoreType = object.restoreType; + break; + } + break; + case "RESTORE_TYPE_UNSPECIFIED": + case 0: + message.restoreType = 0; + break; + case "FULL": + case 1: + message.restoreType = 1; + break; + case "METADATA_ONLY": + case 2: + message.restoreType = 2; + break; + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; }; /** - * Creates a plain object from a DatabaseDumpSpec message. Also converts values to other types if specified. + * Creates a plain object from a RestoreServiceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1.RestoreServiceRequest * @static - * @param {google.cloud.metastore.v1.DatabaseDumpSpec} message DatabaseDumpSpec + * @param {google.cloud.metastore.v1.RestoreServiceRequest} message RestoreServiceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DatabaseDumpSpec.toObject = function toObject() { - return {}; + RestoreServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.service = ""; + object.backup = ""; + object.restoreType = options.enums === String ? "RESTORE_TYPE_UNSPECIFIED" : 0; + object.requestId = ""; + } + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = message.backup; + if (message.restoreType != null && message.hasOwnProperty("restoreType")) + object.restoreType = options.enums === String ? $root.google.cloud.metastore.v1.Restore.RestoreType[message.restoreType] === undefined ? message.restoreType : $root.google.cloud.metastore.v1.Restore.RestoreType[message.restoreType] : message.restoreType; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; }; /** - * Converts this DatabaseDumpSpec to JSON. + * Converts this RestoreServiceRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1.RestoreServiceRequest * @instance * @returns {Object.} JSON object */ - DatabaseDumpSpec.prototype.toJSON = function toJSON() { + RestoreServiceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DatabaseDumpSpec + * Gets the default type url for RestoreServiceRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1.RestoreServiceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DatabaseDumpSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RestoreServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1.DatabaseDumpSpec"; + return typeUrlPrefix + "/google.cloud.metastore.v1.RestoreServiceRequest"; }; - /** - * Type enum. - * @name google.cloud.metastore.v1.DatabaseDumpSpec.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} MYSQL=1 MYSQL value - * @property {number} AVRO=2 AVRO value - */ - DatabaseDumpSpec.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MYSQL"] = 1; - values[valuesById[2] = "AVRO"] = 2; - return values; - })(); - - return DatabaseDumpSpec; + return RestoreServiceRequest; })(); - return v1; - })(); - - metastore.v1alpha = (function() { - - /** - * Namespace v1alpha. - * @memberof google.cloud.metastore - * @namespace - */ - var v1alpha = {}; + v1.OperationMetadata = (function() { - v1alpha.DataprocMetastore = (function() { + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.metastore.v1 + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ /** - * Constructs a new DataprocMetastore service. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a DataprocMetastore - * @extends $protobuf.rpc.Service + * Constructs a new OperationMetadata. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.cloud.metastore.v1.IOperationMetadata=} [properties] Properties to set */ - function DataprocMetastore(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (DataprocMetastore.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataprocMetastore; - /** - * Creates new DataprocMetastore service using the specified rpc implementation. - * @function create - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {DataprocMetastore} RPC service. Useful where requests and/or responses are streamed. + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.metastore.v1.OperationMetadata + * @instance */ - DataprocMetastore.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + OperationMetadata.prototype.createTime = null; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|listServices}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef ListServicesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.metastore.v1alpha.ListServicesResponse} [response] ListServicesResponse + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1.OperationMetadata + * @instance */ + OperationMetadata.prototype.endTime = null; /** - * Calls ListServices. - * @function listServices - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.metastore.v1.OperationMetadata * @instance - * @param {google.cloud.metastore.v1alpha.IListServicesRequest} request ListServicesRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.ListServicesCallback} callback Node-style callback called with the error, if any, and ListServicesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataprocMetastore.prototype.listServices = function listServices(request, callback) { - return this.rpcCall(listServices, $root.google.cloud.metastore.v1alpha.ListServicesRequest, $root.google.cloud.metastore.v1alpha.ListServicesResponse, request, callback); - }, "name", { value: "ListServices" }); + OperationMetadata.prototype.target = ""; /** - * Calls ListServices. - * @function listServices - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.metastore.v1.OperationMetadata * @instance - * @param {google.cloud.metastore.v1alpha.IListServicesRequest} request ListServicesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + OperationMetadata.prototype.verb = ""; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|getService}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef GetServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.metastore.v1alpha.Service} [response] Service + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.metastore.v1.OperationMetadata + * @instance */ + OperationMetadata.prototype.statusMessage = ""; /** - * Calls GetService. - * @function getService - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.metastore.v1.OperationMetadata * @instance - * @param {google.cloud.metastore.v1alpha.IGetServiceRequest} request GetServiceRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.GetServiceCallback} callback Node-style callback called with the error, if any, and Service - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataprocMetastore.prototype.getService = function getService(request, callback) { - return this.rpcCall(getService, $root.google.cloud.metastore.v1alpha.GetServiceRequest, $root.google.cloud.metastore.v1alpha.Service, request, callback); - }, "name", { value: "GetService" }); + OperationMetadata.prototype.requestedCancellation = false; /** - * Calls GetService. - * @function getService - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.metastore.v1.OperationMetadata * @instance - * @param {google.cloud.metastore.v1alpha.IGetServiceRequest} request GetServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + OperationMetadata.prototype.apiVersion = ""; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|createService}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef CreateServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1.OperationMetadata + * @static + * @param {google.cloud.metastore.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.OperationMetadata} OperationMetadata instance */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; /** - * Calls CreateService. - * @function createService - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.ICreateServiceRequest} request CreateServiceRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.CreateServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.metastore.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1.OperationMetadata + * @static + * @param {google.cloud.metastore.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataprocMetastore.prototype.createService = function createService(request, callback) { - return this.rpcCall(createService, $root.google.cloud.metastore.v1alpha.CreateServiceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateService" }); + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; /** - * Calls CreateService. - * @function createService - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.ICreateServiceRequest} request CreateServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1.OperationMetadata + * @static + * @param {google.cloud.metastore.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|updateService}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef UpdateServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + OperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls UpdateService. - * @function updateService - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.IUpdateServiceRequest} request UpdateServiceRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.UpdateServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DataprocMetastore.prototype.updateService = function updateService(request, callback) { - return this.rpcCall(updateService, $root.google.cloud.metastore.v1alpha.UpdateServiceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateService" }); + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateService. - * @function updateService - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.IUpdateServiceRequest} request UpdateServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.metastore.v1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|deleteService}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef DeleteServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1.OperationMetadata} OperationMetadata */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.metastore.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.metastore.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.metastore.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; /** - * Calls DeleteService. - * @function deleteService - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.IDeleteServiceRequest} request DeleteServiceRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.DeleteServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1.OperationMetadata + * @static + * @param {google.cloud.metastore.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DataprocMetastore.prototype.deleteService = function deleteService(request, callback) { - return this.rpcCall(deleteService, $root.google.cloud.metastore.v1alpha.DeleteServiceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteService" }); + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; /** - * Calls DeleteService. - * @function deleteService - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1.OperationMetadata * @instance - * @param {google.cloud.metastore.v1alpha.IDeleteServiceRequest} request DeleteServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|listMetadataImports}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef ListMetadataImportsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.metastore.v1alpha.ListMetadataImportsResponse} [response] ListMetadataImportsResponse + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.metastore.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1.OperationMetadata"; + }; - /** - * Calls ListMetadataImports. - * @function listMetadataImports - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.IListMetadataImportsRequest} request ListMetadataImportsRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImportsCallback} callback Node-style callback called with the error, if any, and ListMetadataImportsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataprocMetastore.prototype.listMetadataImports = function listMetadataImports(request, callback) { - return this.rpcCall(listMetadataImports, $root.google.cloud.metastore.v1alpha.ListMetadataImportsRequest, $root.google.cloud.metastore.v1alpha.ListMetadataImportsResponse, request, callback); - }, "name", { value: "ListMetadataImports" }); + return OperationMetadata; + })(); - /** - * Calls ListMetadataImports. - * @function listMetadataImports - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.IListMetadataImportsRequest} request ListMetadataImportsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + v1.LocationMetadata = (function() { /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|getMetadataImport}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef GetMetadataImportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.metastore.v1alpha.MetadataImport} [response] MetadataImport + * Properties of a LocationMetadata. + * @memberof google.cloud.metastore.v1 + * @interface ILocationMetadata + * @property {Array.|null} [supportedHiveMetastoreVersions] LocationMetadata supportedHiveMetastoreVersions */ /** - * Calls GetMetadataImport. - * @function getMetadataImport - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.IGetMetadataImportRequest} request GetMetadataImportRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.GetMetadataImportCallback} callback Node-style callback called with the error, if any, and MetadataImport - * @returns {undefined} - * @variation 1 + * Constructs a new LocationMetadata. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents a LocationMetadata. + * @implements ILocationMetadata + * @constructor + * @param {google.cloud.metastore.v1.ILocationMetadata=} [properties] Properties to set */ - Object.defineProperty(DataprocMetastore.prototype.getMetadataImport = function getMetadataImport(request, callback) { - return this.rpcCall(getMetadataImport, $root.google.cloud.metastore.v1alpha.GetMetadataImportRequest, $root.google.cloud.metastore.v1alpha.MetadataImport, request, callback); - }, "name", { value: "GetMetadataImport" }); + function LocationMetadata(properties) { + this.supportedHiveMetastoreVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls GetMetadataImport. - * @function getMetadataImport - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * LocationMetadata supportedHiveMetastoreVersions. + * @member {Array.} supportedHiveMetastoreVersions + * @memberof google.cloud.metastore.v1.LocationMetadata * @instance - * @param {google.cloud.metastore.v1alpha.IGetMetadataImportRequest} request GetMetadataImportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + LocationMetadata.prototype.supportedHiveMetastoreVersions = $util.emptyArray; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|createMetadataImport}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef CreateMetadataImportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new LocationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1.LocationMetadata + * @static + * @param {google.cloud.metastore.v1.ILocationMetadata=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.LocationMetadata} LocationMetadata instance */ + LocationMetadata.create = function create(properties) { + return new LocationMetadata(properties); + }; /** - * Calls CreateMetadataImport. - * @function createMetadataImport - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.ICreateMetadataImportRequest} request CreateMetadataImportRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.CreateMetadataImportCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1.LocationMetadata + * @static + * @param {google.cloud.metastore.v1.ILocationMetadata} message LocationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataprocMetastore.prototype.createMetadataImport = function createMetadataImport(request, callback) { - return this.rpcCall(createMetadataImport, $root.google.cloud.metastore.v1alpha.CreateMetadataImportRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateMetadataImport" }); + LocationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.supportedHiveMetastoreVersions != null && message.supportedHiveMetastoreVersions.length) + for (var i = 0; i < message.supportedHiveMetastoreVersions.length; ++i) + $root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.encode(message.supportedHiveMetastoreVersions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * Calls CreateMetadataImport. - * @function createMetadataImport - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.ICreateMetadataImportRequest} request CreateMetadataImportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1.LocationMetadata + * @static + * @param {google.cloud.metastore.v1.ILocationMetadata} message LocationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + LocationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|updateMetadataImport}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef UpdateMetadataImportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes a LocationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1.LocationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1.LocationMetadata} LocationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + LocationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.LocationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.supportedHiveMetastoreVersions && message.supportedHiveMetastoreVersions.length)) + message.supportedHiveMetastoreVersions = []; + message.supportedHiveMetastoreVersions.push($root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls UpdateMetadataImport. - * @function updateMetadataImport - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest} request UpdateMetadataImportRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.UpdateMetadataImportCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1.LocationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1.LocationMetadata} LocationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DataprocMetastore.prototype.updateMetadataImport = function updateMetadataImport(request, callback) { - return this.rpcCall(updateMetadataImport, $root.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateMetadataImport" }); + LocationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateMetadataImport. - * @function updateMetadataImport - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest} request UpdateMetadataImportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a LocationMetadata message. + * @function verify + * @memberof google.cloud.metastore.v1.LocationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + LocationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.supportedHiveMetastoreVersions != null && message.hasOwnProperty("supportedHiveMetastoreVersions")) { + if (!Array.isArray(message.supportedHiveMetastoreVersions)) + return "supportedHiveMetastoreVersions: array expected"; + for (var i = 0; i < message.supportedHiveMetastoreVersions.length; ++i) { + var error = $root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.verify(message.supportedHiveMetastoreVersions[i]); + if (error) + return "supportedHiveMetastoreVersions." + error; + } + } + return null; + }; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|exportMetadata}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef ExportMetadataCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1.LocationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1.LocationMetadata} LocationMetadata */ + LocationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.LocationMetadata) + return object; + var message = new $root.google.cloud.metastore.v1.LocationMetadata(); + if (object.supportedHiveMetastoreVersions) { + if (!Array.isArray(object.supportedHiveMetastoreVersions)) + throw TypeError(".google.cloud.metastore.v1.LocationMetadata.supportedHiveMetastoreVersions: array expected"); + message.supportedHiveMetastoreVersions = []; + for (var i = 0; i < object.supportedHiveMetastoreVersions.length; ++i) { + if (typeof object.supportedHiveMetastoreVersions[i] !== "object") + throw TypeError(".google.cloud.metastore.v1.LocationMetadata.supportedHiveMetastoreVersions: object expected"); + message.supportedHiveMetastoreVersions[i] = $root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.fromObject(object.supportedHiveMetastoreVersions[i]); + } + } + return message; + }; /** - * Calls ExportMetadata. - * @function exportMetadata - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.IExportMetadataRequest} request ExportMetadataRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.ExportMetadataCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1.LocationMetadata + * @static + * @param {google.cloud.metastore.v1.LocationMetadata} message LocationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DataprocMetastore.prototype.exportMetadata = function exportMetadata(request, callback) { - return this.rpcCall(exportMetadata, $root.google.cloud.metastore.v1alpha.ExportMetadataRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportMetadata" }); + LocationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.supportedHiveMetastoreVersions = []; + if (message.supportedHiveMetastoreVersions && message.supportedHiveMetastoreVersions.length) { + object.supportedHiveMetastoreVersions = []; + for (var j = 0; j < message.supportedHiveMetastoreVersions.length; ++j) + object.supportedHiveMetastoreVersions[j] = $root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.toObject(message.supportedHiveMetastoreVersions[j], options); + } + return object; + }; /** - * Calls ExportMetadata. - * @function exportMetadata - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * Converts this LocationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1.LocationMetadata * @instance - * @param {google.cloud.metastore.v1alpha.IExportMetadataRequest} request ExportMetadataRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + LocationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|restoreService}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef RestoreServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Gets the default type url for LocationMetadata + * @function getTypeUrl + * @memberof google.cloud.metastore.v1.LocationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + LocationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1.LocationMetadata"; + }; - /** - * Calls RestoreService. - * @function restoreService - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.IRestoreServiceRequest} request RestoreServiceRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.RestoreServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataprocMetastore.prototype.restoreService = function restoreService(request, callback) { - return this.rpcCall(restoreService, $root.google.cloud.metastore.v1alpha.RestoreServiceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RestoreService" }); + LocationMetadata.HiveMetastoreVersion = (function() { - /** - * Calls RestoreService. - * @function restoreService - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.IRestoreServiceRequest} request RestoreServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Properties of a HiveMetastoreVersion. + * @memberof google.cloud.metastore.v1.LocationMetadata + * @interface IHiveMetastoreVersion + * @property {string|null} [version] HiveMetastoreVersion version + * @property {boolean|null} [isDefault] HiveMetastoreVersion isDefault + */ - /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|listBackups}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef ListBackupsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.metastore.v1alpha.ListBackupsResponse} [response] ListBackupsResponse - */ + /** + * Constructs a new HiveMetastoreVersion. + * @memberof google.cloud.metastore.v1.LocationMetadata + * @classdesc Represents a HiveMetastoreVersion. + * @implements IHiveMetastoreVersion + * @constructor + * @param {google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion=} [properties] Properties to set + */ + function HiveMetastoreVersion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Calls ListBackups. - * @function listBackups - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1alpha.IListBackupsRequest} request ListBackupsRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.ListBackupsCallback} callback Node-style callback called with the error, if any, and ListBackupsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataprocMetastore.prototype.listBackups = function listBackups(request, callback) { - return this.rpcCall(listBackups, $root.google.cloud.metastore.v1alpha.ListBackupsRequest, $root.google.cloud.metastore.v1alpha.ListBackupsResponse, request, callback); - }, "name", { value: "ListBackups" }); + /** + * HiveMetastoreVersion version. + * @member {string} version + * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion + * @instance + */ + HiveMetastoreVersion.prototype.version = ""; + + /** + * HiveMetastoreVersion isDefault. + * @member {boolean} isDefault + * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion + * @instance + */ + HiveMetastoreVersion.prototype.isDefault = false; + + /** + * Creates a new HiveMetastoreVersion instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion + * @static + * @param {google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion instance + */ + HiveMetastoreVersion.create = function create(properties) { + return new HiveMetastoreVersion(properties); + }; + + /** + * Encodes the specified HiveMetastoreVersion message. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion + * @static + * @param {google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion} message HiveMetastoreVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HiveMetastoreVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDefault); + return writer; + }; + + /** + * Encodes the specified HiveMetastoreVersion message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion + * @static + * @param {google.cloud.metastore.v1.LocationMetadata.IHiveMetastoreVersion} message HiveMetastoreVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HiveMetastoreVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HiveMetastoreVersion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HiveMetastoreVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.isDefault = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HiveMetastoreVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HiveMetastoreVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HiveMetastoreVersion message. + * @function verify + * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HiveMetastoreVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + if (typeof message.isDefault !== "boolean") + return "isDefault: boolean expected"; + return null; + }; + + /** + * Creates a HiveMetastoreVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion + */ + HiveMetastoreVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) + return object; + var message = new $root.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion(); + if (object.version != null) + message.version = String(object.version); + if (object.isDefault != null) + message.isDefault = Boolean(object.isDefault); + return message; + }; + + /** + * Creates a plain object from a HiveMetastoreVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion + * @static + * @param {google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion} message HiveMetastoreVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HiveMetastoreVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.isDefault = false; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + object.isDefault = message.isDefault; + return object; + }; + + /** + * Converts this HiveMetastoreVersion to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion + * @instance + * @returns {Object.} JSON object + */ + HiveMetastoreVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HiveMetastoreVersion + * @function getTypeUrl + * @memberof google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HiveMetastoreVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion"; + }; + + return HiveMetastoreVersion; + })(); + + return LocationMetadata; + })(); + + v1.DatabaseDumpSpec = (function() { /** - * Calls ListBackups. - * @function listBackups - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * Properties of a DatabaseDumpSpec. + * @memberof google.cloud.metastore.v1 + * @interface IDatabaseDumpSpec + */ + + /** + * Constructs a new DatabaseDumpSpec. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents a DatabaseDumpSpec. + * @implements IDatabaseDumpSpec + * @constructor + * @param {google.cloud.metastore.v1.IDatabaseDumpSpec=} [properties] Properties to set + */ + function DatabaseDumpSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new DatabaseDumpSpec instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @static + * @param {google.cloud.metastore.v1.IDatabaseDumpSpec=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.DatabaseDumpSpec} DatabaseDumpSpec instance + */ + DatabaseDumpSpec.create = function create(properties) { + return new DatabaseDumpSpec(properties); + }; + + /** + * Encodes the specified DatabaseDumpSpec message. Does not implicitly {@link google.cloud.metastore.v1.DatabaseDumpSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @static + * @param {google.cloud.metastore.v1.IDatabaseDumpSpec} message DatabaseDumpSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseDumpSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified DatabaseDumpSpec message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.DatabaseDumpSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @static + * @param {google.cloud.metastore.v1.IDatabaseDumpSpec} message DatabaseDumpSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseDumpSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseDumpSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1.DatabaseDumpSpec} DatabaseDumpSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseDumpSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.DatabaseDumpSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseDumpSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1.DatabaseDumpSpec} DatabaseDumpSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseDumpSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseDumpSpec message. + * @function verify + * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseDumpSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a DatabaseDumpSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1.DatabaseDumpSpec} DatabaseDumpSpec + */ + DatabaseDumpSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.DatabaseDumpSpec) + return object; + return new $root.google.cloud.metastore.v1.DatabaseDumpSpec(); + }; + + /** + * Creates a plain object from a DatabaseDumpSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @static + * @param {google.cloud.metastore.v1.DatabaseDumpSpec} message DatabaseDumpSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseDumpSpec.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DatabaseDumpSpec to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1.DatabaseDumpSpec * @instance - * @param {google.cloud.metastore.v1alpha.IListBackupsRequest} request ListBackupsRequest message or plain object - * @returns {Promise} Promise + * @returns {Object.} JSON object + */ + DatabaseDumpSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseDumpSpec + * @function getTypeUrl + * @memberof google.cloud.metastore.v1.DatabaseDumpSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseDumpSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1.DatabaseDumpSpec"; + }; + + /** + * Type enum. + * @name google.cloud.metastore.v1.DatabaseDumpSpec.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} MYSQL=1 MYSQL value + * @property {number} AVRO=2 AVRO value + */ + DatabaseDumpSpec.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MYSQL"] = 1; + values[valuesById[2] = "AVRO"] = 2; + return values; + })(); + + return DatabaseDumpSpec; + })(); + + v1.DataprocMetastoreFederation = (function() { + + /** + * Constructs a new DataprocMetastoreFederation service. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents a DataprocMetastoreFederation + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function DataprocMetastoreFederation(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataprocMetastoreFederation.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataprocMetastoreFederation; + + /** + * Creates new DataprocMetastoreFederation service using the specified rpc implementation. + * @function create + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {DataprocMetastoreFederation} RPC service. Useful where requests and/or responses are streamed. + */ + DataprocMetastoreFederation.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.metastore.v1.DataprocMetastoreFederation|listFederations}. + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation + * @typedef ListFederationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1.ListFederationsResponse} [response] ListFederationsResponse + */ + + /** + * Calls ListFederations. + * @function listFederations + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1.IListFederationsRequest} request ListFederationsRequest message or plain object + * @param {google.cloud.metastore.v1.DataprocMetastoreFederation.ListFederationsCallback} callback Node-style callback called with the error, if any, and ListFederationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastoreFederation.prototype.listFederations = function listFederations(request, callback) { + return this.rpcCall(listFederations, $root.google.cloud.metastore.v1.ListFederationsRequest, $root.google.cloud.metastore.v1.ListFederationsResponse, request, callback); + }, "name", { value: "ListFederations" }); + + /** + * Calls ListFederations. + * @function listFederations + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1.IListFederationsRequest} request ListFederationsRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|getBackup}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef GetBackupCallback + * Callback as used by {@link google.cloud.metastore.v1.DataprocMetastoreFederation|getFederation}. + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation + * @typedef GetFederationCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.metastore.v1alpha.Backup} [response] Backup + * @param {google.cloud.metastore.v1.Federation} [response] Federation */ /** - * Calls GetBackup. - * @function getBackup - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * Calls GetFederation. + * @function getFederation + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation * @instance - * @param {google.cloud.metastore.v1alpha.IGetBackupRequest} request GetBackupRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.GetBackupCallback} callback Node-style callback called with the error, if any, and Backup + * @param {google.cloud.metastore.v1.IGetFederationRequest} request GetFederationRequest message or plain object + * @param {google.cloud.metastore.v1.DataprocMetastoreFederation.GetFederationCallback} callback Node-style callback called with the error, if any, and Federation * @returns {undefined} * @variation 1 */ - Object.defineProperty(DataprocMetastore.prototype.getBackup = function getBackup(request, callback) { - return this.rpcCall(getBackup, $root.google.cloud.metastore.v1alpha.GetBackupRequest, $root.google.cloud.metastore.v1alpha.Backup, request, callback); - }, "name", { value: "GetBackup" }); + Object.defineProperty(DataprocMetastoreFederation.prototype.getFederation = function getFederation(request, callback) { + return this.rpcCall(getFederation, $root.google.cloud.metastore.v1.GetFederationRequest, $root.google.cloud.metastore.v1.Federation, request, callback); + }, "name", { value: "GetFederation" }); /** - * Calls GetBackup. - * @function getBackup - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * Calls GetFederation. + * @function getFederation + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation * @instance - * @param {google.cloud.metastore.v1alpha.IGetBackupRequest} request GetBackupRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.metastore.v1.IGetFederationRequest} request GetFederationRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|createBackup}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef CreateBackupCallback + * Callback as used by {@link google.cloud.metastore.v1.DataprocMetastoreFederation|createFederation}. + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation + * @typedef CreateFederationCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ /** - * Calls CreateBackup. - * @function createBackup - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * Calls CreateFederation. + * @function createFederation + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation * @instance - * @param {google.cloud.metastore.v1alpha.ICreateBackupRequest} request CreateBackupRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.CreateBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @param {google.cloud.metastore.v1.ICreateFederationRequest} request CreateFederationRequest message or plain object + * @param {google.cloud.metastore.v1.DataprocMetastoreFederation.CreateFederationCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ - Object.defineProperty(DataprocMetastore.prototype.createBackup = function createBackup(request, callback) { - return this.rpcCall(createBackup, $root.google.cloud.metastore.v1alpha.CreateBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateBackup" }); + Object.defineProperty(DataprocMetastoreFederation.prototype.createFederation = function createFederation(request, callback) { + return this.rpcCall(createFederation, $root.google.cloud.metastore.v1.CreateFederationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateFederation" }); /** - * Calls CreateBackup. - * @function createBackup - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * Calls CreateFederation. + * @function createFederation + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation * @instance - * @param {google.cloud.metastore.v1alpha.ICreateBackupRequest} request CreateBackupRequest message or plain object + * @param {google.cloud.metastore.v1.ICreateFederationRequest} request CreateFederationRequest message or plain object * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|deleteBackup}. - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore - * @typedef DeleteBackupCallback + * Callback as used by {@link google.cloud.metastore.v1.DataprocMetastoreFederation|updateFederation}. + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation + * @typedef UpdateFederationCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ /** - * Calls DeleteBackup. - * @function deleteBackup - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * Calls UpdateFederation. + * @function updateFederation + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation * @instance - * @param {google.cloud.metastore.v1alpha.IDeleteBackupRequest} request DeleteBackupRequest message or plain object - * @param {google.cloud.metastore.v1alpha.DataprocMetastore.DeleteBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @param {google.cloud.metastore.v1.IUpdateFederationRequest} request UpdateFederationRequest message or plain object + * @param {google.cloud.metastore.v1.DataprocMetastoreFederation.UpdateFederationCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ - Object.defineProperty(DataprocMetastore.prototype.deleteBackup = function deleteBackup(request, callback) { - return this.rpcCall(deleteBackup, $root.google.cloud.metastore.v1alpha.DeleteBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackup" }); + Object.defineProperty(DataprocMetastoreFederation.prototype.updateFederation = function updateFederation(request, callback) { + return this.rpcCall(updateFederation, $root.google.cloud.metastore.v1.UpdateFederationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateFederation" }); /** - * Calls DeleteBackup. - * @function deleteBackup - * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * Calls UpdateFederation. + * @function updateFederation + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation * @instance - * @param {google.cloud.metastore.v1alpha.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @param {google.cloud.metastore.v1.IUpdateFederationRequest} request UpdateFederationRequest message or plain object * @returns {Promise} Promise * @variation 2 */ - return DataprocMetastore; + /** + * Callback as used by {@link google.cloud.metastore.v1.DataprocMetastoreFederation|deleteFederation}. + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation + * @typedef DeleteFederationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteFederation. + * @function deleteFederation + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1.IDeleteFederationRequest} request DeleteFederationRequest message or plain object + * @param {google.cloud.metastore.v1.DataprocMetastoreFederation.DeleteFederationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastoreFederation.prototype.deleteFederation = function deleteFederation(request, callback) { + return this.rpcCall(deleteFederation, $root.google.cloud.metastore.v1.DeleteFederationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteFederation" }); + + /** + * Calls DeleteFederation. + * @function deleteFederation + * @memberof google.cloud.metastore.v1.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1.IDeleteFederationRequest} request DeleteFederationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataprocMetastoreFederation; })(); - v1alpha.Service = (function() { + v1.Federation = (function() { /** - * Properties of a Service. - * @memberof google.cloud.metastore.v1alpha - * @interface IService - * @property {google.cloud.metastore.v1alpha.IHiveMetastoreConfig|null} [hiveMetastoreConfig] Service hiveMetastoreConfig - * @property {string|null} [name] Service name - * @property {google.protobuf.ITimestamp|null} [createTime] Service createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Service updateTime - * @property {Object.|null} [labels] Service labels - * @property {string|null} [network] Service network - * @property {string|null} [endpointUri] Service endpointUri - * @property {number|null} [port] Service port - * @property {google.cloud.metastore.v1alpha.Service.State|null} [state] Service state - * @property {string|null} [stateMessage] Service stateMessage - * @property {string|null} [artifactGcsUri] Service artifactGcsUri - * @property {google.cloud.metastore.v1alpha.Service.Tier|null} [tier] Service tier - * @property {google.cloud.metastore.v1alpha.IMetadataIntegration|null} [metadataIntegration] Service metadataIntegration - * @property {google.cloud.metastore.v1alpha.IMaintenanceWindow|null} [maintenanceWindow] Service maintenanceWindow - * @property {string|null} [uid] Service uid - * @property {google.cloud.metastore.v1alpha.IMetadataManagementActivity|null} [metadataManagementActivity] Service metadataManagementActivity - * @property {google.cloud.metastore.v1alpha.Service.ReleaseChannel|null} [releaseChannel] Service releaseChannel - * @property {google.cloud.metastore.v1alpha.IEncryptionConfig|null} [encryptionConfig] Service encryptionConfig - * @property {google.cloud.metastore.v1alpha.INetworkConfig|null} [networkConfig] Service networkConfig - * @property {google.cloud.metastore.v1alpha.Service.DatabaseType|null} [databaseType] Service databaseType + * Properties of a Federation. + * @memberof google.cloud.metastore.v1 + * @interface IFederation + * @property {string|null} [name] Federation name + * @property {google.protobuf.ITimestamp|null} [createTime] Federation createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Federation updateTime + * @property {Object.|null} [labels] Federation labels + * @property {string|null} [version] Federation version + * @property {Object.|null} [backendMetastores] Federation backendMetastores + * @property {string|null} [endpointUri] Federation endpointUri + * @property {google.cloud.metastore.v1.Federation.State|null} [state] Federation state + * @property {string|null} [stateMessage] Federation stateMessage + * @property {string|null} [uid] Federation uid */ /** - * Constructs a new Service. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a Service. - * @implements IService + * Constructs a new Federation. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents a Federation. + * @implements IFederation * @constructor - * @param {google.cloud.metastore.v1alpha.IService=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IFederation=} [properties] Properties to set */ - function Service(properties) { + function Federation(properties) { this.labels = {}; + this.backendMetastores = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11065,201 +11776,107 @@ } /** - * Service hiveMetastoreConfig. - * @member {google.cloud.metastore.v1alpha.IHiveMetastoreConfig|null|undefined} hiveMetastoreConfig - * @memberof google.cloud.metastore.v1alpha.Service - * @instance - */ - Service.prototype.hiveMetastoreConfig = null; - - /** - * Service name. + * Federation name. * @member {string} name - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @instance */ - Service.prototype.name = ""; + Federation.prototype.name = ""; /** - * Service createTime. + * Federation createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @instance */ - Service.prototype.createTime = null; + Federation.prototype.createTime = null; /** - * Service updateTime. + * Federation updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @instance */ - Service.prototype.updateTime = null; + Federation.prototype.updateTime = null; /** - * Service labels. + * Federation labels. * @member {Object.} labels - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @instance */ - Service.prototype.labels = $util.emptyObject; + Federation.prototype.labels = $util.emptyObject; /** - * Service network. - * @member {string} network - * @memberof google.cloud.metastore.v1alpha.Service + * Federation version. + * @member {string} version + * @memberof google.cloud.metastore.v1.Federation * @instance */ - Service.prototype.network = ""; + Federation.prototype.version = ""; /** - * Service endpointUri. - * @member {string} endpointUri - * @memberof google.cloud.metastore.v1alpha.Service + * Federation backendMetastores. + * @member {Object.} backendMetastores + * @memberof google.cloud.metastore.v1.Federation * @instance */ - Service.prototype.endpointUri = ""; + Federation.prototype.backendMetastores = $util.emptyObject; /** - * Service port. - * @member {number} port - * @memberof google.cloud.metastore.v1alpha.Service + * Federation endpointUri. + * @member {string} endpointUri + * @memberof google.cloud.metastore.v1.Federation * @instance */ - Service.prototype.port = 0; + Federation.prototype.endpointUri = ""; /** - * Service state. - * @member {google.cloud.metastore.v1alpha.Service.State} state - * @memberof google.cloud.metastore.v1alpha.Service + * Federation state. + * @member {google.cloud.metastore.v1.Federation.State} state + * @memberof google.cloud.metastore.v1.Federation * @instance */ - Service.prototype.state = 0; + Federation.prototype.state = 0; /** - * Service stateMessage. + * Federation stateMessage. * @member {string} stateMessage - * @memberof google.cloud.metastore.v1alpha.Service - * @instance - */ - Service.prototype.stateMessage = ""; - - /** - * Service artifactGcsUri. - * @member {string} artifactGcsUri - * @memberof google.cloud.metastore.v1alpha.Service - * @instance - */ - Service.prototype.artifactGcsUri = ""; - - /** - * Service tier. - * @member {google.cloud.metastore.v1alpha.Service.Tier} tier - * @memberof google.cloud.metastore.v1alpha.Service - * @instance - */ - Service.prototype.tier = 0; - - /** - * Service metadataIntegration. - * @member {google.cloud.metastore.v1alpha.IMetadataIntegration|null|undefined} metadataIntegration - * @memberof google.cloud.metastore.v1alpha.Service - * @instance - */ - Service.prototype.metadataIntegration = null; - - /** - * Service maintenanceWindow. - * @member {google.cloud.metastore.v1alpha.IMaintenanceWindow|null|undefined} maintenanceWindow - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @instance */ - Service.prototype.maintenanceWindow = null; + Federation.prototype.stateMessage = ""; /** - * Service uid. + * Federation uid. * @member {string} uid - * @memberof google.cloud.metastore.v1alpha.Service - * @instance - */ - Service.prototype.uid = ""; - - /** - * Service metadataManagementActivity. - * @member {google.cloud.metastore.v1alpha.IMetadataManagementActivity|null|undefined} metadataManagementActivity - * @memberof google.cloud.metastore.v1alpha.Service - * @instance - */ - Service.prototype.metadataManagementActivity = null; - - /** - * Service releaseChannel. - * @member {google.cloud.metastore.v1alpha.Service.ReleaseChannel} releaseChannel - * @memberof google.cloud.metastore.v1alpha.Service - * @instance - */ - Service.prototype.releaseChannel = 0; - - /** - * Service encryptionConfig. - * @member {google.cloud.metastore.v1alpha.IEncryptionConfig|null|undefined} encryptionConfig - * @memberof google.cloud.metastore.v1alpha.Service - * @instance - */ - Service.prototype.encryptionConfig = null; - - /** - * Service networkConfig. - * @member {google.cloud.metastore.v1alpha.INetworkConfig|null|undefined} networkConfig - * @memberof google.cloud.metastore.v1alpha.Service - * @instance - */ - Service.prototype.networkConfig = null; - - /** - * Service databaseType. - * @member {google.cloud.metastore.v1alpha.Service.DatabaseType} databaseType - * @memberof google.cloud.metastore.v1alpha.Service - * @instance - */ - Service.prototype.databaseType = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Service metastoreConfig. - * @member {"hiveMetastoreConfig"|undefined} metastoreConfig - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @instance */ - Object.defineProperty(Service.prototype, "metastoreConfig", { - get: $util.oneOfGetter($oneOfFields = ["hiveMetastoreConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); + Federation.prototype.uid = ""; /** - * Creates a new Service instance using the specified properties. + * Creates a new Federation instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @static - * @param {google.cloud.metastore.v1alpha.IService=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.Service} Service instance + * @param {google.cloud.metastore.v1.IFederation=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.Federation} Federation instance */ - Service.create = function create(properties) { - return new Service(properties); + Federation.create = function create(properties) { + return new Federation(properties); }; /** - * Encodes the specified Service message. Does not implicitly {@link google.cloud.metastore.v1alpha.Service.verify|verify} messages. + * Encodes the specified Federation message. Does not implicitly {@link google.cloud.metastore.v1.Federation.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @static - * @param {google.cloud.metastore.v1alpha.IService} message Service message or plain object to encode + * @param {google.cloud.metastore.v1.IFederation} message Federation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Service.encode = function encode(message, writer) { + Federation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -11271,76 +11888,55 @@ if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.hiveMetastoreConfig != null && Object.hasOwnProperty.call(message, "hiveMetastoreConfig")) - $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig.encode(message.hiveMetastoreConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.network); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + if (message.backendMetastores != null && Object.hasOwnProperty.call(message, "backendMetastores")) + for (var keys = Object.keys(message.backendMetastores), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); + $root.google.cloud.metastore.v1.BackendMetastore.encode(message.backendMetastores[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } if (message.endpointUri != null && Object.hasOwnProperty.call(message, "endpointUri")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.endpointUri); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.port); + writer.uint32(/* id 7, wireType 2 =*/58).string(message.endpointUri); if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); if (message.stateMessage != null && Object.hasOwnProperty.call(message, "stateMessage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.stateMessage); - if (message.artifactGcsUri != null && Object.hasOwnProperty.call(message, "artifactGcsUri")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.artifactGcsUri); - if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.tier); - if (message.metadataIntegration != null && Object.hasOwnProperty.call(message, "metadataIntegration")) - $root.google.cloud.metastore.v1alpha.MetadataIntegration.encode(message.metadataIntegration, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.maintenanceWindow != null && Object.hasOwnProperty.call(message, "maintenanceWindow")) - $root.google.cloud.metastore.v1alpha.MaintenanceWindow.encode(message.maintenanceWindow, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + writer.uint32(/* id 9, wireType 2 =*/74).string(message.stateMessage); if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.uid); - if (message.metadataManagementActivity != null && Object.hasOwnProperty.call(message, "metadataManagementActivity")) - $root.google.cloud.metastore.v1alpha.MetadataManagementActivity.encode(message.metadataManagementActivity, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.releaseChannel); - if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) - $root.google.cloud.metastore.v1alpha.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) - $root.google.cloud.metastore.v1alpha.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.databaseType != null && Object.hasOwnProperty.call(message, "databaseType")) - writer.uint32(/* id 22, wireType 0 =*/176).int32(message.databaseType); + writer.uint32(/* id 10, wireType 2 =*/82).string(message.uid); return writer; }; /** - * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Service.verify|verify} messages. + * Encodes the specified Federation message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.Federation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @static - * @param {google.cloud.metastore.v1alpha.IService} message Service message or plain object to encode + * @param {google.cloud.metastore.v1.IFederation} message Federation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Service.encodeDelimited = function encodeDelimited(message, writer) { + Federation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Service message from the specified reader or buffer. + * Decodes a Federation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.Service} Service + * @returns {google.cloud.metastore.v1.Federation} Federation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Service.decode = function decode(reader, length) { + Federation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.Service(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.Federation(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: { - message.hiveMetastoreConfig = $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig.decode(reader, reader.uint32()); - break; - } case 1: { message.name = reader.string(); break; @@ -11376,66 +11972,49 @@ message.labels[key] = value; break; } - case 7: { - message.network = reader.string(); + case 5: { + message.version = reader.string(); break; } - case 8: { - message.endpointUri = reader.string(); + case 6: { + if (message.backendMetastores === $util.emptyObject) + message.backendMetastores = {}; + var end2 = reader.uint32() + reader.pos; + key = 0; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.int32(); + break; + case 2: + value = $root.google.cloud.metastore.v1.BackendMetastore.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.backendMetastores[key] = value; break; } - case 9: { - message.port = reader.int32(); + case 7: { + message.endpointUri = reader.string(); break; } - case 10: { + case 8: { message.state = reader.int32(); break; } - case 11: { + case 9: { message.stateMessage = reader.string(); break; } - case 12: { - message.artifactGcsUri = reader.string(); - break; - } - case 13: { - message.tier = reader.int32(); - break; - } - case 14: { - message.metadataIntegration = $root.google.cloud.metastore.v1alpha.MetadataIntegration.decode(reader, reader.uint32()); - break; - } - case 15: { - message.maintenanceWindow = $root.google.cloud.metastore.v1alpha.MaintenanceWindow.decode(reader, reader.uint32()); - break; - } - case 16: { + case 10: { message.uid = reader.string(); break; } - case 17: { - message.metadataManagementActivity = $root.google.cloud.metastore.v1alpha.MetadataManagementActivity.decode(reader, reader.uint32()); - break; - } - case 19: { - message.releaseChannel = reader.int32(); - break; - } - case 20: { - message.encryptionConfig = $root.google.cloud.metastore.v1alpha.EncryptionConfig.decode(reader, reader.uint32()); - break; - } - case 21: { - message.networkConfig = $root.google.cloud.metastore.v1alpha.NetworkConfig.decode(reader, reader.uint32()); - break; - } - case 22: { - message.databaseType = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -11445,41 +12024,32 @@ }; /** - * Decodes a Service message from the specified reader or buffer, length delimited. + * Decodes a Federation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.Service} Service + * @returns {google.cloud.metastore.v1.Federation} Federation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Service.decodeDelimited = function decodeDelimited(reader) { + Federation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Service message. + * Verifies a Federation message. * @function verify - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Service.verify = function verify(message) { + Federation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.hiveMetastoreConfig != null && message.hasOwnProperty("hiveMetastoreConfig")) { - properties.metastoreConfig = 1; - { - var error = $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig.verify(message.hiveMetastoreConfig); - if (error) - return "hiveMetastoreConfig." + error; - } - } if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; @@ -11501,15 +12071,26 @@ if (!$util.isString(message.labels[key[i]])) return "labels: string{k:string} expected"; } - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.backendMetastores != null && message.hasOwnProperty("backendMetastores")) { + if (!$util.isObject(message.backendMetastores)) + return "backendMetastores: object expected"; + var key = Object.keys(message.backendMetastores); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "backendMetastores: integer key{k:int32} expected"; + { + var error = $root.google.cloud.metastore.v1.BackendMetastore.verify(message.backendMetastores[key[i]]); + if (error) + return "backendMetastores." + error; + } + } + } if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) if (!$util.isString(message.endpointUri)) return "endpointUri: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: @@ -11520,116 +12101,62 @@ case 3: case 4: case 5: - case 6: - case 7: break; } if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) if (!$util.isString(message.stateMessage)) return "stateMessage: string expected"; - if (message.artifactGcsUri != null && message.hasOwnProperty("artifactGcsUri")) - if (!$util.isString(message.artifactGcsUri)) - return "artifactGcsUri: string expected"; - if (message.tier != null && message.hasOwnProperty("tier")) - switch (message.tier) { - default: - return "tier: enum value expected"; - case 0: - case 1: - case 3: - break; - } - if (message.metadataIntegration != null && message.hasOwnProperty("metadataIntegration")) { - var error = $root.google.cloud.metastore.v1alpha.MetadataIntegration.verify(message.metadataIntegration); - if (error) - return "metadataIntegration." + error; - } - if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) { - var error = $root.google.cloud.metastore.v1alpha.MaintenanceWindow.verify(message.maintenanceWindow); - if (error) - return "maintenanceWindow." + error; - } if (message.uid != null && message.hasOwnProperty("uid")) if (!$util.isString(message.uid)) return "uid: string expected"; - if (message.metadataManagementActivity != null && message.hasOwnProperty("metadataManagementActivity")) { - var error = $root.google.cloud.metastore.v1alpha.MetadataManagementActivity.verify(message.metadataManagementActivity); - if (error) - return "metadataManagementActivity." + error; - } - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) - switch (message.releaseChannel) { - default: - return "releaseChannel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { - var error = $root.google.cloud.metastore.v1alpha.EncryptionConfig.verify(message.encryptionConfig); - if (error) - return "encryptionConfig." + error; - } - if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { - var error = $root.google.cloud.metastore.v1alpha.NetworkConfig.verify(message.networkConfig); - if (error) - return "networkConfig." + error; - } - if (message.databaseType != null && message.hasOwnProperty("databaseType")) - switch (message.databaseType) { - default: - return "databaseType: enum value expected"; - case 0: - case 1: - case 2: - break; - } return null; }; /** - * Creates a Service message from a plain object. Also converts values to their respective internal types. + * Creates a Federation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.Service} Service + * @returns {google.cloud.metastore.v1.Federation} Federation */ - Service.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.Service) + Federation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.Federation) return object; - var message = new $root.google.cloud.metastore.v1alpha.Service(); - if (object.hiveMetastoreConfig != null) { - if (typeof object.hiveMetastoreConfig !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.Service.hiveMetastoreConfig: object expected"); - message.hiveMetastoreConfig = $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig.fromObject(object.hiveMetastoreConfig); - } + var message = new $root.google.cloud.metastore.v1.Federation(); if (object.name != null) message.name = String(object.name); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.Service.createTime: object expected"); + throw TypeError(".google.cloud.metastore.v1.Federation.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } if (object.updateTime != null) { if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.Service.updateTime: object expected"); + throw TypeError(".google.cloud.metastore.v1.Federation.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } if (object.labels) { if (typeof object.labels !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.Service.labels: object expected"); + throw TypeError(".google.cloud.metastore.v1.Federation.labels: object expected"); message.labels = {}; for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) message.labels[keys[i]] = String(object.labels[keys[i]]); } - if (object.network != null) - message.network = String(object.network); + if (object.version != null) + message.version = String(object.version); + if (object.backendMetastores) { + if (typeof object.backendMetastores !== "object") + throw TypeError(".google.cloud.metastore.v1.Federation.backendMetastores: object expected"); + message.backendMetastores = {}; + for (var keys = Object.keys(object.backendMetastores), i = 0; i < keys.length; ++i) { + if (typeof object.backendMetastores[keys[i]] !== "object") + throw TypeError(".google.cloud.metastore.v1.Federation.backendMetastores: object expected"); + message.backendMetastores[keys[i]] = $root.google.cloud.metastore.v1.BackendMetastore.fromObject(object.backendMetastores[keys[i]]); + } + } if (object.endpointUri != null) message.endpointUri = String(object.endpointUri); - if (object.port != null) - message.port = object.port | 0; switch (object.state) { default: if (typeof object.state === "number") { @@ -11649,155 +12176,52 @@ case 2: message.state = 2; break; - case "SUSPENDING": + case "UPDATING": case 3: message.state = 3; break; - case "SUSPENDED": + case "DELETING": case 4: message.state = 4; break; - case "UPDATING": + case "ERROR": case 5: message.state = 5; break; - case "DELETING": - case 6: - message.state = 6; - break; - case "ERROR": - case 7: - message.state = 7; - break; } if (object.stateMessage != null) message.stateMessage = String(object.stateMessage); - if (object.artifactGcsUri != null) - message.artifactGcsUri = String(object.artifactGcsUri); - switch (object.tier) { - default: - if (typeof object.tier === "number") { - message.tier = object.tier; - break; - } - break; - case "TIER_UNSPECIFIED": - case 0: - message.tier = 0; - break; - case "DEVELOPER": - case 1: - message.tier = 1; - break; - case "ENTERPRISE": - case 3: - message.tier = 3; - break; - } - if (object.metadataIntegration != null) { - if (typeof object.metadataIntegration !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.Service.metadataIntegration: object expected"); - message.metadataIntegration = $root.google.cloud.metastore.v1alpha.MetadataIntegration.fromObject(object.metadataIntegration); - } - if (object.maintenanceWindow != null) { - if (typeof object.maintenanceWindow !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.Service.maintenanceWindow: object expected"); - message.maintenanceWindow = $root.google.cloud.metastore.v1alpha.MaintenanceWindow.fromObject(object.maintenanceWindow); - } if (object.uid != null) message.uid = String(object.uid); - if (object.metadataManagementActivity != null) { - if (typeof object.metadataManagementActivity !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.Service.metadataManagementActivity: object expected"); - message.metadataManagementActivity = $root.google.cloud.metastore.v1alpha.MetadataManagementActivity.fromObject(object.metadataManagementActivity); - } - switch (object.releaseChannel) { - default: - if (typeof object.releaseChannel === "number") { - message.releaseChannel = object.releaseChannel; - break; - } - break; - case "RELEASE_CHANNEL_UNSPECIFIED": - case 0: - message.releaseChannel = 0; - break; - case "CANARY": - case 1: - message.releaseChannel = 1; - break; - case "STABLE": - case 2: - message.releaseChannel = 2; - break; - } - if (object.encryptionConfig != null) { - if (typeof object.encryptionConfig !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.Service.encryptionConfig: object expected"); - message.encryptionConfig = $root.google.cloud.metastore.v1alpha.EncryptionConfig.fromObject(object.encryptionConfig); - } - if (object.networkConfig != null) { - if (typeof object.networkConfig !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.Service.networkConfig: object expected"); - message.networkConfig = $root.google.cloud.metastore.v1alpha.NetworkConfig.fromObject(object.networkConfig); - } - switch (object.databaseType) { - default: - if (typeof object.databaseType === "number") { - message.databaseType = object.databaseType; - break; - } - break; - case "DATABASE_TYPE_UNSPECIFIED": - case 0: - message.databaseType = 0; - break; - case "MYSQL": - case 1: - message.databaseType = 1; - break; - case "SPANNER": - case 2: - message.databaseType = 2; - break; - } return message; }; /** - * Creates a plain object from a Service message. Also converts values to other types if specified. + * Creates a plain object from a Federation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @static - * @param {google.cloud.metastore.v1alpha.Service} message Service + * @param {google.cloud.metastore.v1.Federation} message Federation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Service.toObject = function toObject(message, options) { + Federation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) + if (options.objects || options.defaults) { object.labels = {}; + object.backendMetastores = {}; + } if (options.defaults) { object.name = ""; object.createTime = null; object.updateTime = null; - object.network = ""; + object.version = ""; object.endpointUri = ""; - object.port = 0; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.stateMessage = ""; - object.artifactGcsUri = ""; - object.tier = options.enums === String ? "TIER_UNSPECIFIED" : 0; - object.metadataIntegration = null; - object.maintenanceWindow = null; object.uid = ""; - object.metadataManagementActivity = null; - object.releaseChannel = options.enums === String ? "RELEASE_CHANNEL_UNSPECIFIED" : 0; - object.encryptionConfig = null; - object.networkConfig = null; - object.databaseType = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -11811,166 +12235,94 @@ for (var j = 0; j < keys2.length; ++j) object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message.hiveMetastoreConfig != null && message.hasOwnProperty("hiveMetastoreConfig")) { - object.hiveMetastoreConfig = $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig.toObject(message.hiveMetastoreConfig, options); - if (options.oneofs) - object.metastoreConfig = "hiveMetastoreConfig"; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.backendMetastores && (keys2 = Object.keys(message.backendMetastores)).length) { + object.backendMetastores = {}; + for (var j = 0; j < keys2.length; ++j) + object.backendMetastores[keys2[j]] = $root.google.cloud.metastore.v1.BackendMetastore.toObject(message.backendMetastores[keys2[j]], options); } - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) object.endpointUri = message.endpointUri; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.metastore.v1alpha.Service.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1alpha.Service.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.metastore.v1.Federation.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1.Federation.State[message.state] : message.state; if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) object.stateMessage = message.stateMessage; - if (message.artifactGcsUri != null && message.hasOwnProperty("artifactGcsUri")) - object.artifactGcsUri = message.artifactGcsUri; - if (message.tier != null && message.hasOwnProperty("tier")) - object.tier = options.enums === String ? $root.google.cloud.metastore.v1alpha.Service.Tier[message.tier] === undefined ? message.tier : $root.google.cloud.metastore.v1alpha.Service.Tier[message.tier] : message.tier; - if (message.metadataIntegration != null && message.hasOwnProperty("metadataIntegration")) - object.metadataIntegration = $root.google.cloud.metastore.v1alpha.MetadataIntegration.toObject(message.metadataIntegration, options); - if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) - object.maintenanceWindow = $root.google.cloud.metastore.v1alpha.MaintenanceWindow.toObject(message.maintenanceWindow, options); if (message.uid != null && message.hasOwnProperty("uid")) object.uid = message.uid; - if (message.metadataManagementActivity != null && message.hasOwnProperty("metadataManagementActivity")) - object.metadataManagementActivity = $root.google.cloud.metastore.v1alpha.MetadataManagementActivity.toObject(message.metadataManagementActivity, options); - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) - object.releaseChannel = options.enums === String ? $root.google.cloud.metastore.v1alpha.Service.ReleaseChannel[message.releaseChannel] === undefined ? message.releaseChannel : $root.google.cloud.metastore.v1alpha.Service.ReleaseChannel[message.releaseChannel] : message.releaseChannel; - if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) - object.encryptionConfig = $root.google.cloud.metastore.v1alpha.EncryptionConfig.toObject(message.encryptionConfig, options); - if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) - object.networkConfig = $root.google.cloud.metastore.v1alpha.NetworkConfig.toObject(message.networkConfig, options); - if (message.databaseType != null && message.hasOwnProperty("databaseType")) - object.databaseType = options.enums === String ? $root.google.cloud.metastore.v1alpha.Service.DatabaseType[message.databaseType] === undefined ? message.databaseType : $root.google.cloud.metastore.v1alpha.Service.DatabaseType[message.databaseType] : message.databaseType; return object; }; /** - * Converts this Service to JSON. + * Converts this Federation to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @instance * @returns {Object.} JSON object */ - Service.prototype.toJSON = function toJSON() { + Federation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Service + * Gets the default type url for Federation * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.Service + * @memberof google.cloud.metastore.v1.Federation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Service.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Federation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.Service"; + return typeUrlPrefix + "/google.cloud.metastore.v1.Federation"; }; /** * State enum. - * @name google.cloud.metastore.v1alpha.Service.State + * @name google.cloud.metastore.v1.Federation.State * @enum {number} * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value * @property {number} CREATING=1 CREATING value * @property {number} ACTIVE=2 ACTIVE value - * @property {number} SUSPENDING=3 SUSPENDING value - * @property {number} SUSPENDED=4 SUSPENDED value - * @property {number} UPDATING=5 UPDATING value - * @property {number} DELETING=6 DELETING value - * @property {number} ERROR=7 ERROR value + * @property {number} UPDATING=3 UPDATING value + * @property {number} DELETING=4 DELETING value + * @property {number} ERROR=5 ERROR value */ - Service.State = (function() { + Federation.State = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; values[valuesById[1] = "CREATING"] = 1; values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "SUSPENDING"] = 3; - values[valuesById[4] = "SUSPENDED"] = 4; - values[valuesById[5] = "UPDATING"] = 5; - values[valuesById[6] = "DELETING"] = 6; - values[valuesById[7] = "ERROR"] = 7; - return values; - })(); - - /** - * Tier enum. - * @name google.cloud.metastore.v1alpha.Service.Tier - * @enum {number} - * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value - * @property {number} DEVELOPER=1 DEVELOPER value - * @property {number} ENTERPRISE=3 ENTERPRISE value - */ - Service.Tier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEVELOPER"] = 1; - values[valuesById[3] = "ENTERPRISE"] = 3; - return values; - })(); - - /** - * ReleaseChannel enum. - * @name google.cloud.metastore.v1alpha.Service.ReleaseChannel - * @enum {number} - * @property {number} RELEASE_CHANNEL_UNSPECIFIED=0 RELEASE_CHANNEL_UNSPECIFIED value - * @property {number} CANARY=1 CANARY value - * @property {number} STABLE=2 STABLE value - */ - Service.ReleaseChannel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RELEASE_CHANNEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "CANARY"] = 1; - values[valuesById[2] = "STABLE"] = 2; - return values; - })(); - - /** - * DatabaseType enum. - * @name google.cloud.metastore.v1alpha.Service.DatabaseType - * @enum {number} - * @property {number} DATABASE_TYPE_UNSPECIFIED=0 DATABASE_TYPE_UNSPECIFIED value - * @property {number} MYSQL=1 MYSQL value - * @property {number} SPANNER=2 SPANNER value - */ - Service.DatabaseType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MYSQL"] = 1; - values[valuesById[2] = "SPANNER"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "DELETING"] = 4; + values[valuesById[5] = "ERROR"] = 5; return values; })(); - return Service; + return Federation; })(); - v1alpha.MetadataIntegration = (function() { + v1.BackendMetastore = (function() { /** - * Properties of a MetadataIntegration. - * @memberof google.cloud.metastore.v1alpha - * @interface IMetadataIntegration - * @property {google.cloud.metastore.v1alpha.IDataCatalogConfig|null} [dataCatalogConfig] MetadataIntegration dataCatalogConfig - * @property {google.cloud.metastore.v1alpha.IDataplexConfig|null} [dataplexConfig] MetadataIntegration dataplexConfig + * Properties of a BackendMetastore. + * @memberof google.cloud.metastore.v1 + * @interface IBackendMetastore + * @property {string|null} [name] BackendMetastore name + * @property {google.cloud.metastore.v1.BackendMetastore.MetastoreType|null} [metastoreType] BackendMetastore metastoreType */ /** - * Constructs a new MetadataIntegration. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a MetadataIntegration. - * @implements IMetadataIntegration + * Constructs a new BackendMetastore. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents a BackendMetastore. + * @implements IBackendMetastore * @constructor - * @param {google.cloud.metastore.v1alpha.IMetadataIntegration=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IBackendMetastore=} [properties] Properties to set */ - function MetadataIntegration(properties) { + function BackendMetastore(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11978,89 +12330,89 @@ } /** - * MetadataIntegration dataCatalogConfig. - * @member {google.cloud.metastore.v1alpha.IDataCatalogConfig|null|undefined} dataCatalogConfig - * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * BackendMetastore name. + * @member {string} name + * @memberof google.cloud.metastore.v1.BackendMetastore * @instance */ - MetadataIntegration.prototype.dataCatalogConfig = null; + BackendMetastore.prototype.name = ""; /** - * MetadataIntegration dataplexConfig. - * @member {google.cloud.metastore.v1alpha.IDataplexConfig|null|undefined} dataplexConfig - * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * BackendMetastore metastoreType. + * @member {google.cloud.metastore.v1.BackendMetastore.MetastoreType} metastoreType + * @memberof google.cloud.metastore.v1.BackendMetastore * @instance */ - MetadataIntegration.prototype.dataplexConfig = null; + BackendMetastore.prototype.metastoreType = 0; /** - * Creates a new MetadataIntegration instance using the specified properties. + * Creates a new BackendMetastore instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @memberof google.cloud.metastore.v1.BackendMetastore * @static - * @param {google.cloud.metastore.v1alpha.IMetadataIntegration=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.MetadataIntegration} MetadataIntegration instance + * @param {google.cloud.metastore.v1.IBackendMetastore=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.BackendMetastore} BackendMetastore instance */ - MetadataIntegration.create = function create(properties) { - return new MetadataIntegration(properties); + BackendMetastore.create = function create(properties) { + return new BackendMetastore(properties); }; /** - * Encodes the specified MetadataIntegration message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataIntegration.verify|verify} messages. + * Encodes the specified BackendMetastore message. Does not implicitly {@link google.cloud.metastore.v1.BackendMetastore.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @memberof google.cloud.metastore.v1.BackendMetastore * @static - * @param {google.cloud.metastore.v1alpha.IMetadataIntegration} message MetadataIntegration message or plain object to encode + * @param {google.cloud.metastore.v1.IBackendMetastore} message BackendMetastore message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataIntegration.encode = function encode(message, writer) { + BackendMetastore.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataCatalogConfig != null && Object.hasOwnProperty.call(message, "dataCatalogConfig")) - $root.google.cloud.metastore.v1alpha.DataCatalogConfig.encode(message.dataCatalogConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dataplexConfig != null && Object.hasOwnProperty.call(message, "dataplexConfig")) - $root.google.cloud.metastore.v1alpha.DataplexConfig.encode(message.dataplexConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metastoreType != null && Object.hasOwnProperty.call(message, "metastoreType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.metastoreType); return writer; }; /** - * Encodes the specified MetadataIntegration message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataIntegration.verify|verify} messages. + * Encodes the specified BackendMetastore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.BackendMetastore.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @memberof google.cloud.metastore.v1.BackendMetastore * @static - * @param {google.cloud.metastore.v1alpha.IMetadataIntegration} message MetadataIntegration message or plain object to encode + * @param {google.cloud.metastore.v1.IBackendMetastore} message BackendMetastore message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataIntegration.encodeDelimited = function encodeDelimited(message, writer) { + BackendMetastore.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetadataIntegration message from the specified reader or buffer. + * Decodes a BackendMetastore message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @memberof google.cloud.metastore.v1.BackendMetastore * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.MetadataIntegration} MetadataIntegration + * @returns {google.cloud.metastore.v1.BackendMetastore} BackendMetastore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataIntegration.decode = function decode(reader, length) { + BackendMetastore.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.MetadataIntegration(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.BackendMetastore(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dataCatalogConfig = $root.google.cloud.metastore.v1alpha.DataCatalogConfig.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.dataplexConfig = $root.google.cloud.metastore.v1alpha.DataplexConfig.decode(reader, reader.uint32()); + message.metastoreType = reader.int32(); break; } default: @@ -12072,141 +12424,168 @@ }; /** - * Decodes a MetadataIntegration message from the specified reader or buffer, length delimited. + * Decodes a BackendMetastore message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @memberof google.cloud.metastore.v1.BackendMetastore * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.MetadataIntegration} MetadataIntegration + * @returns {google.cloud.metastore.v1.BackendMetastore} BackendMetastore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataIntegration.decodeDelimited = function decodeDelimited(reader) { + BackendMetastore.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetadataIntegration message. + * Verifies a BackendMetastore message. * @function verify - * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @memberof google.cloud.metastore.v1.BackendMetastore * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetadataIntegration.verify = function verify(message) { + BackendMetastore.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataCatalogConfig != null && message.hasOwnProperty("dataCatalogConfig")) { - var error = $root.google.cloud.metastore.v1alpha.DataCatalogConfig.verify(message.dataCatalogConfig); - if (error) - return "dataCatalogConfig." + error; - } - if (message.dataplexConfig != null && message.hasOwnProperty("dataplexConfig")) { - var error = $root.google.cloud.metastore.v1alpha.DataplexConfig.verify(message.dataplexConfig); - if (error) - return "dataplexConfig." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metastoreType != null && message.hasOwnProperty("metastoreType")) + switch (message.metastoreType) { + default: + return "metastoreType: enum value expected"; + case 0: + case 3: + break; + } return null; }; /** - * Creates a MetadataIntegration message from a plain object. Also converts values to their respective internal types. + * Creates a BackendMetastore message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @memberof google.cloud.metastore.v1.BackendMetastore * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.MetadataIntegration} MetadataIntegration + * @returns {google.cloud.metastore.v1.BackendMetastore} BackendMetastore */ - MetadataIntegration.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.MetadataIntegration) + BackendMetastore.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.BackendMetastore) return object; - var message = new $root.google.cloud.metastore.v1alpha.MetadataIntegration(); - if (object.dataCatalogConfig != null) { - if (typeof object.dataCatalogConfig !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.MetadataIntegration.dataCatalogConfig: object expected"); - message.dataCatalogConfig = $root.google.cloud.metastore.v1alpha.DataCatalogConfig.fromObject(object.dataCatalogConfig); - } - if (object.dataplexConfig != null) { - if (typeof object.dataplexConfig !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.MetadataIntegration.dataplexConfig: object expected"); - message.dataplexConfig = $root.google.cloud.metastore.v1alpha.DataplexConfig.fromObject(object.dataplexConfig); + var message = new $root.google.cloud.metastore.v1.BackendMetastore(); + if (object.name != null) + message.name = String(object.name); + switch (object.metastoreType) { + default: + if (typeof object.metastoreType === "number") { + message.metastoreType = object.metastoreType; + break; + } + break; + case "METASTORE_TYPE_UNSPECIFIED": + case 0: + message.metastoreType = 0; + break; + case "DATAPROC_METASTORE": + case 3: + message.metastoreType = 3; + break; } return message; }; /** - * Creates a plain object from a MetadataIntegration message. Also converts values to other types if specified. + * Creates a plain object from a BackendMetastore message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @memberof google.cloud.metastore.v1.BackendMetastore * @static - * @param {google.cloud.metastore.v1alpha.MetadataIntegration} message MetadataIntegration + * @param {google.cloud.metastore.v1.BackendMetastore} message BackendMetastore * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetadataIntegration.toObject = function toObject(message, options) { + BackendMetastore.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.dataCatalogConfig = null; - object.dataplexConfig = null; + object.name = ""; + object.metastoreType = options.enums === String ? "METASTORE_TYPE_UNSPECIFIED" : 0; } - if (message.dataCatalogConfig != null && message.hasOwnProperty("dataCatalogConfig")) - object.dataCatalogConfig = $root.google.cloud.metastore.v1alpha.DataCatalogConfig.toObject(message.dataCatalogConfig, options); - if (message.dataplexConfig != null && message.hasOwnProperty("dataplexConfig")) - object.dataplexConfig = $root.google.cloud.metastore.v1alpha.DataplexConfig.toObject(message.dataplexConfig, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metastoreType != null && message.hasOwnProperty("metastoreType")) + object.metastoreType = options.enums === String ? $root.google.cloud.metastore.v1.BackendMetastore.MetastoreType[message.metastoreType] === undefined ? message.metastoreType : $root.google.cloud.metastore.v1.BackendMetastore.MetastoreType[message.metastoreType] : message.metastoreType; return object; }; /** - * Converts this MetadataIntegration to JSON. + * Converts this BackendMetastore to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @memberof google.cloud.metastore.v1.BackendMetastore * @instance * @returns {Object.} JSON object */ - MetadataIntegration.prototype.toJSON = function toJSON() { + BackendMetastore.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetadataIntegration + * Gets the default type url for BackendMetastore * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @memberof google.cloud.metastore.v1.BackendMetastore * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetadataIntegration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BackendMetastore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.MetadataIntegration"; + return typeUrlPrefix + "/google.cloud.metastore.v1.BackendMetastore"; }; - return MetadataIntegration; + /** + * MetastoreType enum. + * @name google.cloud.metastore.v1.BackendMetastore.MetastoreType + * @enum {number} + * @property {number} METASTORE_TYPE_UNSPECIFIED=0 METASTORE_TYPE_UNSPECIFIED value + * @property {number} DATAPROC_METASTORE=3 DATAPROC_METASTORE value + */ + BackendMetastore.MetastoreType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METASTORE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[3] = "DATAPROC_METASTORE"] = 3; + return values; + })(); + + return BackendMetastore; })(); - v1alpha.DataCatalogConfig = (function() { + v1.ListFederationsRequest = (function() { /** - * Properties of a DataCatalogConfig. - * @memberof google.cloud.metastore.v1alpha - * @interface IDataCatalogConfig - * @property {boolean|null} [enabled] DataCatalogConfig enabled + * Properties of a ListFederationsRequest. + * @memberof google.cloud.metastore.v1 + * @interface IListFederationsRequest + * @property {string|null} [parent] ListFederationsRequest parent + * @property {number|null} [pageSize] ListFederationsRequest pageSize + * @property {string|null} [pageToken] ListFederationsRequest pageToken + * @property {string|null} [filter] ListFederationsRequest filter + * @property {string|null} [orderBy] ListFederationsRequest orderBy */ /** - * Constructs a new DataCatalogConfig. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a DataCatalogConfig. - * @implements IDataCatalogConfig + * Constructs a new ListFederationsRequest. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents a ListFederationsRequest. + * @implements IListFederationsRequest * @constructor - * @param {google.cloud.metastore.v1alpha.IDataCatalogConfig=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IListFederationsRequest=} [properties] Properties to set */ - function DataCatalogConfig(properties) { + function ListFederationsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12214,75 +12593,131 @@ } /** - * DataCatalogConfig enabled. - * @member {boolean} enabled - * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * ListFederationsRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1.ListFederationsRequest * @instance */ - DataCatalogConfig.prototype.enabled = false; + ListFederationsRequest.prototype.parent = ""; /** - * Creates a new DataCatalogConfig instance using the specified properties. + * ListFederationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.metastore.v1.ListFederationsRequest + * @instance + */ + ListFederationsRequest.prototype.pageSize = 0; + + /** + * ListFederationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.metastore.v1.ListFederationsRequest + * @instance + */ + ListFederationsRequest.prototype.pageToken = ""; + + /** + * ListFederationsRequest filter. + * @member {string} filter + * @memberof google.cloud.metastore.v1.ListFederationsRequest + * @instance + */ + ListFederationsRequest.prototype.filter = ""; + + /** + * ListFederationsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.metastore.v1.ListFederationsRequest + * @instance + */ + ListFederationsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListFederationsRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @memberof google.cloud.metastore.v1.ListFederationsRequest * @static - * @param {google.cloud.metastore.v1alpha.IDataCatalogConfig=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.DataCatalogConfig} DataCatalogConfig instance + * @param {google.cloud.metastore.v1.IListFederationsRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.ListFederationsRequest} ListFederationsRequest instance */ - DataCatalogConfig.create = function create(properties) { - return new DataCatalogConfig(properties); + ListFederationsRequest.create = function create(properties) { + return new ListFederationsRequest(properties); }; /** - * Encodes the specified DataCatalogConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.DataCatalogConfig.verify|verify} messages. + * Encodes the specified ListFederationsRequest message. Does not implicitly {@link google.cloud.metastore.v1.ListFederationsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @memberof google.cloud.metastore.v1.ListFederationsRequest * @static - * @param {google.cloud.metastore.v1alpha.IDataCatalogConfig} message DataCatalogConfig message or plain object to encode + * @param {google.cloud.metastore.v1.IListFederationsRequest} message ListFederationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataCatalogConfig.encode = function encode(message, writer) { + ListFederationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified DataCatalogConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DataCatalogConfig.verify|verify} messages. + * Encodes the specified ListFederationsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListFederationsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @memberof google.cloud.metastore.v1.ListFederationsRequest * @static - * @param {google.cloud.metastore.v1alpha.IDataCatalogConfig} message DataCatalogConfig message or plain object to encode + * @param {google.cloud.metastore.v1.IListFederationsRequest} message ListFederationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataCatalogConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListFederationsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataCatalogConfig message from the specified reader or buffer. + * Decodes a ListFederationsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @memberof google.cloud.metastore.v1.ListFederationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.DataCatalogConfig} DataCatalogConfig + * @returns {google.cloud.metastore.v1.ListFederationsRequest} ListFederationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataCatalogConfig.decode = function decode(reader, length) { + ListFederationsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.DataCatalogConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ListFederationsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } case 2: { - message.enabled = reader.bool(); + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -12294,123 +12729,159 @@ }; /** - * Decodes a DataCatalogConfig message from the specified reader or buffer, length delimited. + * Decodes a ListFederationsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @memberof google.cloud.metastore.v1.ListFederationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.DataCatalogConfig} DataCatalogConfig + * @returns {google.cloud.metastore.v1.ListFederationsRequest} ListFederationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataCatalogConfig.decodeDelimited = function decodeDelimited(reader) { + ListFederationsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataCatalogConfig message. + * Verifies a ListFederationsRequest message. * @function verify - * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @memberof google.cloud.metastore.v1.ListFederationsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataCatalogConfig.verify = function verify(message) { + ListFederationsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a DataCatalogConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListFederationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @memberof google.cloud.metastore.v1.ListFederationsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.DataCatalogConfig} DataCatalogConfig + * @returns {google.cloud.metastore.v1.ListFederationsRequest} ListFederationsRequest */ - DataCatalogConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.DataCatalogConfig) + ListFederationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.ListFederationsRequest) return object; - var message = new $root.google.cloud.metastore.v1alpha.DataCatalogConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); + var message = new $root.google.cloud.metastore.v1.ListFederationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a DataCatalogConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListFederationsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @memberof google.cloud.metastore.v1.ListFederationsRequest * @static - * @param {google.cloud.metastore.v1alpha.DataCatalogConfig} message DataCatalogConfig + * @param {google.cloud.metastore.v1.ListFederationsRequest} message ListFederationsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataCatalogConfig.toObject = function toObject(message, options) { + ListFederationsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this DataCatalogConfig to JSON. + * Converts this ListFederationsRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @memberof google.cloud.metastore.v1.ListFederationsRequest * @instance * @returns {Object.} JSON object */ - DataCatalogConfig.prototype.toJSON = function toJSON() { + ListFederationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataCatalogConfig + * Gets the default type url for ListFederationsRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @memberof google.cloud.metastore.v1.ListFederationsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataCatalogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListFederationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.DataCatalogConfig"; + return typeUrlPrefix + "/google.cloud.metastore.v1.ListFederationsRequest"; }; - return DataCatalogConfig; + return ListFederationsRequest; })(); - v1alpha.DataplexConfig = (function() { + v1.ListFederationsResponse = (function() { /** - * Properties of a DataplexConfig. - * @memberof google.cloud.metastore.v1alpha - * @interface IDataplexConfig - * @property {Object.|null} [lakeResources] DataplexConfig lakeResources + * Properties of a ListFederationsResponse. + * @memberof google.cloud.metastore.v1 + * @interface IListFederationsResponse + * @property {Array.|null} [federations] ListFederationsResponse federations + * @property {string|null} [nextPageToken] ListFederationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListFederationsResponse unreachable */ /** - * Constructs a new DataplexConfig. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a DataplexConfig. - * @implements IDataplexConfig + * Constructs a new ListFederationsResponse. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents a ListFederationsResponse. + * @implements IListFederationsResponse * @constructor - * @param {google.cloud.metastore.v1alpha.IDataplexConfig=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IListFederationsResponse=} [properties] Properties to set */ - function DataplexConfig(properties) { - this.lakeResources = {}; + function ListFederationsResponse(properties) { + this.federations = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12418,97 +12889,109 @@ } /** - * DataplexConfig lakeResources. - * @member {Object.} lakeResources - * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * ListFederationsResponse federations. + * @member {Array.} federations + * @memberof google.cloud.metastore.v1.ListFederationsResponse * @instance */ - DataplexConfig.prototype.lakeResources = $util.emptyObject; + ListFederationsResponse.prototype.federations = $util.emptyArray; /** - * Creates a new DataplexConfig instance using the specified properties. + * ListFederationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.metastore.v1.ListFederationsResponse + * @instance + */ + ListFederationsResponse.prototype.nextPageToken = ""; + + /** + * ListFederationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.metastore.v1.ListFederationsResponse + * @instance + */ + ListFederationsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListFederationsResponse instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @memberof google.cloud.metastore.v1.ListFederationsResponse * @static - * @param {google.cloud.metastore.v1alpha.IDataplexConfig=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.DataplexConfig} DataplexConfig instance + * @param {google.cloud.metastore.v1.IListFederationsResponse=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.ListFederationsResponse} ListFederationsResponse instance */ - DataplexConfig.create = function create(properties) { - return new DataplexConfig(properties); + ListFederationsResponse.create = function create(properties) { + return new ListFederationsResponse(properties); }; /** - * Encodes the specified DataplexConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.DataplexConfig.verify|verify} messages. + * Encodes the specified ListFederationsResponse message. Does not implicitly {@link google.cloud.metastore.v1.ListFederationsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @memberof google.cloud.metastore.v1.ListFederationsResponse * @static - * @param {google.cloud.metastore.v1alpha.IDataplexConfig} message DataplexConfig message or plain object to encode + * @param {google.cloud.metastore.v1.IListFederationsResponse} message ListFederationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataplexConfig.encode = function encode(message, writer) { + ListFederationsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.lakeResources != null && Object.hasOwnProperty.call(message, "lakeResources")) - for (var keys = Object.keys(message.lakeResources), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.metastore.v1alpha.Lake.encode(message.lakeResources[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.federations != null && message.federations.length) + for (var i = 0; i < message.federations.length; ++i) + $root.google.cloud.metastore.v1.Federation.encode(message.federations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified DataplexConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DataplexConfig.verify|verify} messages. + * Encodes the specified ListFederationsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ListFederationsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @memberof google.cloud.metastore.v1.ListFederationsResponse * @static - * @param {google.cloud.metastore.v1alpha.IDataplexConfig} message DataplexConfig message or plain object to encode + * @param {google.cloud.metastore.v1.IListFederationsResponse} message ListFederationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataplexConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListFederationsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataplexConfig message from the specified reader or buffer. + * Decodes a ListFederationsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @memberof google.cloud.metastore.v1.ListFederationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.DataplexConfig} DataplexConfig + * @returns {google.cloud.metastore.v1.ListFederationsResponse} ListFederationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataplexConfig.decode = function decode(reader, length) { + ListFederationsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.DataplexConfig(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ListFederationsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (message.lakeResources === $util.emptyObject) - message.lakeResources = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.metastore.v1alpha.Lake.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.lakeResources[key] = value; + if (!(message.federations && message.federations.length)) + message.federations = []; + message.federations.push($root.google.cloud.metastore.v1.Federation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -12520,141 +13003,169 @@ }; /** - * Decodes a DataplexConfig message from the specified reader or buffer, length delimited. + * Decodes a ListFederationsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @memberof google.cloud.metastore.v1.ListFederationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.DataplexConfig} DataplexConfig + * @returns {google.cloud.metastore.v1.ListFederationsResponse} ListFederationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataplexConfig.decodeDelimited = function decodeDelimited(reader) { + ListFederationsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataplexConfig message. + * Verifies a ListFederationsResponse message. * @function verify - * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @memberof google.cloud.metastore.v1.ListFederationsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataplexConfig.verify = function verify(message) { + ListFederationsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lakeResources != null && message.hasOwnProperty("lakeResources")) { - if (!$util.isObject(message.lakeResources)) - return "lakeResources: object expected"; - var key = Object.keys(message.lakeResources); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.metastore.v1alpha.Lake.verify(message.lakeResources[key[i]]); + if (message.federations != null && message.hasOwnProperty("federations")) { + if (!Array.isArray(message.federations)) + return "federations: array expected"; + for (var i = 0; i < message.federations.length; ++i) { + var error = $root.google.cloud.metastore.v1.Federation.verify(message.federations[i]); if (error) - return "lakeResources." + error; + return "federations." + error; } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } return null; }; /** - * Creates a DataplexConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListFederationsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @memberof google.cloud.metastore.v1.ListFederationsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.DataplexConfig} DataplexConfig + * @returns {google.cloud.metastore.v1.ListFederationsResponse} ListFederationsResponse */ - DataplexConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.DataplexConfig) + ListFederationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.ListFederationsResponse) return object; - var message = new $root.google.cloud.metastore.v1alpha.DataplexConfig(); - if (object.lakeResources) { - if (typeof object.lakeResources !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.DataplexConfig.lakeResources: object expected"); - message.lakeResources = {}; - for (var keys = Object.keys(object.lakeResources), i = 0; i < keys.length; ++i) { - if (typeof object.lakeResources[keys[i]] !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.DataplexConfig.lakeResources: object expected"); - message.lakeResources[keys[i]] = $root.google.cloud.metastore.v1alpha.Lake.fromObject(object.lakeResources[keys[i]]); + var message = new $root.google.cloud.metastore.v1.ListFederationsResponse(); + if (object.federations) { + if (!Array.isArray(object.federations)) + throw TypeError(".google.cloud.metastore.v1.ListFederationsResponse.federations: array expected"); + message.federations = []; + for (var i = 0; i < object.federations.length; ++i) { + if (typeof object.federations[i] !== "object") + throw TypeError(".google.cloud.metastore.v1.ListFederationsResponse.federations: object expected"); + message.federations[i] = $root.google.cloud.metastore.v1.Federation.fromObject(object.federations[i]); } } - return message; - }; - - /** - * Creates a plain object from a DataplexConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1alpha.DataplexConfig + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.metastore.v1.ListFederationsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListFederationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1.ListFederationsResponse * @static - * @param {google.cloud.metastore.v1alpha.DataplexConfig} message DataplexConfig + * @param {google.cloud.metastore.v1.ListFederationsResponse} message ListFederationsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataplexConfig.toObject = function toObject(message, options) { + ListFederationsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.lakeResources = {}; - var keys2; - if (message.lakeResources && (keys2 = Object.keys(message.lakeResources)).length) { - object.lakeResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.lakeResources[keys2[j]] = $root.google.cloud.metastore.v1alpha.Lake.toObject(message.lakeResources[keys2[j]], options); + if (options.arrays || options.defaults) { + object.federations = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.federations && message.federations.length) { + object.federations = []; + for (var j = 0; j < message.federations.length; ++j) + object.federations[j] = $root.google.cloud.metastore.v1.Federation.toObject(message.federations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } return object; }; /** - * Converts this DataplexConfig to JSON. + * Converts this ListFederationsResponse to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @memberof google.cloud.metastore.v1.ListFederationsResponse * @instance * @returns {Object.} JSON object */ - DataplexConfig.prototype.toJSON = function toJSON() { + ListFederationsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataplexConfig + * Gets the default type url for ListFederationsResponse * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @memberof google.cloud.metastore.v1.ListFederationsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataplexConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListFederationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.DataplexConfig"; + return typeUrlPrefix + "/google.cloud.metastore.v1.ListFederationsResponse"; }; - return DataplexConfig; + return ListFederationsResponse; })(); - v1alpha.Lake = (function() { + v1.GetFederationRequest = (function() { /** - * Properties of a Lake. - * @memberof google.cloud.metastore.v1alpha - * @interface ILake - * @property {string|null} [name] Lake name + * Properties of a GetFederationRequest. + * @memberof google.cloud.metastore.v1 + * @interface IGetFederationRequest + * @property {string|null} [name] GetFederationRequest name */ /** - * Constructs a new Lake. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a Lake. - * @implements ILake + * Constructs a new GetFederationRequest. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents a GetFederationRequest. + * @implements IGetFederationRequest * @constructor - * @param {google.cloud.metastore.v1alpha.ILake=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IGetFederationRequest=} [properties] Properties to set */ - function Lake(properties) { + function GetFederationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12662,35 +13173,35 @@ } /** - * Lake name. + * GetFederationRequest name. * @member {string} name - * @memberof google.cloud.metastore.v1alpha.Lake + * @memberof google.cloud.metastore.v1.GetFederationRequest * @instance */ - Lake.prototype.name = ""; + GetFederationRequest.prototype.name = ""; /** - * Creates a new Lake instance using the specified properties. + * Creates a new GetFederationRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.Lake + * @memberof google.cloud.metastore.v1.GetFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.ILake=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.Lake} Lake instance + * @param {google.cloud.metastore.v1.IGetFederationRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.GetFederationRequest} GetFederationRequest instance */ - Lake.create = function create(properties) { - return new Lake(properties); + GetFederationRequest.create = function create(properties) { + return new GetFederationRequest(properties); }; /** - * Encodes the specified Lake message. Does not implicitly {@link google.cloud.metastore.v1alpha.Lake.verify|verify} messages. + * Encodes the specified GetFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1.GetFederationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.Lake + * @memberof google.cloud.metastore.v1.GetFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.ILake} message Lake message or plain object to encode + * @param {google.cloud.metastore.v1.IGetFederationRequest} message GetFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Lake.encode = function encode(message, writer) { + GetFederationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -12699,33 +13210,33 @@ }; /** - * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Lake.verify|verify} messages. + * Encodes the specified GetFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.GetFederationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.Lake + * @memberof google.cloud.metastore.v1.GetFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.ILake} message Lake message or plain object to encode + * @param {google.cloud.metastore.v1.IGetFederationRequest} message GetFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Lake.encodeDelimited = function encodeDelimited(message, writer) { + GetFederationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Lake message from the specified reader or buffer. + * Decodes a GetFederationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.Lake + * @memberof google.cloud.metastore.v1.GetFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.Lake} Lake + * @returns {google.cloud.metastore.v1.GetFederationRequest} GetFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Lake.decode = function decode(reader, length) { + GetFederationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.Lake(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.GetFederationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -12742,30 +13253,30 @@ }; /** - * Decodes a Lake message from the specified reader or buffer, length delimited. + * Decodes a GetFederationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.Lake + * @memberof google.cloud.metastore.v1.GetFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.Lake} Lake + * @returns {google.cloud.metastore.v1.GetFederationRequest} GetFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Lake.decodeDelimited = function decodeDelimited(reader) { + GetFederationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Lake message. + * Verifies a GetFederationRequest message. * @function verify - * @memberof google.cloud.metastore.v1alpha.Lake + * @memberof google.cloud.metastore.v1.GetFederationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Lake.verify = function verify(message) { + GetFederationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -12775,32 +13286,32 @@ }; /** - * Creates a Lake message from a plain object. Also converts values to their respective internal types. + * Creates a GetFederationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.Lake + * @memberof google.cloud.metastore.v1.GetFederationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.Lake} Lake + * @returns {google.cloud.metastore.v1.GetFederationRequest} GetFederationRequest */ - Lake.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.Lake) + GetFederationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.GetFederationRequest) return object; - var message = new $root.google.cloud.metastore.v1alpha.Lake(); + var message = new $root.google.cloud.metastore.v1.GetFederationRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a Lake message. Also converts values to other types if specified. + * Creates a plain object from a GetFederationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.Lake + * @memberof google.cloud.metastore.v1.GetFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.Lake} message Lake + * @param {google.cloud.metastore.v1.GetFederationRequest} message GetFederationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Lake.toObject = function toObject(message, options) { + GetFederationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -12812,53 +13323,55 @@ }; /** - * Converts this Lake to JSON. + * Converts this GetFederationRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.Lake + * @memberof google.cloud.metastore.v1.GetFederationRequest * @instance * @returns {Object.} JSON object */ - Lake.prototype.toJSON = function toJSON() { + GetFederationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Lake + * Gets the default type url for GetFederationRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.Lake + * @memberof google.cloud.metastore.v1.GetFederationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Lake.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetFederationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.Lake"; + return typeUrlPrefix + "/google.cloud.metastore.v1.GetFederationRequest"; }; - return Lake; + return GetFederationRequest; })(); - v1alpha.MaintenanceWindow = (function() { + v1.CreateFederationRequest = (function() { /** - * Properties of a MaintenanceWindow. - * @memberof google.cloud.metastore.v1alpha - * @interface IMaintenanceWindow - * @property {google.protobuf.IInt32Value|null} [hourOfDay] MaintenanceWindow hourOfDay - * @property {google.type.DayOfWeek|null} [dayOfWeek] MaintenanceWindow dayOfWeek + * Properties of a CreateFederationRequest. + * @memberof google.cloud.metastore.v1 + * @interface ICreateFederationRequest + * @property {string|null} [parent] CreateFederationRequest parent + * @property {string|null} [federationId] CreateFederationRequest federationId + * @property {google.cloud.metastore.v1.IFederation|null} [federation] CreateFederationRequest federation + * @property {string|null} [requestId] CreateFederationRequest requestId */ /** - * Constructs a new MaintenanceWindow. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a MaintenanceWindow. - * @implements IMaintenanceWindow + * Constructs a new CreateFederationRequest. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents a CreateFederationRequest. + * @implements ICreateFederationRequest * @constructor - * @param {google.cloud.metastore.v1alpha.IMaintenanceWindow=} [properties] Properties to set + * @param {google.cloud.metastore.v1.ICreateFederationRequest=} [properties] Properties to set */ - function MaintenanceWindow(properties) { + function CreateFederationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12866,89 +13379,117 @@ } /** - * MaintenanceWindow hourOfDay. - * @member {google.protobuf.IInt32Value|null|undefined} hourOfDay - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * CreateFederationRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1.CreateFederationRequest * @instance */ - MaintenanceWindow.prototype.hourOfDay = null; + CreateFederationRequest.prototype.parent = ""; /** - * MaintenanceWindow dayOfWeek. - * @member {google.type.DayOfWeek} dayOfWeek - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * CreateFederationRequest federationId. + * @member {string} federationId + * @memberof google.cloud.metastore.v1.CreateFederationRequest * @instance */ - MaintenanceWindow.prototype.dayOfWeek = 0; + CreateFederationRequest.prototype.federationId = ""; /** - * Creates a new MaintenanceWindow instance using the specified properties. + * CreateFederationRequest federation. + * @member {google.cloud.metastore.v1.IFederation|null|undefined} federation + * @memberof google.cloud.metastore.v1.CreateFederationRequest + * @instance + */ + CreateFederationRequest.prototype.federation = null; + + /** + * CreateFederationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1.CreateFederationRequest + * @instance + */ + CreateFederationRequest.prototype.requestId = ""; + + /** + * Creates a new CreateFederationRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @memberof google.cloud.metastore.v1.CreateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IMaintenanceWindow=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.MaintenanceWindow} MaintenanceWindow instance + * @param {google.cloud.metastore.v1.ICreateFederationRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.CreateFederationRequest} CreateFederationRequest instance */ - MaintenanceWindow.create = function create(properties) { - return new MaintenanceWindow(properties); + CreateFederationRequest.create = function create(properties) { + return new CreateFederationRequest(properties); }; /** - * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.metastore.v1alpha.MaintenanceWindow.verify|verify} messages. + * Encodes the specified CreateFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1.CreateFederationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @memberof google.cloud.metastore.v1.CreateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {google.cloud.metastore.v1.ICreateFederationRequest} message CreateFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MaintenanceWindow.encode = function encode(message, writer) { + CreateFederationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.hourOfDay != null && Object.hasOwnProperty.call(message, "hourOfDay")) - $root.google.protobuf.Int32Value.encode(message.hourOfDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.federationId != null && Object.hasOwnProperty.call(message, "federationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.federationId); + if (message.federation != null && Object.hasOwnProperty.call(message, "federation")) + $root.google.cloud.metastore.v1.Federation.encode(message.federation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; /** - * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MaintenanceWindow.verify|verify} messages. + * Encodes the specified CreateFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.CreateFederationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @memberof google.cloud.metastore.v1.CreateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {google.cloud.metastore.v1.ICreateFederationRequest} message CreateFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { + CreateFederationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MaintenanceWindow message from the specified reader or buffer. + * Decodes a CreateFederationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @memberof google.cloud.metastore.v1.CreateFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.MaintenanceWindow} MaintenanceWindow + * @returns {google.cloud.metastore.v1.CreateFederationRequest} CreateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MaintenanceWindow.decode = function decode(reader, length) { + CreateFederationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.MaintenanceWindow(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.CreateFederationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.hourOfDay = $root.google.protobuf.Int32Value.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.dayOfWeek = reader.int32(); + message.federationId = reader.string(); + break; + } + case 3: { + message.federation = $root.google.cloud.metastore.v1.Federation.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); break; } default: @@ -12960,191 +13501,154 @@ }; /** - * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * Decodes a CreateFederationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @memberof google.cloud.metastore.v1.CreateFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.MaintenanceWindow} MaintenanceWindow + * @returns {google.cloud.metastore.v1.CreateFederationRequest} CreateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { + CreateFederationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MaintenanceWindow message. + * Verifies a CreateFederationRequest message. * @function verify - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @memberof google.cloud.metastore.v1.CreateFederationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MaintenanceWindow.verify = function verify(message) { + CreateFederationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.hourOfDay != null && message.hasOwnProperty("hourOfDay")) { - var error = $root.google.protobuf.Int32Value.verify(message.hourOfDay); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.federationId != null && message.hasOwnProperty("federationId")) + if (!$util.isString(message.federationId)) + return "federationId: string expected"; + if (message.federation != null && message.hasOwnProperty("federation")) { + var error = $root.google.cloud.metastore.v1.Federation.verify(message.federation); if (error) - return "hourOfDay." + error; + return "federation." + error; } - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - switch (message.dayOfWeek) { - default: - return "dayOfWeek: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFederationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @memberof google.cloud.metastore.v1.CreateFederationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.MaintenanceWindow} MaintenanceWindow + * @returns {google.cloud.metastore.v1.CreateFederationRequest} CreateFederationRequest */ - MaintenanceWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.MaintenanceWindow) + CreateFederationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.CreateFederationRequest) return object; - var message = new $root.google.cloud.metastore.v1alpha.MaintenanceWindow(); - if (object.hourOfDay != null) { - if (typeof object.hourOfDay !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.MaintenanceWindow.hourOfDay: object expected"); - message.hourOfDay = $root.google.protobuf.Int32Value.fromObject(object.hourOfDay); - } - switch (object.dayOfWeek) { - default: - if (typeof object.dayOfWeek === "number") { - message.dayOfWeek = object.dayOfWeek; - break; - } - break; - case "DAY_OF_WEEK_UNSPECIFIED": - case 0: - message.dayOfWeek = 0; - break; - case "MONDAY": - case 1: - message.dayOfWeek = 1; - break; - case "TUESDAY": - case 2: - message.dayOfWeek = 2; - break; - case "WEDNESDAY": - case 3: - message.dayOfWeek = 3; - break; - case "THURSDAY": - case 4: - message.dayOfWeek = 4; - break; - case "FRIDAY": - case 5: - message.dayOfWeek = 5; - break; - case "SATURDAY": - case 6: - message.dayOfWeek = 6; - break; - case "SUNDAY": - case 7: - message.dayOfWeek = 7; - break; + var message = new $root.google.cloud.metastore.v1.CreateFederationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.federationId != null) + message.federationId = String(object.federationId); + if (object.federation != null) { + if (typeof object.federation !== "object") + throw TypeError(".google.cloud.metastore.v1.CreateFederationRequest.federation: object expected"); + message.federation = $root.google.cloud.metastore.v1.Federation.fromObject(object.federation); } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * Creates a plain object from a CreateFederationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @memberof google.cloud.metastore.v1.CreateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.MaintenanceWindow} message MaintenanceWindow + * @param {google.cloud.metastore.v1.CreateFederationRequest} message CreateFederationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MaintenanceWindow.toObject = function toObject(message, options) { + CreateFederationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.hourOfDay = null; - object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + object.parent = ""; + object.federationId = ""; + object.federation = null; + object.requestId = ""; } - if (message.hourOfDay != null && message.hasOwnProperty("hourOfDay")) - object.hourOfDay = $root.google.protobuf.Int32Value.toObject(message.hourOfDay, options); - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.federationId != null && message.hasOwnProperty("federationId")) + object.federationId = message.federationId; + if (message.federation != null && message.hasOwnProperty("federation")) + object.federation = $root.google.cloud.metastore.v1.Federation.toObject(message.federation, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this MaintenanceWindow to JSON. + * Converts this CreateFederationRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @memberof google.cloud.metastore.v1.CreateFederationRequest * @instance * @returns {Object.} JSON object */ - MaintenanceWindow.prototype.toJSON = function toJSON() { + CreateFederationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MaintenanceWindow + * Gets the default type url for CreateFederationRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @memberof google.cloud.metastore.v1.CreateFederationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateFederationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.MaintenanceWindow"; + return typeUrlPrefix + "/google.cloud.metastore.v1.CreateFederationRequest"; }; - return MaintenanceWindow; + return CreateFederationRequest; })(); - v1alpha.HiveMetastoreConfig = (function() { + v1.UpdateFederationRequest = (function() { /** - * Properties of a HiveMetastoreConfig. - * @memberof google.cloud.metastore.v1alpha - * @interface IHiveMetastoreConfig - * @property {string|null} [version] HiveMetastoreConfig version - * @property {Object.|null} [configOverrides] HiveMetastoreConfig configOverrides - * @property {google.cloud.metastore.v1alpha.IKerberosConfig|null} [kerberosConfig] HiveMetastoreConfig kerberosConfig - * @property {google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol|null} [endpointProtocol] HiveMetastoreConfig endpointProtocol - * @property {Object.|null} [auxiliaryVersions] HiveMetastoreConfig auxiliaryVersions + * Properties of an UpdateFederationRequest. + * @memberof google.cloud.metastore.v1 + * @interface IUpdateFederationRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFederationRequest updateMask + * @property {google.cloud.metastore.v1.IFederation|null} [federation] UpdateFederationRequest federation + * @property {string|null} [requestId] UpdateFederationRequest requestId */ /** - * Constructs a new HiveMetastoreConfig. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a HiveMetastoreConfig. - * @implements IHiveMetastoreConfig + * Constructs a new UpdateFederationRequest. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents an UpdateFederationRequest. + * @implements IUpdateFederationRequest * @constructor - * @param {google.cloud.metastore.v1alpha.IHiveMetastoreConfig=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IUpdateFederationRequest=} [properties] Properties to set */ - function HiveMetastoreConfig(properties) { - this.configOverrides = {}; - this.auxiliaryVersions = {}; + function UpdateFederationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13152,173 +13656,103 @@ } /** - * HiveMetastoreConfig version. - * @member {string} version - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig - * @instance - */ - HiveMetastoreConfig.prototype.version = ""; - - /** - * HiveMetastoreConfig configOverrides. - * @member {Object.} configOverrides - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig - * @instance - */ - HiveMetastoreConfig.prototype.configOverrides = $util.emptyObject; - - /** - * HiveMetastoreConfig kerberosConfig. - * @member {google.cloud.metastore.v1alpha.IKerberosConfig|null|undefined} kerberosConfig - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * UpdateFederationRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.metastore.v1.UpdateFederationRequest * @instance */ - HiveMetastoreConfig.prototype.kerberosConfig = null; + UpdateFederationRequest.prototype.updateMask = null; /** - * HiveMetastoreConfig endpointProtocol. - * @member {google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol} endpointProtocol - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * UpdateFederationRequest federation. + * @member {google.cloud.metastore.v1.IFederation|null|undefined} federation + * @memberof google.cloud.metastore.v1.UpdateFederationRequest * @instance */ - HiveMetastoreConfig.prototype.endpointProtocol = 0; + UpdateFederationRequest.prototype.federation = null; /** - * HiveMetastoreConfig auxiliaryVersions. - * @member {Object.} auxiliaryVersions - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * UpdateFederationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1.UpdateFederationRequest * @instance */ - HiveMetastoreConfig.prototype.auxiliaryVersions = $util.emptyObject; + UpdateFederationRequest.prototype.requestId = ""; /** - * Creates a new HiveMetastoreConfig instance using the specified properties. + * Creates a new UpdateFederationRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1.UpdateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IHiveMetastoreConfig=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.HiveMetastoreConfig} HiveMetastoreConfig instance + * @param {google.cloud.metastore.v1.IUpdateFederationRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.UpdateFederationRequest} UpdateFederationRequest instance */ - HiveMetastoreConfig.create = function create(properties) { - return new HiveMetastoreConfig(properties); + UpdateFederationRequest.create = function create(properties) { + return new UpdateFederationRequest(properties); }; /** - * Encodes the specified HiveMetastoreConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.HiveMetastoreConfig.verify|verify} messages. + * Encodes the specified UpdateFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1.UpdateFederationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1.UpdateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IHiveMetastoreConfig} message HiveMetastoreConfig message or plain object to encode + * @param {google.cloud.metastore.v1.IUpdateFederationRequest} message UpdateFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HiveMetastoreConfig.encode = function encode(message, writer) { + UpdateFederationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.configOverrides != null && Object.hasOwnProperty.call(message, "configOverrides")) - for (var keys = Object.keys(message.configOverrides), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.configOverrides[keys[i]]).ldelim(); - if (message.kerberosConfig != null && Object.hasOwnProperty.call(message, "kerberosConfig")) - $root.google.cloud.metastore.v1alpha.KerberosConfig.encode(message.kerberosConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endpointProtocol != null && Object.hasOwnProperty.call(message, "endpointProtocol")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.endpointProtocol); - if (message.auxiliaryVersions != null && Object.hasOwnProperty.call(message, "auxiliaryVersions")) - for (var keys = Object.keys(message.auxiliaryVersions), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.encode(message.auxiliaryVersions[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.federation != null && Object.hasOwnProperty.call(message, "federation")) + $root.google.cloud.metastore.v1.Federation.encode(message.federation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified HiveMetastoreConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.HiveMetastoreConfig.verify|verify} messages. + * Encodes the specified UpdateFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.UpdateFederationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1.UpdateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IHiveMetastoreConfig} message HiveMetastoreConfig message or plain object to encode + * @param {google.cloud.metastore.v1.IUpdateFederationRequest} message UpdateFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HiveMetastoreConfig.encodeDelimited = function encodeDelimited(message, writer) { + UpdateFederationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HiveMetastoreConfig message from the specified reader or buffer. + * Decodes an UpdateFederationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1.UpdateFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.HiveMetastoreConfig} HiveMetastoreConfig + * @returns {google.cloud.metastore.v1.UpdateFederationRequest} UpdateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HiveMetastoreConfig.decode = function decode(reader, length) { + UpdateFederationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.UpdateFederationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.version = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - if (message.configOverrides === $util.emptyObject) - message.configOverrides = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.configOverrides[key] = value; + message.federation = $root.google.cloud.metastore.v1.Federation.decode(reader, reader.uint32()); break; } case 3: { - message.kerberosConfig = $root.google.cloud.metastore.v1alpha.KerberosConfig.decode(reader, reader.uint32()); - break; - } - case 4: { - message.endpointProtocol = reader.int32(); - break; - } - case 5: { - if (message.auxiliaryVersions === $util.emptyObject) - message.auxiliaryVersions = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.auxiliaryVersions[key] = value; + message.requestId = reader.string(); break; } default: @@ -13330,236 +13764,150 @@ }; /** - * Decodes a HiveMetastoreConfig message from the specified reader or buffer, length delimited. + * Decodes an UpdateFederationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1.UpdateFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.HiveMetastoreConfig} HiveMetastoreConfig + * @returns {google.cloud.metastore.v1.UpdateFederationRequest} UpdateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HiveMetastoreConfig.decodeDelimited = function decodeDelimited(reader) { + UpdateFederationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HiveMetastoreConfig message. + * Verifies an UpdateFederationRequest message. * @function verify - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1.UpdateFederationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HiveMetastoreConfig.verify = function verify(message) { + UpdateFederationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.configOverrides != null && message.hasOwnProperty("configOverrides")) { - if (!$util.isObject(message.configOverrides)) - return "configOverrides: object expected"; - var key = Object.keys(message.configOverrides); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.configOverrides[key[i]])) - return "configOverrides: string{k:string} expected"; - } - if (message.kerberosConfig != null && message.hasOwnProperty("kerberosConfig")) { - var error = $root.google.cloud.metastore.v1alpha.KerberosConfig.verify(message.kerberosConfig); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "kerberosConfig." + error; + return "updateMask." + error; } - if (message.endpointProtocol != null && message.hasOwnProperty("endpointProtocol")) - switch (message.endpointProtocol) { - default: - return "endpointProtocol: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.auxiliaryVersions != null && message.hasOwnProperty("auxiliaryVersions")) { - if (!$util.isObject(message.auxiliaryVersions)) - return "auxiliaryVersions: object expected"; - var key = Object.keys(message.auxiliaryVersions); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.verify(message.auxiliaryVersions[key[i]]); - if (error) - return "auxiliaryVersions." + error; - } + if (message.federation != null && message.hasOwnProperty("federation")) { + var error = $root.google.cloud.metastore.v1.Federation.verify(message.federation); + if (error) + return "federation." + error; } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a HiveMetastoreConfig message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFederationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1.UpdateFederationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.HiveMetastoreConfig} HiveMetastoreConfig + * @returns {google.cloud.metastore.v1.UpdateFederationRequest} UpdateFederationRequest */ - HiveMetastoreConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig) + UpdateFederationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.UpdateFederationRequest) return object; - var message = new $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig(); - if (object.version != null) - message.version = String(object.version); - if (object.configOverrides) { - if (typeof object.configOverrides !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.HiveMetastoreConfig.configOverrides: object expected"); - message.configOverrides = {}; - for (var keys = Object.keys(object.configOverrides), i = 0; i < keys.length; ++i) - message.configOverrides[keys[i]] = String(object.configOverrides[keys[i]]); - } - if (object.kerberosConfig != null) { - if (typeof object.kerberosConfig !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.HiveMetastoreConfig.kerberosConfig: object expected"); - message.kerberosConfig = $root.google.cloud.metastore.v1alpha.KerberosConfig.fromObject(object.kerberosConfig); + var message = new $root.google.cloud.metastore.v1.UpdateFederationRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.metastore.v1.UpdateFederationRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - switch (object.endpointProtocol) { - default: - if (typeof object.endpointProtocol === "number") { - message.endpointProtocol = object.endpointProtocol; - break; - } - break; - case "ENDPOINT_PROTOCOL_UNSPECIFIED": - case 0: - message.endpointProtocol = 0; - break; - case "THRIFT": - case 1: - message.endpointProtocol = 1; - break; - case "GRPC": - case 2: - message.endpointProtocol = 2; - break; - } - if (object.auxiliaryVersions) { - if (typeof object.auxiliaryVersions !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.HiveMetastoreConfig.auxiliaryVersions: object expected"); - message.auxiliaryVersions = {}; - for (var keys = Object.keys(object.auxiliaryVersions), i = 0; i < keys.length; ++i) { - if (typeof object.auxiliaryVersions[keys[i]] !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.HiveMetastoreConfig.auxiliaryVersions: object expected"); - message.auxiliaryVersions[keys[i]] = $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.fromObject(object.auxiliaryVersions[keys[i]]); - } + if (object.federation != null) { + if (typeof object.federation !== "object") + throw TypeError(".google.cloud.metastore.v1.UpdateFederationRequest.federation: object expected"); + message.federation = $root.google.cloud.metastore.v1.Federation.fromObject(object.federation); } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a HiveMetastoreConfig message. Also converts values to other types if specified. + * Creates a plain object from an UpdateFederationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1.UpdateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.HiveMetastoreConfig} message HiveMetastoreConfig + * @param {google.cloud.metastore.v1.UpdateFederationRequest} message UpdateFederationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HiveMetastoreConfig.toObject = function toObject(message, options) { + UpdateFederationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) { - object.configOverrides = {}; - object.auxiliaryVersions = {}; - } if (options.defaults) { - object.version = ""; - object.kerberosConfig = null; - object.endpointProtocol = options.enums === String ? "ENDPOINT_PROTOCOL_UNSPECIFIED" : 0; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - var keys2; - if (message.configOverrides && (keys2 = Object.keys(message.configOverrides)).length) { - object.configOverrides = {}; - for (var j = 0; j < keys2.length; ++j) - object.configOverrides[keys2[j]] = message.configOverrides[keys2[j]]; - } - if (message.kerberosConfig != null && message.hasOwnProperty("kerberosConfig")) - object.kerberosConfig = $root.google.cloud.metastore.v1alpha.KerberosConfig.toObject(message.kerberosConfig, options); - if (message.endpointProtocol != null && message.hasOwnProperty("endpointProtocol")) - object.endpointProtocol = options.enums === String ? $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol[message.endpointProtocol] === undefined ? message.endpointProtocol : $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol[message.endpointProtocol] : message.endpointProtocol; - if (message.auxiliaryVersions && (keys2 = Object.keys(message.auxiliaryVersions)).length) { - object.auxiliaryVersions = {}; - for (var j = 0; j < keys2.length; ++j) - object.auxiliaryVersions[keys2[j]] = $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.toObject(message.auxiliaryVersions[keys2[j]], options); + object.updateMask = null; + object.federation = null; + object.requestId = ""; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.federation != null && message.hasOwnProperty("federation")) + object.federation = $root.google.cloud.metastore.v1.Federation.toObject(message.federation, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this HiveMetastoreConfig to JSON. + * Converts this UpdateFederationRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1.UpdateFederationRequest * @instance * @returns {Object.} JSON object */ - HiveMetastoreConfig.prototype.toJSON = function toJSON() { + UpdateFederationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HiveMetastoreConfig + * Gets the default type url for UpdateFederationRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1.UpdateFederationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HiveMetastoreConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateFederationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.HiveMetastoreConfig"; + return typeUrlPrefix + "/google.cloud.metastore.v1.UpdateFederationRequest"; }; - /** - * EndpointProtocol enum. - * @name google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol - * @enum {number} - * @property {number} ENDPOINT_PROTOCOL_UNSPECIFIED=0 ENDPOINT_PROTOCOL_UNSPECIFIED value - * @property {number} THRIFT=1 THRIFT value - * @property {number} GRPC=2 GRPC value - */ - HiveMetastoreConfig.EndpointProtocol = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENDPOINT_PROTOCOL_UNSPECIFIED"] = 0; - values[valuesById[1] = "THRIFT"] = 1; - values[valuesById[2] = "GRPC"] = 2; - return values; - })(); - - return HiveMetastoreConfig; + return UpdateFederationRequest; })(); - v1alpha.KerberosConfig = (function() { + v1.DeleteFederationRequest = (function() { /** - * Properties of a KerberosConfig. - * @memberof google.cloud.metastore.v1alpha - * @interface IKerberosConfig - * @property {google.cloud.metastore.v1alpha.ISecret|null} [keytab] KerberosConfig keytab - * @property {string|null} [principal] KerberosConfig principal - * @property {string|null} [krb5ConfigGcsUri] KerberosConfig krb5ConfigGcsUri + * Properties of a DeleteFederationRequest. + * @memberof google.cloud.metastore.v1 + * @interface IDeleteFederationRequest + * @property {string|null} [name] DeleteFederationRequest name + * @property {string|null} [requestId] DeleteFederationRequest requestId */ /** - * Constructs a new KerberosConfig. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a KerberosConfig. - * @implements IKerberosConfig + * Constructs a new DeleteFederationRequest. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents a DeleteFederationRequest. + * @implements IDeleteFederationRequest * @constructor - * @param {google.cloud.metastore.v1alpha.IKerberosConfig=} [properties] Properties to set + * @param {google.cloud.metastore.v1.IDeleteFederationRequest=} [properties] Properties to set */ - function KerberosConfig(properties) { + function DeleteFederationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13567,103 +13915,89 @@ } /** - * KerberosConfig keytab. - * @member {google.cloud.metastore.v1alpha.ISecret|null|undefined} keytab - * @memberof google.cloud.metastore.v1alpha.KerberosConfig - * @instance - */ - KerberosConfig.prototype.keytab = null; - - /** - * KerberosConfig principal. - * @member {string} principal - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * DeleteFederationRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1.DeleteFederationRequest * @instance */ - KerberosConfig.prototype.principal = ""; + DeleteFederationRequest.prototype.name = ""; /** - * KerberosConfig krb5ConfigGcsUri. - * @member {string} krb5ConfigGcsUri - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * DeleteFederationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1.DeleteFederationRequest * @instance */ - KerberosConfig.prototype.krb5ConfigGcsUri = ""; + DeleteFederationRequest.prototype.requestId = ""; /** - * Creates a new KerberosConfig instance using the specified properties. + * Creates a new DeleteFederationRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1.DeleteFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IKerberosConfig=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.KerberosConfig} KerberosConfig instance + * @param {google.cloud.metastore.v1.IDeleteFederationRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.DeleteFederationRequest} DeleteFederationRequest instance */ - KerberosConfig.create = function create(properties) { - return new KerberosConfig(properties); + DeleteFederationRequest.create = function create(properties) { + return new DeleteFederationRequest(properties); }; /** - * Encodes the specified KerberosConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.KerberosConfig.verify|verify} messages. + * Encodes the specified DeleteFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1.DeleteFederationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1.DeleteFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IKerberosConfig} message KerberosConfig message or plain object to encode + * @param {google.cloud.metastore.v1.IDeleteFederationRequest} message DeleteFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KerberosConfig.encode = function encode(message, writer) { + DeleteFederationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keytab != null && Object.hasOwnProperty.call(message, "keytab")) - $root.google.cloud.metastore.v1alpha.Secret.encode(message.keytab, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.principal != null && Object.hasOwnProperty.call(message, "principal")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.principal); - if (message.krb5ConfigGcsUri != null && Object.hasOwnProperty.call(message, "krb5ConfigGcsUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.krb5ConfigGcsUri); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified KerberosConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.KerberosConfig.verify|verify} messages. + * Encodes the specified DeleteFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.DeleteFederationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1.DeleteFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IKerberosConfig} message KerberosConfig message or plain object to encode + * @param {google.cloud.metastore.v1.IDeleteFederationRequest} message DeleteFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KerberosConfig.encodeDelimited = function encodeDelimited(message, writer) { + DeleteFederationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a KerberosConfig message from the specified reader or buffer. + * Decodes a DeleteFederationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1.DeleteFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.KerberosConfig} KerberosConfig + * @returns {google.cloud.metastore.v1.DeleteFederationRequest} DeleteFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KerberosConfig.decode = function decode(reader, length) { + DeleteFederationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.KerberosConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.DeleteFederationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keytab = $root.google.cloud.metastore.v1alpha.Secret.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.principal = reader.string(); - break; - } - case 3: { - message.krb5ConfigGcsUri = reader.string(); + message.requestId = reader.string(); break; } default: @@ -13675,860 +14009,694 @@ }; /** - * Decodes a KerberosConfig message from the specified reader or buffer, length delimited. + * Decodes a DeleteFederationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1.DeleteFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.KerberosConfig} KerberosConfig + * @returns {google.cloud.metastore.v1.DeleteFederationRequest} DeleteFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KerberosConfig.decodeDelimited = function decodeDelimited(reader) { + DeleteFederationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a KerberosConfig message. + * Verifies a DeleteFederationRequest message. * @function verify - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1.DeleteFederationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KerberosConfig.verify = function verify(message) { + DeleteFederationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keytab != null && message.hasOwnProperty("keytab")) { - var error = $root.google.cloud.metastore.v1alpha.Secret.verify(message.keytab); - if (error) - return "keytab." + error; - } - if (message.principal != null && message.hasOwnProperty("principal")) - if (!$util.isString(message.principal)) - return "principal: string expected"; - if (message.krb5ConfigGcsUri != null && message.hasOwnProperty("krb5ConfigGcsUri")) - if (!$util.isString(message.krb5ConfigGcsUri)) - return "krb5ConfigGcsUri: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a KerberosConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFederationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1.DeleteFederationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.KerberosConfig} KerberosConfig + * @returns {google.cloud.metastore.v1.DeleteFederationRequest} DeleteFederationRequest */ - KerberosConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.KerberosConfig) + DeleteFederationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.DeleteFederationRequest) return object; - var message = new $root.google.cloud.metastore.v1alpha.KerberosConfig(); - if (object.keytab != null) { - if (typeof object.keytab !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.KerberosConfig.keytab: object expected"); - message.keytab = $root.google.cloud.metastore.v1alpha.Secret.fromObject(object.keytab); - } - if (object.principal != null) - message.principal = String(object.principal); - if (object.krb5ConfigGcsUri != null) - message.krb5ConfigGcsUri = String(object.krb5ConfigGcsUri); + var message = new $root.google.cloud.metastore.v1.DeleteFederationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a KerberosConfig message. Also converts values to other types if specified. + * Creates a plain object from a DeleteFederationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1.DeleteFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.KerberosConfig} message KerberosConfig + * @param {google.cloud.metastore.v1.DeleteFederationRequest} message DeleteFederationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KerberosConfig.toObject = function toObject(message, options) { + DeleteFederationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.keytab = null; - object.principal = ""; - object.krb5ConfigGcsUri = ""; + object.name = ""; + object.requestId = ""; } - if (message.keytab != null && message.hasOwnProperty("keytab")) - object.keytab = $root.google.cloud.metastore.v1alpha.Secret.toObject(message.keytab, options); - if (message.principal != null && message.hasOwnProperty("principal")) - object.principal = message.principal; - if (message.krb5ConfigGcsUri != null && message.hasOwnProperty("krb5ConfigGcsUri")) - object.krb5ConfigGcsUri = message.krb5ConfigGcsUri; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this KerberosConfig to JSON. + * Converts this DeleteFederationRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1.DeleteFederationRequest * @instance * @returns {Object.} JSON object */ - KerberosConfig.prototype.toJSON = function toJSON() { + DeleteFederationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for KerberosConfig + * Gets the default type url for DeleteFederationRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1.DeleteFederationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - KerberosConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteFederationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.KerberosConfig"; + return typeUrlPrefix + "/google.cloud.metastore.v1.DeleteFederationRequest"; }; - return KerberosConfig; + return DeleteFederationRequest; })(); - v1alpha.Secret = (function() { + return v1; + })(); - /** - * Properties of a Secret. - * @memberof google.cloud.metastore.v1alpha - * @interface ISecret - * @property {string|null} [cloudSecret] Secret cloudSecret - */ + metastore.v1alpha = (function() { + + /** + * Namespace v1alpha. + * @memberof google.cloud.metastore + * @namespace + */ + var v1alpha = {}; + + v1alpha.DataprocMetastore = (function() { /** - * Constructs a new Secret. + * Constructs a new DataprocMetastore service. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a Secret. - * @implements ISecret + * @classdesc Represents a DataprocMetastore + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.metastore.v1alpha.ISecret=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function Secret(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function DataprocMetastore(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * Secret cloudSecret. - * @member {string|null|undefined} cloudSecret - * @memberof google.cloud.metastore.v1alpha.Secret - * @instance - */ - Secret.prototype.cloudSecret = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Secret value. - * @member {"cloudSecret"|undefined} value - * @memberof google.cloud.metastore.v1alpha.Secret - * @instance - */ - Object.defineProperty(Secret.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["cloudSecret"]), - set: $util.oneOfSetter($oneOfFields) - }); + (DataprocMetastore.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataprocMetastore; /** - * Creates a new Secret instance using the specified properties. + * Creates new DataprocMetastore service using the specified rpc implementation. * @function create - * @memberof google.cloud.metastore.v1alpha.Secret + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore * @static - * @param {google.cloud.metastore.v1alpha.ISecret=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.Secret} Secret instance + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {DataprocMetastore} RPC service. Useful where requests and/or responses are streamed. */ - Secret.create = function create(properties) { - return new Secret(properties); + DataprocMetastore.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified Secret message. Does not implicitly {@link google.cloud.metastore.v1alpha.Secret.verify|verify} messages. - * @function encode - * @memberof google.cloud.metastore.v1alpha.Secret - * @static - * @param {google.cloud.metastore.v1alpha.ISecret} message Secret message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|listServices}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef ListServicesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1alpha.ListServicesResponse} [response] ListServicesResponse */ - Secret.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cloudSecret != null && Object.hasOwnProperty.call(message, "cloudSecret")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cloudSecret); - return writer; - }; /** - * Encodes the specified Secret message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Secret.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.Secret - * @static - * @param {google.cloud.metastore.v1alpha.ISecret} message Secret message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListServices. + * @function listServices + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IListServicesRequest} request ListServicesRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.ListServicesCallback} callback Node-style callback called with the error, if any, and ListServicesResponse + * @returns {undefined} + * @variation 1 */ - Secret.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(DataprocMetastore.prototype.listServices = function listServices(request, callback) { + return this.rpcCall(listServices, $root.google.cloud.metastore.v1alpha.ListServicesRequest, $root.google.cloud.metastore.v1alpha.ListServicesResponse, request, callback); + }, "name", { value: "ListServices" }); /** - * Decodes a Secret message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.metastore.v1alpha.Secret - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.Secret} Secret - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListServices. + * @function listServices + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IListServicesRequest} request ListServicesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Secret.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.Secret(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.cloudSecret = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a Secret message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.Secret - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.Secret} Secret - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|getService}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef GetServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1alpha.Service} [response] Service */ - Secret.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a Secret message. - * @function verify - * @memberof google.cloud.metastore.v1alpha.Secret - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetService. + * @function getService + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IGetServiceRequest} request GetServiceRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.GetServiceCallback} callback Node-style callback called with the error, if any, and Service + * @returns {undefined} + * @variation 1 */ - Secret.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.cloudSecret != null && message.hasOwnProperty("cloudSecret")) { - properties.value = 1; - if (!$util.isString(message.cloudSecret)) - return "cloudSecret: string expected"; - } - return null; - }; + Object.defineProperty(DataprocMetastore.prototype.getService = function getService(request, callback) { + return this.rpcCall(getService, $root.google.cloud.metastore.v1alpha.GetServiceRequest, $root.google.cloud.metastore.v1alpha.Service, request, callback); + }, "name", { value: "GetService" }); /** - * Creates a Secret message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.metastore.v1alpha.Secret - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.Secret} Secret + * Calls GetService. + * @function getService + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IGetServiceRequest} request GetServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Secret.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.Secret) - return object; - var message = new $root.google.cloud.metastore.v1alpha.Secret(); - if (object.cloudSecret != null) - message.cloudSecret = String(object.cloudSecret); - return message; - }; /** - * Creates a plain object from a Secret message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1alpha.Secret - * @static - * @param {google.cloud.metastore.v1alpha.Secret} message Secret - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|createService}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef CreateServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - Secret.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.cloudSecret != null && message.hasOwnProperty("cloudSecret")) { - object.cloudSecret = message.cloudSecret; - if (options.oneofs) - object.value = "cloudSecret"; - } - return object; - }; /** - * Converts this Secret to JSON. - * @function toJSON - * @memberof google.cloud.metastore.v1alpha.Secret + * Calls CreateService. + * @function createService + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore * @instance - * @returns {Object.} JSON object + * @param {google.cloud.metastore.v1alpha.ICreateServiceRequest} request CreateServiceRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.CreateServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - Secret.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(DataprocMetastore.prototype.createService = function createService(request, callback) { + return this.rpcCall(createService, $root.google.cloud.metastore.v1alpha.CreateServiceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateService" }); /** - * Gets the default type url for Secret - * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.Secret - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls CreateService. + * @function createService + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.ICreateServiceRequest} request CreateServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Secret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.Secret"; - }; - return Secret; - })(); + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|updateService}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef UpdateServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - v1alpha.EncryptionConfig = (function() { + /** + * Calls UpdateService. + * @function updateService + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IUpdateServiceRequest} request UpdateServiceRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.UpdateServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastore.prototype.updateService = function updateService(request, callback) { + return this.rpcCall(updateService, $root.google.cloud.metastore.v1alpha.UpdateServiceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateService" }); /** - * Properties of an EncryptionConfig. - * @memberof google.cloud.metastore.v1alpha - * @interface IEncryptionConfig - * @property {string|null} [kmsKey] EncryptionConfig kmsKey + * Calls UpdateService. + * @function updateService + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IUpdateServiceRequest} request UpdateServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new EncryptionConfig. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents an EncryptionConfig. - * @implements IEncryptionConfig - * @constructor - * @param {google.cloud.metastore.v1alpha.IEncryptionConfig=} [properties] Properties to set + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|deleteService}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef DeleteServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - function EncryptionConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * EncryptionConfig kmsKey. - * @member {string} kmsKey - * @memberof google.cloud.metastore.v1alpha.EncryptionConfig + * Calls DeleteService. + * @function deleteService + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore * @instance + * @param {google.cloud.metastore.v1alpha.IDeleteServiceRequest} request DeleteServiceRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.DeleteServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - EncryptionConfig.prototype.kmsKey = ""; + Object.defineProperty(DataprocMetastore.prototype.deleteService = function deleteService(request, callback) { + return this.rpcCall(deleteService, $root.google.cloud.metastore.v1alpha.DeleteServiceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteService" }); /** - * Creates a new EncryptionConfig instance using the specified properties. - * @function create - * @memberof google.cloud.metastore.v1alpha.EncryptionConfig - * @static - * @param {google.cloud.metastore.v1alpha.IEncryptionConfig=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.EncryptionConfig} EncryptionConfig instance + * Calls DeleteService. + * @function deleteService + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IDeleteServiceRequest} request DeleteServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - EncryptionConfig.create = function create(properties) { - return new EncryptionConfig(properties); - }; /** - * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.EncryptionConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.metastore.v1alpha.EncryptionConfig - * @static - * @param {google.cloud.metastore.v1alpha.IEncryptionConfig} message EncryptionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|listMetadataImports}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef ListMetadataImportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1alpha.ListMetadataImportsResponse} [response] ListMetadataImportsResponse */ - EncryptionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKey); - return writer; - }; /** - * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.EncryptionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.EncryptionConfig - * @static - * @param {google.cloud.metastore.v1alpha.IEncryptionConfig} message EncryptionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListMetadataImports. + * @function listMetadataImports + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IListMetadataImportsRequest} request ListMetadataImportsRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImportsCallback} callback Node-style callback called with the error, if any, and ListMetadataImportsResponse + * @returns {undefined} + * @variation 1 */ - EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(DataprocMetastore.prototype.listMetadataImports = function listMetadataImports(request, callback) { + return this.rpcCall(listMetadataImports, $root.google.cloud.metastore.v1alpha.ListMetadataImportsRequest, $root.google.cloud.metastore.v1alpha.ListMetadataImportsResponse, request, callback); + }, "name", { value: "ListMetadataImports" }); /** - * Decodes an EncryptionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.metastore.v1alpha.EncryptionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.EncryptionConfig} EncryptionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListMetadataImports. + * @function listMetadataImports + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IListMetadataImportsRequest} request ListMetadataImportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - EncryptionConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.EncryptionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kmsKey = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.EncryptionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.EncryptionConfig} EncryptionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|getMetadataImport}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef GetMetadataImportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1alpha.MetadataImport} [response] MetadataImport */ - EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies an EncryptionConfig message. - * @function verify - * @memberof google.cloud.metastore.v1alpha.EncryptionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetMetadataImport. + * @function getMetadataImport + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IGetMetadataImportRequest} request GetMetadataImportRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.GetMetadataImportCallback} callback Node-style callback called with the error, if any, and MetadataImport + * @returns {undefined} + * @variation 1 */ - EncryptionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) - if (!$util.isString(message.kmsKey)) - return "kmsKey: string expected"; - return null; - }; + Object.defineProperty(DataprocMetastore.prototype.getMetadataImport = function getMetadataImport(request, callback) { + return this.rpcCall(getMetadataImport, $root.google.cloud.metastore.v1alpha.GetMetadataImportRequest, $root.google.cloud.metastore.v1alpha.MetadataImport, request, callback); + }, "name", { value: "GetMetadataImport" }); /** - * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.metastore.v1alpha.EncryptionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.EncryptionConfig} EncryptionConfig + * Calls GetMetadataImport. + * @function getMetadataImport + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IGetMetadataImportRequest} request GetMetadataImportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - EncryptionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.EncryptionConfig) - return object; - var message = new $root.google.cloud.metastore.v1alpha.EncryptionConfig(); - if (object.kmsKey != null) - message.kmsKey = String(object.kmsKey); - return message; - }; /** - * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1alpha.EncryptionConfig - * @static - * @param {google.cloud.metastore.v1alpha.EncryptionConfig} message EncryptionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|createMetadataImport}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef CreateMetadataImportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - EncryptionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.kmsKey = ""; - if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) - object.kmsKey = message.kmsKey; - return object; - }; /** - * Converts this EncryptionConfig to JSON. - * @function toJSON - * @memberof google.cloud.metastore.v1alpha.EncryptionConfig + * Calls CreateMetadataImport. + * @function createMetadataImport + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore * @instance - * @returns {Object.} JSON object + * @param {google.cloud.metastore.v1alpha.ICreateMetadataImportRequest} request CreateMetadataImportRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.CreateMetadataImportCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - EncryptionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(DataprocMetastore.prototype.createMetadataImport = function createMetadataImport(request, callback) { + return this.rpcCall(createMetadataImport, $root.google.cloud.metastore.v1alpha.CreateMetadataImportRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateMetadataImport" }); /** - * Gets the default type url for EncryptionConfig - * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.EncryptionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls CreateMetadataImport. + * @function createMetadataImport + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.ICreateMetadataImportRequest} request CreateMetadataImportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.EncryptionConfig"; - }; - - return EncryptionConfig; - })(); - - v1alpha.AuxiliaryVersionConfig = (function() { /** - * Properties of an AuxiliaryVersionConfig. - * @memberof google.cloud.metastore.v1alpha - * @interface IAuxiliaryVersionConfig - * @property {string|null} [version] AuxiliaryVersionConfig version - * @property {Object.|null} [configOverrides] AuxiliaryVersionConfig configOverrides - * @property {google.cloud.metastore.v1alpha.INetworkConfig|null} [networkConfig] AuxiliaryVersionConfig networkConfig + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|updateMetadataImport}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef UpdateMetadataImportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ /** - * Constructs a new AuxiliaryVersionConfig. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents an AuxiliaryVersionConfig. - * @implements IAuxiliaryVersionConfig - * @constructor - * @param {google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig=} [properties] Properties to set + * Calls UpdateMetadataImport. + * @function updateMetadataImport + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest} request UpdateMetadataImportRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.UpdateMetadataImportCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - function AuxiliaryVersionConfig(properties) { - this.configOverrides = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(DataprocMetastore.prototype.updateMetadataImport = function updateMetadataImport(request, callback) { + return this.rpcCall(updateMetadataImport, $root.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateMetadataImport" }); /** - * AuxiliaryVersionConfig version. - * @member {string} version - * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * Calls UpdateMetadataImport. + * @function updateMetadataImport + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore * @instance + * @param {google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest} request UpdateMetadataImportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AuxiliaryVersionConfig.prototype.version = ""; /** - * AuxiliaryVersionConfig configOverrides. - * @member {Object.} configOverrides - * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|exportMetadata}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef ExportMetadataCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportMetadata. + * @function exportMetadata + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore * @instance + * @param {google.cloud.metastore.v1alpha.IExportMetadataRequest} request ExportMetadataRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.ExportMetadataCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - AuxiliaryVersionConfig.prototype.configOverrides = $util.emptyObject; + Object.defineProperty(DataprocMetastore.prototype.exportMetadata = function exportMetadata(request, callback) { + return this.rpcCall(exportMetadata, $root.google.cloud.metastore.v1alpha.ExportMetadataRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportMetadata" }); /** - * AuxiliaryVersionConfig networkConfig. - * @member {google.cloud.metastore.v1alpha.INetworkConfig|null|undefined} networkConfig - * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * Calls ExportMetadata. + * @function exportMetadata + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore * @instance + * @param {google.cloud.metastore.v1alpha.IExportMetadataRequest} request ExportMetadataRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AuxiliaryVersionConfig.prototype.networkConfig = null; /** - * Creates a new AuxiliaryVersionConfig instance using the specified properties. - * @function create - * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig - * @static - * @param {google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} AuxiliaryVersionConfig instance + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|restoreService}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef RestoreServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - AuxiliaryVersionConfig.create = function create(properties) { - return new AuxiliaryVersionConfig(properties); - }; /** - * Encodes the specified AuxiliaryVersionConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig - * @static - * @param {google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig} message AuxiliaryVersionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls RestoreService. + * @function restoreService + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IRestoreServiceRequest} request RestoreServiceRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.RestoreServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - AuxiliaryVersionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.configOverrides != null && Object.hasOwnProperty.call(message, "configOverrides")) - for (var keys = Object.keys(message.configOverrides), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.configOverrides[keys[i]]).ldelim(); - if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) - $root.google.cloud.metastore.v1alpha.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + Object.defineProperty(DataprocMetastore.prototype.restoreService = function restoreService(request, callback) { + return this.rpcCall(restoreService, $root.google.cloud.metastore.v1alpha.RestoreServiceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RestoreService" }); /** - * Encodes the specified AuxiliaryVersionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig - * @static - * @param {google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig} message AuxiliaryVersionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls RestoreService. + * @function restoreService + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IRestoreServiceRequest} request RestoreServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AuxiliaryVersionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} AuxiliaryVersionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|listBackups}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef ListBackupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1alpha.ListBackupsResponse} [response] ListBackupsResponse */ - AuxiliaryVersionConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - if (message.configOverrides === $util.emptyObject) - message.configOverrides = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.configOverrides[key] = value; - break; - } - case 3: { - message.networkConfig = $root.google.cloud.metastore.v1alpha.NetworkConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} AuxiliaryVersionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListBackups. + * @function listBackups + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IListBackupsRequest} request ListBackupsRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.ListBackupsCallback} callback Node-style callback called with the error, if any, and ListBackupsResponse + * @returns {undefined} + * @variation 1 */ - AuxiliaryVersionConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(DataprocMetastore.prototype.listBackups = function listBackups(request, callback) { + return this.rpcCall(listBackups, $root.google.cloud.metastore.v1alpha.ListBackupsRequest, $root.google.cloud.metastore.v1alpha.ListBackupsResponse, request, callback); + }, "name", { value: "ListBackups" }); /** - * Verifies an AuxiliaryVersionConfig message. - * @function verify - * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListBackups. + * @function listBackups + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IListBackupsRequest} request ListBackupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AuxiliaryVersionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.configOverrides != null && message.hasOwnProperty("configOverrides")) { - if (!$util.isObject(message.configOverrides)) - return "configOverrides: object expected"; - var key = Object.keys(message.configOverrides); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.configOverrides[key[i]])) - return "configOverrides: string{k:string} expected"; - } - if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { - var error = $root.google.cloud.metastore.v1alpha.NetworkConfig.verify(message.networkConfig); - if (error) - return "networkConfig." + error; - } - return null; - }; /** - * Creates an AuxiliaryVersionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} AuxiliaryVersionConfig + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|getBackup}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef GetBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1alpha.Backup} [response] Backup */ - AuxiliaryVersionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) - return object; - var message = new $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig(); - if (object.version != null) - message.version = String(object.version); - if (object.configOverrides) { - if (typeof object.configOverrides !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.configOverrides: object expected"); - message.configOverrides = {}; - for (var keys = Object.keys(object.configOverrides), i = 0; i < keys.length; ++i) - message.configOverrides[keys[i]] = String(object.configOverrides[keys[i]]); - } - if (object.networkConfig != null) { - if (typeof object.networkConfig !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.networkConfig: object expected"); - message.networkConfig = $root.google.cloud.metastore.v1alpha.NetworkConfig.fromObject(object.networkConfig); - } - return message; - }; /** - * Creates a plain object from an AuxiliaryVersionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig - * @static - * @param {google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} message AuxiliaryVersionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls GetBackup. + * @function getBackup + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IGetBackupRequest} request GetBackupRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.GetBackupCallback} callback Node-style callback called with the error, if any, and Backup + * @returns {undefined} + * @variation 1 */ - AuxiliaryVersionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.configOverrides = {}; - if (options.defaults) { - object.version = ""; - object.networkConfig = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - var keys2; - if (message.configOverrides && (keys2 = Object.keys(message.configOverrides)).length) { - object.configOverrides = {}; - for (var j = 0; j < keys2.length; ++j) - object.configOverrides[keys2[j]] = message.configOverrides[keys2[j]]; - } - if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) - object.networkConfig = $root.google.cloud.metastore.v1alpha.NetworkConfig.toObject(message.networkConfig, options); - return object; - }; + Object.defineProperty(DataprocMetastore.prototype.getBackup = function getBackup(request, callback) { + return this.rpcCall(getBackup, $root.google.cloud.metastore.v1alpha.GetBackupRequest, $root.google.cloud.metastore.v1alpha.Backup, request, callback); + }, "name", { value: "GetBackup" }); /** - * Converts this AuxiliaryVersionConfig to JSON. - * @function toJSON - * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * Calls GetBackup. + * @function getBackup + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore * @instance - * @returns {Object.} JSON object + * @param {google.cloud.metastore.v1alpha.IGetBackupRequest} request GetBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AuxiliaryVersionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for AuxiliaryVersionConfig - * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|createBackup}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef CreateBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - AuxiliaryVersionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.AuxiliaryVersionConfig"; - }; - return AuxiliaryVersionConfig; + /** + * Calls CreateBackup. + * @function createBackup + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.ICreateBackupRequest} request CreateBackupRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.CreateBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastore.prototype.createBackup = function createBackup(request, callback) { + return this.rpcCall(createBackup, $root.google.cloud.metastore.v1alpha.CreateBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackup" }); + + /** + * Calls CreateBackup. + * @function createBackup + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.ICreateBackupRequest} request CreateBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastore|deleteBackup}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @typedef DeleteBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastore.DeleteBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastore.prototype.deleteBackup = function deleteBackup(request, callback) { + return this.rpcCall(deleteBackup, $root.google.cloud.metastore.v1alpha.DeleteBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackup" }); + + /** + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.cloud.metastore.v1alpha.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1alpha.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataprocMetastore; })(); - v1alpha.NetworkConfig = (function() { + v1alpha.Service = (function() { /** - * Properties of a NetworkConfig. + * Properties of a Service. * @memberof google.cloud.metastore.v1alpha - * @interface INetworkConfig - * @property {Array.|null} [consumers] NetworkConfig consumers + * @interface IService + * @property {google.cloud.metastore.v1alpha.IHiveMetastoreConfig|null} [hiveMetastoreConfig] Service hiveMetastoreConfig + * @property {string|null} [name] Service name + * @property {google.protobuf.ITimestamp|null} [createTime] Service createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Service updateTime + * @property {Object.|null} [labels] Service labels + * @property {string|null} [network] Service network + * @property {string|null} [endpointUri] Service endpointUri + * @property {number|null} [port] Service port + * @property {google.cloud.metastore.v1alpha.Service.State|null} [state] Service state + * @property {string|null} [stateMessage] Service stateMessage + * @property {string|null} [artifactGcsUri] Service artifactGcsUri + * @property {google.cloud.metastore.v1alpha.Service.Tier|null} [tier] Service tier + * @property {google.cloud.metastore.v1alpha.IMetadataIntegration|null} [metadataIntegration] Service metadataIntegration + * @property {google.cloud.metastore.v1alpha.IMaintenanceWindow|null} [maintenanceWindow] Service maintenanceWindow + * @property {string|null} [uid] Service uid + * @property {google.cloud.metastore.v1alpha.IMetadataManagementActivity|null} [metadataManagementActivity] Service metadataManagementActivity + * @property {google.cloud.metastore.v1alpha.Service.ReleaseChannel|null} [releaseChannel] Service releaseChannel + * @property {google.cloud.metastore.v1alpha.IEncryptionConfig|null} [encryptionConfig] Service encryptionConfig + * @property {google.cloud.metastore.v1alpha.INetworkConfig|null} [networkConfig] Service networkConfig + * @property {google.cloud.metastore.v1alpha.Service.DatabaseType|null} [databaseType] Service databaseType + * @property {google.cloud.metastore.v1alpha.ITelemetryConfig|null} [telemetryConfig] Service telemetryConfig */ /** - * Constructs a new NetworkConfig. + * Constructs a new Service. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a NetworkConfig. - * @implements INetworkConfig + * @classdesc Represents a Service. + * @implements IService * @constructor - * @param {google.cloud.metastore.v1alpha.INetworkConfig=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.IService=} [properties] Properties to set */ - function NetworkConfig(properties) { - this.consumers = []; + function Service(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14536,470 +14704,11292 @@ } /** - * NetworkConfig consumers. - * @member {Array.} consumers - * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * Service hiveMetastoreConfig. + * @member {google.cloud.metastore.v1alpha.IHiveMetastoreConfig|null|undefined} hiveMetastoreConfig + * @memberof google.cloud.metastore.v1alpha.Service * @instance */ - NetworkConfig.prototype.consumers = $util.emptyArray; + Service.prototype.hiveMetastoreConfig = null; /** - * Creates a new NetworkConfig instance using the specified properties. + * Service name. + * @member {string} name + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.name = ""; + + /** + * Service createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.createTime = null; + + /** + * Service updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.updateTime = null; + + /** + * Service labels. + * @member {Object.} labels + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.labels = $util.emptyObject; + + /** + * Service network. + * @member {string} network + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.network = ""; + + /** + * Service endpointUri. + * @member {string} endpointUri + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.endpointUri = ""; + + /** + * Service port. + * @member {number} port + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.port = 0; + + /** + * Service state. + * @member {google.cloud.metastore.v1alpha.Service.State} state + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.state = 0; + + /** + * Service stateMessage. + * @member {string} stateMessage + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.stateMessage = ""; + + /** + * Service artifactGcsUri. + * @member {string} artifactGcsUri + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.artifactGcsUri = ""; + + /** + * Service tier. + * @member {google.cloud.metastore.v1alpha.Service.Tier} tier + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.tier = 0; + + /** + * Service metadataIntegration. + * @member {google.cloud.metastore.v1alpha.IMetadataIntegration|null|undefined} metadataIntegration + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.metadataIntegration = null; + + /** + * Service maintenanceWindow. + * @member {google.cloud.metastore.v1alpha.IMaintenanceWindow|null|undefined} maintenanceWindow + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.maintenanceWindow = null; + + /** + * Service uid. + * @member {string} uid + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.uid = ""; + + /** + * Service metadataManagementActivity. + * @member {google.cloud.metastore.v1alpha.IMetadataManagementActivity|null|undefined} metadataManagementActivity + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.metadataManagementActivity = null; + + /** + * Service releaseChannel. + * @member {google.cloud.metastore.v1alpha.Service.ReleaseChannel} releaseChannel + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.releaseChannel = 0; + + /** + * Service encryptionConfig. + * @member {google.cloud.metastore.v1alpha.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.encryptionConfig = null; + + /** + * Service networkConfig. + * @member {google.cloud.metastore.v1alpha.INetworkConfig|null|undefined} networkConfig + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.networkConfig = null; + + /** + * Service databaseType. + * @member {google.cloud.metastore.v1alpha.Service.DatabaseType} databaseType + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.databaseType = 0; + + /** + * Service telemetryConfig. + * @member {google.cloud.metastore.v1alpha.ITelemetryConfig|null|undefined} telemetryConfig + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.telemetryConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Service metastoreConfig. + * @member {"hiveMetastoreConfig"|undefined} metastoreConfig + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Object.defineProperty(Service.prototype, "metastoreConfig", { + get: $util.oneOfGetter($oneOfFields = ["hiveMetastoreConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Service instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @memberof google.cloud.metastore.v1alpha.Service * @static - * @param {google.cloud.metastore.v1alpha.INetworkConfig=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.NetworkConfig} NetworkConfig instance + * @param {google.cloud.metastore.v1alpha.IService=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.Service} Service instance */ - NetworkConfig.create = function create(properties) { - return new NetworkConfig(properties); + Service.create = function create(properties) { + return new Service(properties); }; /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.verify|verify} messages. + * Encodes the specified Service message. Does not implicitly {@link google.cloud.metastore.v1alpha.Service.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @memberof google.cloud.metastore.v1alpha.Service * @static - * @param {google.cloud.metastore.v1alpha.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IService} message Service message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NetworkConfig.encode = function encode(message, writer) { + Service.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.consumers != null && message.consumers.length) - for (var i = 0; i < message.consumers.length; ++i) - $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.encode(message.consumers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.hiveMetastoreConfig != null && Object.hasOwnProperty.call(message, "hiveMetastoreConfig")) + $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig.encode(message.hiveMetastoreConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.network); + if (message.endpointUri != null && Object.hasOwnProperty.call(message, "endpointUri")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.endpointUri); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.port); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); + if (message.stateMessage != null && Object.hasOwnProperty.call(message, "stateMessage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.stateMessage); + if (message.artifactGcsUri != null && Object.hasOwnProperty.call(message, "artifactGcsUri")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.artifactGcsUri); + if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.tier); + if (message.metadataIntegration != null && Object.hasOwnProperty.call(message, "metadataIntegration")) + $root.google.cloud.metastore.v1alpha.MetadataIntegration.encode(message.metadataIntegration, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.maintenanceWindow != null && Object.hasOwnProperty.call(message, "maintenanceWindow")) + $root.google.cloud.metastore.v1alpha.MaintenanceWindow.encode(message.maintenanceWindow, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.uid); + if (message.metadataManagementActivity != null && Object.hasOwnProperty.call(message, "metadataManagementActivity")) + $root.google.cloud.metastore.v1alpha.MetadataManagementActivity.encode(message.metadataManagementActivity, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.releaseChannel); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + $root.google.cloud.metastore.v1alpha.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) + $root.google.cloud.metastore.v1alpha.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.databaseType != null && Object.hasOwnProperty.call(message, "databaseType")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.databaseType); + if (message.telemetryConfig != null && Object.hasOwnProperty.call(message, "telemetryConfig")) + $root.google.cloud.metastore.v1alpha.TelemetryConfig.encode(message.telemetryConfig, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); return writer; }; /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.verify|verify} messages. + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Service.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @memberof google.cloud.metastore.v1alpha.Service * @static - * @param {google.cloud.metastore.v1alpha.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IService} message Service message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + Service.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NetworkConfig message from the specified reader or buffer. + * Decodes a Service message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @memberof google.cloud.metastore.v1alpha.Service * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.NetworkConfig} NetworkConfig + * @returns {google.cloud.metastore.v1alpha.Service} Service * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NetworkConfig.decode = function decode(reader, length) { + Service.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.NetworkConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.Service(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 5: { + message.hiveMetastoreConfig = $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig.decode(reader, reader.uint32()); + break; + } case 1: { - if (!(message.consumers && message.consumers.length)) - message.consumers = []; - message.consumers.push($root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.decode(reader, reader.uint32())); + message.name = reader.string(); break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkConfig message. - * @function verify - * @memberof google.cloud.metastore.v1alpha.NetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consumers != null && message.hasOwnProperty("consumers")) { - if (!Array.isArray(message.consumers)) - return "consumers: array expected"; - for (var i = 0; i < message.consumers.length; ++i) { - var error = $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.verify(message.consumers[i]); - if (error) - return "consumers." + error; - } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 7: { + message.network = reader.string(); + break; + } + case 8: { + message.endpointUri = reader.string(); + break; + } + case 9: { + message.port = reader.int32(); + break; + } + case 10: { + message.state = reader.int32(); + break; + } + case 11: { + message.stateMessage = reader.string(); + break; + } + case 12: { + message.artifactGcsUri = reader.string(); + break; + } + case 13: { + message.tier = reader.int32(); + break; + } + case 14: { + message.metadataIntegration = $root.google.cloud.metastore.v1alpha.MetadataIntegration.decode(reader, reader.uint32()); + break; + } + case 15: { + message.maintenanceWindow = $root.google.cloud.metastore.v1alpha.MaintenanceWindow.decode(reader, reader.uint32()); + break; + } + case 16: { + message.uid = reader.string(); + break; + } + case 17: { + message.metadataManagementActivity = $root.google.cloud.metastore.v1alpha.MetadataManagementActivity.decode(reader, reader.uint32()); + break; + } + case 19: { + message.releaseChannel = reader.int32(); + break; + } + case 20: { + message.encryptionConfig = $root.google.cloud.metastore.v1alpha.EncryptionConfig.decode(reader, reader.uint32()); + break; + } + case 21: { + message.networkConfig = $root.google.cloud.metastore.v1alpha.NetworkConfig.decode(reader, reader.uint32()); + break; + } + case 22: { + message.databaseType = reader.int32(); + break; + } + case 23: { + message.telemetryConfig = $root.google.cloud.metastore.v1alpha.TelemetryConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Service message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.Service + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.Service} Service + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Service.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Service message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.Service + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Service.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.hiveMetastoreConfig != null && message.hasOwnProperty("hiveMetastoreConfig")) { + properties.metastoreConfig = 1; + { + var error = $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig.verify(message.hiveMetastoreConfig); + if (error) + return "hiveMetastoreConfig." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + if (!$util.isString(message.endpointUri)) + return "endpointUri: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) + if (!$util.isString(message.stateMessage)) + return "stateMessage: string expected"; + if (message.artifactGcsUri != null && message.hasOwnProperty("artifactGcsUri")) + if (!$util.isString(message.artifactGcsUri)) + return "artifactGcsUri: string expected"; + if (message.tier != null && message.hasOwnProperty("tier")) + switch (message.tier) { + default: + return "tier: enum value expected"; + case 0: + case 1: + case 3: + break; + } + if (message.metadataIntegration != null && message.hasOwnProperty("metadataIntegration")) { + var error = $root.google.cloud.metastore.v1alpha.MetadataIntegration.verify(message.metadataIntegration); + if (error) + return "metadataIntegration." + error; + } + if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) { + var error = $root.google.cloud.metastore.v1alpha.MaintenanceWindow.verify(message.maintenanceWindow); + if (error) + return "maintenanceWindow." + error; + } + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.metadataManagementActivity != null && message.hasOwnProperty("metadataManagementActivity")) { + var error = $root.google.cloud.metastore.v1alpha.MetadataManagementActivity.verify(message.metadataManagementActivity); + if (error) + return "metadataManagementActivity." + error; + } + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) + switch (message.releaseChannel) { + default: + return "releaseChannel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + var error = $root.google.cloud.metastore.v1alpha.EncryptionConfig.verify(message.encryptionConfig); + if (error) + return "encryptionConfig." + error; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { + var error = $root.google.cloud.metastore.v1alpha.NetworkConfig.verify(message.networkConfig); + if (error) + return "networkConfig." + error; + } + if (message.databaseType != null && message.hasOwnProperty("databaseType")) + switch (message.databaseType) { + default: + return "databaseType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.telemetryConfig != null && message.hasOwnProperty("telemetryConfig")) { + var error = $root.google.cloud.metastore.v1alpha.TelemetryConfig.verify(message.telemetryConfig); + if (error) + return "telemetryConfig." + error; + } + return null; + }; + + /** + * Creates a Service message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.Service + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.Service} Service + */ + Service.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.Service) + return object; + var message = new $root.google.cloud.metastore.v1alpha.Service(); + if (object.hiveMetastoreConfig != null) { + if (typeof object.hiveMetastoreConfig !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Service.hiveMetastoreConfig: object expected"); + message.hiveMetastoreConfig = $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig.fromObject(object.hiveMetastoreConfig); + } + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Service.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Service.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Service.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.network != null) + message.network = String(object.network); + if (object.endpointUri != null) + message.endpointUri = String(object.endpointUri); + if (object.port != null) + message.port = object.port | 0; + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "SUSPENDING": + case 3: + message.state = 3; + break; + case "SUSPENDED": + case 4: + message.state = 4; + break; + case "UPDATING": + case 5: + message.state = 5; + break; + case "DELETING": + case 6: + message.state = 6; + break; + case "ERROR": + case 7: + message.state = 7; + break; + } + if (object.stateMessage != null) + message.stateMessage = String(object.stateMessage); + if (object.artifactGcsUri != null) + message.artifactGcsUri = String(object.artifactGcsUri); + switch (object.tier) { + default: + if (typeof object.tier === "number") { + message.tier = object.tier; + break; + } + break; + case "TIER_UNSPECIFIED": + case 0: + message.tier = 0; + break; + case "DEVELOPER": + case 1: + message.tier = 1; + break; + case "ENTERPRISE": + case 3: + message.tier = 3; + break; + } + if (object.metadataIntegration != null) { + if (typeof object.metadataIntegration !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Service.metadataIntegration: object expected"); + message.metadataIntegration = $root.google.cloud.metastore.v1alpha.MetadataIntegration.fromObject(object.metadataIntegration); + } + if (object.maintenanceWindow != null) { + if (typeof object.maintenanceWindow !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Service.maintenanceWindow: object expected"); + message.maintenanceWindow = $root.google.cloud.metastore.v1alpha.MaintenanceWindow.fromObject(object.maintenanceWindow); + } + if (object.uid != null) + message.uid = String(object.uid); + if (object.metadataManagementActivity != null) { + if (typeof object.metadataManagementActivity !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Service.metadataManagementActivity: object expected"); + message.metadataManagementActivity = $root.google.cloud.metastore.v1alpha.MetadataManagementActivity.fromObject(object.metadataManagementActivity); + } + switch (object.releaseChannel) { + default: + if (typeof object.releaseChannel === "number") { + message.releaseChannel = object.releaseChannel; + break; + } + break; + case "RELEASE_CHANNEL_UNSPECIFIED": + case 0: + message.releaseChannel = 0; + break; + case "CANARY": + case 1: + message.releaseChannel = 1; + break; + case "STABLE": + case 2: + message.releaseChannel = 2; + break; + } + if (object.encryptionConfig != null) { + if (typeof object.encryptionConfig !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Service.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.cloud.metastore.v1alpha.EncryptionConfig.fromObject(object.encryptionConfig); + } + if (object.networkConfig != null) { + if (typeof object.networkConfig !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Service.networkConfig: object expected"); + message.networkConfig = $root.google.cloud.metastore.v1alpha.NetworkConfig.fromObject(object.networkConfig); + } + switch (object.databaseType) { + default: + if (typeof object.databaseType === "number") { + message.databaseType = object.databaseType; + break; + } + break; + case "DATABASE_TYPE_UNSPECIFIED": + case 0: + message.databaseType = 0; + break; + case "MYSQL": + case 1: + message.databaseType = 1; + break; + case "SPANNER": + case 2: + message.databaseType = 2; + break; + } + if (object.telemetryConfig != null) { + if (typeof object.telemetryConfig !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Service.telemetryConfig: object expected"); + message.telemetryConfig = $root.google.cloud.metastore.v1alpha.TelemetryConfig.fromObject(object.telemetryConfig); + } + return message; + }; + + /** + * Creates a plain object from a Service message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.Service + * @static + * @param {google.cloud.metastore.v1alpha.Service} message Service + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Service.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.network = ""; + object.endpointUri = ""; + object.port = 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateMessage = ""; + object.artifactGcsUri = ""; + object.tier = options.enums === String ? "TIER_UNSPECIFIED" : 0; + object.metadataIntegration = null; + object.maintenanceWindow = null; + object.uid = ""; + object.metadataManagementActivity = null; + object.releaseChannel = options.enums === String ? "RELEASE_CHANNEL_UNSPECIFIED" : 0; + object.encryptionConfig = null; + object.networkConfig = null; + object.databaseType = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; + object.telemetryConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.hiveMetastoreConfig != null && message.hasOwnProperty("hiveMetastoreConfig")) { + object.hiveMetastoreConfig = $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig.toObject(message.hiveMetastoreConfig, options); + if (options.oneofs) + object.metastoreConfig = "hiveMetastoreConfig"; + } + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + object.endpointUri = message.endpointUri; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1alpha.Service.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1alpha.Service.State[message.state] : message.state; + if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) + object.stateMessage = message.stateMessage; + if (message.artifactGcsUri != null && message.hasOwnProperty("artifactGcsUri")) + object.artifactGcsUri = message.artifactGcsUri; + if (message.tier != null && message.hasOwnProperty("tier")) + object.tier = options.enums === String ? $root.google.cloud.metastore.v1alpha.Service.Tier[message.tier] === undefined ? message.tier : $root.google.cloud.metastore.v1alpha.Service.Tier[message.tier] : message.tier; + if (message.metadataIntegration != null && message.hasOwnProperty("metadataIntegration")) + object.metadataIntegration = $root.google.cloud.metastore.v1alpha.MetadataIntegration.toObject(message.metadataIntegration, options); + if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) + object.maintenanceWindow = $root.google.cloud.metastore.v1alpha.MaintenanceWindow.toObject(message.maintenanceWindow, options); + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.metadataManagementActivity != null && message.hasOwnProperty("metadataManagementActivity")) + object.metadataManagementActivity = $root.google.cloud.metastore.v1alpha.MetadataManagementActivity.toObject(message.metadataManagementActivity, options); + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) + object.releaseChannel = options.enums === String ? $root.google.cloud.metastore.v1alpha.Service.ReleaseChannel[message.releaseChannel] === undefined ? message.releaseChannel : $root.google.cloud.metastore.v1alpha.Service.ReleaseChannel[message.releaseChannel] : message.releaseChannel; + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) + object.encryptionConfig = $root.google.cloud.metastore.v1alpha.EncryptionConfig.toObject(message.encryptionConfig, options); + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) + object.networkConfig = $root.google.cloud.metastore.v1alpha.NetworkConfig.toObject(message.networkConfig, options); + if (message.databaseType != null && message.hasOwnProperty("databaseType")) + object.databaseType = options.enums === String ? $root.google.cloud.metastore.v1alpha.Service.DatabaseType[message.databaseType] === undefined ? message.databaseType : $root.google.cloud.metastore.v1alpha.Service.DatabaseType[message.databaseType] : message.databaseType; + if (message.telemetryConfig != null && message.hasOwnProperty("telemetryConfig")) + object.telemetryConfig = $root.google.cloud.metastore.v1alpha.TelemetryConfig.toObject(message.telemetryConfig, options); + return object; + }; + + /** + * Converts this Service to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + * @returns {Object.} JSON object + */ + Service.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Service + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.Service + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Service.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.Service"; + }; + + /** + * State enum. + * @name google.cloud.metastore.v1alpha.Service.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} SUSPENDING=3 SUSPENDING value + * @property {number} SUSPENDED=4 SUSPENDED value + * @property {number} UPDATING=5 UPDATING value + * @property {number} DELETING=6 DELETING value + * @property {number} ERROR=7 ERROR value + */ + Service.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "SUSPENDING"] = 3; + values[valuesById[4] = "SUSPENDED"] = 4; + values[valuesById[5] = "UPDATING"] = 5; + values[valuesById[6] = "DELETING"] = 6; + values[valuesById[7] = "ERROR"] = 7; + return values; + })(); + + /** + * Tier enum. + * @name google.cloud.metastore.v1alpha.Service.Tier + * @enum {number} + * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value + * @property {number} DEVELOPER=1 DEVELOPER value + * @property {number} ENTERPRISE=3 ENTERPRISE value + */ + Service.Tier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEVELOPER"] = 1; + values[valuesById[3] = "ENTERPRISE"] = 3; + return values; + })(); + + /** + * ReleaseChannel enum. + * @name google.cloud.metastore.v1alpha.Service.ReleaseChannel + * @enum {number} + * @property {number} RELEASE_CHANNEL_UNSPECIFIED=0 RELEASE_CHANNEL_UNSPECIFIED value + * @property {number} CANARY=1 CANARY value + * @property {number} STABLE=2 STABLE value + */ + Service.ReleaseChannel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RELEASE_CHANNEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "CANARY"] = 1; + values[valuesById[2] = "STABLE"] = 2; + return values; + })(); + + /** + * DatabaseType enum. + * @name google.cloud.metastore.v1alpha.Service.DatabaseType + * @enum {number} + * @property {number} DATABASE_TYPE_UNSPECIFIED=0 DATABASE_TYPE_UNSPECIFIED value + * @property {number} MYSQL=1 MYSQL value + * @property {number} SPANNER=2 SPANNER value + */ + Service.DatabaseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MYSQL"] = 1; + values[valuesById[2] = "SPANNER"] = 2; + return values; + })(); + + return Service; + })(); + + v1alpha.MetadataIntegration = (function() { + + /** + * Properties of a MetadataIntegration. + * @memberof google.cloud.metastore.v1alpha + * @interface IMetadataIntegration + * @property {google.cloud.metastore.v1alpha.IDataCatalogConfig|null} [dataCatalogConfig] MetadataIntegration dataCatalogConfig + * @property {google.cloud.metastore.v1alpha.IDataplexConfig|null} [dataplexConfig] MetadataIntegration dataplexConfig + */ + + /** + * Constructs a new MetadataIntegration. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a MetadataIntegration. + * @implements IMetadataIntegration + * @constructor + * @param {google.cloud.metastore.v1alpha.IMetadataIntegration=} [properties] Properties to set + */ + function MetadataIntegration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetadataIntegration dataCatalogConfig. + * @member {google.cloud.metastore.v1alpha.IDataCatalogConfig|null|undefined} dataCatalogConfig + * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @instance + */ + MetadataIntegration.prototype.dataCatalogConfig = null; + + /** + * MetadataIntegration dataplexConfig. + * @member {google.cloud.metastore.v1alpha.IDataplexConfig|null|undefined} dataplexConfig + * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @instance + */ + MetadataIntegration.prototype.dataplexConfig = null; + + /** + * Creates a new MetadataIntegration instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @static + * @param {google.cloud.metastore.v1alpha.IMetadataIntegration=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.MetadataIntegration} MetadataIntegration instance + */ + MetadataIntegration.create = function create(properties) { + return new MetadataIntegration(properties); + }; + + /** + * Encodes the specified MetadataIntegration message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataIntegration.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @static + * @param {google.cloud.metastore.v1alpha.IMetadataIntegration} message MetadataIntegration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataIntegration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataCatalogConfig != null && Object.hasOwnProperty.call(message, "dataCatalogConfig")) + $root.google.cloud.metastore.v1alpha.DataCatalogConfig.encode(message.dataCatalogConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dataplexConfig != null && Object.hasOwnProperty.call(message, "dataplexConfig")) + $root.google.cloud.metastore.v1alpha.DataplexConfig.encode(message.dataplexConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetadataIntegration message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataIntegration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @static + * @param {google.cloud.metastore.v1alpha.IMetadataIntegration} message MetadataIntegration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataIntegration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetadataIntegration message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.MetadataIntegration} MetadataIntegration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataIntegration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.MetadataIntegration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataCatalogConfig = $root.google.cloud.metastore.v1alpha.DataCatalogConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dataplexConfig = $root.google.cloud.metastore.v1alpha.DataplexConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetadataIntegration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.MetadataIntegration} MetadataIntegration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataIntegration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetadataIntegration message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetadataIntegration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataCatalogConfig != null && message.hasOwnProperty("dataCatalogConfig")) { + var error = $root.google.cloud.metastore.v1alpha.DataCatalogConfig.verify(message.dataCatalogConfig); + if (error) + return "dataCatalogConfig." + error; + } + if (message.dataplexConfig != null && message.hasOwnProperty("dataplexConfig")) { + var error = $root.google.cloud.metastore.v1alpha.DataplexConfig.verify(message.dataplexConfig); + if (error) + return "dataplexConfig." + error; + } + return null; + }; + + /** + * Creates a MetadataIntegration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.MetadataIntegration} MetadataIntegration + */ + MetadataIntegration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.MetadataIntegration) + return object; + var message = new $root.google.cloud.metastore.v1alpha.MetadataIntegration(); + if (object.dataCatalogConfig != null) { + if (typeof object.dataCatalogConfig !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.MetadataIntegration.dataCatalogConfig: object expected"); + message.dataCatalogConfig = $root.google.cloud.metastore.v1alpha.DataCatalogConfig.fromObject(object.dataCatalogConfig); + } + if (object.dataplexConfig != null) { + if (typeof object.dataplexConfig !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.MetadataIntegration.dataplexConfig: object expected"); + message.dataplexConfig = $root.google.cloud.metastore.v1alpha.DataplexConfig.fromObject(object.dataplexConfig); + } + return message; + }; + + /** + * Creates a plain object from a MetadataIntegration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @static + * @param {google.cloud.metastore.v1alpha.MetadataIntegration} message MetadataIntegration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetadataIntegration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataCatalogConfig = null; + object.dataplexConfig = null; + } + if (message.dataCatalogConfig != null && message.hasOwnProperty("dataCatalogConfig")) + object.dataCatalogConfig = $root.google.cloud.metastore.v1alpha.DataCatalogConfig.toObject(message.dataCatalogConfig, options); + if (message.dataplexConfig != null && message.hasOwnProperty("dataplexConfig")) + object.dataplexConfig = $root.google.cloud.metastore.v1alpha.DataplexConfig.toObject(message.dataplexConfig, options); + return object; + }; + + /** + * Converts this MetadataIntegration to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @instance + * @returns {Object.} JSON object + */ + MetadataIntegration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetadataIntegration + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.MetadataIntegration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetadataIntegration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.MetadataIntegration"; + }; + + return MetadataIntegration; + })(); + + v1alpha.DataCatalogConfig = (function() { + + /** + * Properties of a DataCatalogConfig. + * @memberof google.cloud.metastore.v1alpha + * @interface IDataCatalogConfig + * @property {boolean|null} [enabled] DataCatalogConfig enabled + */ + + /** + * Constructs a new DataCatalogConfig. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a DataCatalogConfig. + * @implements IDataCatalogConfig + * @constructor + * @param {google.cloud.metastore.v1alpha.IDataCatalogConfig=} [properties] Properties to set + */ + function DataCatalogConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataCatalogConfig enabled. + * @member {boolean} enabled + * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @instance + */ + DataCatalogConfig.prototype.enabled = false; + + /** + * Creates a new DataCatalogConfig instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @static + * @param {google.cloud.metastore.v1alpha.IDataCatalogConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.DataCatalogConfig} DataCatalogConfig instance + */ + DataCatalogConfig.create = function create(properties) { + return new DataCatalogConfig(properties); + }; + + /** + * Encodes the specified DataCatalogConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.DataCatalogConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @static + * @param {google.cloud.metastore.v1alpha.IDataCatalogConfig} message DataCatalogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataCatalogConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified DataCatalogConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DataCatalogConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @static + * @param {google.cloud.metastore.v1alpha.IDataCatalogConfig} message DataCatalogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataCatalogConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataCatalogConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.DataCatalogConfig} DataCatalogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataCatalogConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.DataCatalogConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataCatalogConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.DataCatalogConfig} DataCatalogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataCatalogConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataCatalogConfig message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataCatalogConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a DataCatalogConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.DataCatalogConfig} DataCatalogConfig + */ + DataCatalogConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.DataCatalogConfig) + return object; + var message = new $root.google.cloud.metastore.v1alpha.DataCatalogConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a DataCatalogConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @static + * @param {google.cloud.metastore.v1alpha.DataCatalogConfig} message DataCatalogConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataCatalogConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this DataCatalogConfig to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @instance + * @returns {Object.} JSON object + */ + DataCatalogConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataCatalogConfig + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.DataCatalogConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataCatalogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.DataCatalogConfig"; + }; + + return DataCatalogConfig; + })(); + + v1alpha.DataplexConfig = (function() { + + /** + * Properties of a DataplexConfig. + * @memberof google.cloud.metastore.v1alpha + * @interface IDataplexConfig + * @property {Object.|null} [lakeResources] DataplexConfig lakeResources + */ + + /** + * Constructs a new DataplexConfig. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a DataplexConfig. + * @implements IDataplexConfig + * @constructor + * @param {google.cloud.metastore.v1alpha.IDataplexConfig=} [properties] Properties to set + */ + function DataplexConfig(properties) { + this.lakeResources = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataplexConfig lakeResources. + * @member {Object.} lakeResources + * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @instance + */ + DataplexConfig.prototype.lakeResources = $util.emptyObject; + + /** + * Creates a new DataplexConfig instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @static + * @param {google.cloud.metastore.v1alpha.IDataplexConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.DataplexConfig} DataplexConfig instance + */ + DataplexConfig.create = function create(properties) { + return new DataplexConfig(properties); + }; + + /** + * Encodes the specified DataplexConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.DataplexConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @static + * @param {google.cloud.metastore.v1alpha.IDataplexConfig} message DataplexConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataplexConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lakeResources != null && Object.hasOwnProperty.call(message, "lakeResources")) + for (var keys = Object.keys(message.lakeResources), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.metastore.v1alpha.Lake.encode(message.lakeResources[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified DataplexConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DataplexConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @static + * @param {google.cloud.metastore.v1alpha.IDataplexConfig} message DataplexConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataplexConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataplexConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.DataplexConfig} DataplexConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataplexConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.DataplexConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.lakeResources === $util.emptyObject) + message.lakeResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.metastore.v1alpha.Lake.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.lakeResources[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataplexConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.DataplexConfig} DataplexConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataplexConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataplexConfig message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataplexConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lakeResources != null && message.hasOwnProperty("lakeResources")) { + if (!$util.isObject(message.lakeResources)) + return "lakeResources: object expected"; + var key = Object.keys(message.lakeResources); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.metastore.v1alpha.Lake.verify(message.lakeResources[key[i]]); + if (error) + return "lakeResources." + error; + } + } + return null; + }; + + /** + * Creates a DataplexConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.DataplexConfig} DataplexConfig + */ + DataplexConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.DataplexConfig) + return object; + var message = new $root.google.cloud.metastore.v1alpha.DataplexConfig(); + if (object.lakeResources) { + if (typeof object.lakeResources !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.DataplexConfig.lakeResources: object expected"); + message.lakeResources = {}; + for (var keys = Object.keys(object.lakeResources), i = 0; i < keys.length; ++i) { + if (typeof object.lakeResources[keys[i]] !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.DataplexConfig.lakeResources: object expected"); + message.lakeResources[keys[i]] = $root.google.cloud.metastore.v1alpha.Lake.fromObject(object.lakeResources[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a DataplexConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @static + * @param {google.cloud.metastore.v1alpha.DataplexConfig} message DataplexConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataplexConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.lakeResources = {}; + var keys2; + if (message.lakeResources && (keys2 = Object.keys(message.lakeResources)).length) { + object.lakeResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.lakeResources[keys2[j]] = $root.google.cloud.metastore.v1alpha.Lake.toObject(message.lakeResources[keys2[j]], options); + } + return object; + }; + + /** + * Converts this DataplexConfig to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @instance + * @returns {Object.} JSON object + */ + DataplexConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataplexConfig + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.DataplexConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataplexConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.DataplexConfig"; + }; + + return DataplexConfig; + })(); + + v1alpha.Lake = (function() { + + /** + * Properties of a Lake. + * @memberof google.cloud.metastore.v1alpha + * @interface ILake + * @property {string|null} [name] Lake name + */ + + /** + * Constructs a new Lake. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a Lake. + * @implements ILake + * @constructor + * @param {google.cloud.metastore.v1alpha.ILake=} [properties] Properties to set + */ + function Lake(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Lake name. + * @member {string} name + * @memberof google.cloud.metastore.v1alpha.Lake + * @instance + */ + Lake.prototype.name = ""; + + /** + * Creates a new Lake instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.Lake + * @static + * @param {google.cloud.metastore.v1alpha.ILake=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.Lake} Lake instance + */ + Lake.create = function create(properties) { + return new Lake(properties); + }; + + /** + * Encodes the specified Lake message. Does not implicitly {@link google.cloud.metastore.v1alpha.Lake.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.Lake + * @static + * @param {google.cloud.metastore.v1alpha.ILake} message Lake message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Lake.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Lake.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.Lake + * @static + * @param {google.cloud.metastore.v1alpha.ILake} message Lake message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Lake.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Lake message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.Lake + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.Lake} Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Lake.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.Lake(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Lake message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.Lake + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.Lake} Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Lake.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Lake message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.Lake + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Lake.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Lake message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.Lake + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.Lake} Lake + */ + Lake.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.Lake) + return object; + var message = new $root.google.cloud.metastore.v1alpha.Lake(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Lake message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.Lake + * @static + * @param {google.cloud.metastore.v1alpha.Lake} message Lake + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Lake.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Lake to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.Lake + * @instance + * @returns {Object.} JSON object + */ + Lake.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Lake + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.Lake + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Lake.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.Lake"; + }; + + return Lake; + })(); + + v1alpha.MaintenanceWindow = (function() { + + /** + * Properties of a MaintenanceWindow. + * @memberof google.cloud.metastore.v1alpha + * @interface IMaintenanceWindow + * @property {google.protobuf.IInt32Value|null} [hourOfDay] MaintenanceWindow hourOfDay + * @property {google.type.DayOfWeek|null} [dayOfWeek] MaintenanceWindow dayOfWeek + */ + + /** + * Constructs a new MaintenanceWindow. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a MaintenanceWindow. + * @implements IMaintenanceWindow + * @constructor + * @param {google.cloud.metastore.v1alpha.IMaintenanceWindow=} [properties] Properties to set + */ + function MaintenanceWindow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaintenanceWindow hourOfDay. + * @member {google.protobuf.IInt32Value|null|undefined} hourOfDay + * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.hourOfDay = null; + + /** + * MaintenanceWindow dayOfWeek. + * @member {google.type.DayOfWeek} dayOfWeek + * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.dayOfWeek = 0; + + /** + * Creates a new MaintenanceWindow instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @static + * @param {google.cloud.metastore.v1alpha.IMaintenanceWindow=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.MaintenanceWindow} MaintenanceWindow instance + */ + MaintenanceWindow.create = function create(properties) { + return new MaintenanceWindow(properties); + }; + + /** + * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.metastore.v1alpha.MaintenanceWindow.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @static + * @param {google.cloud.metastore.v1alpha.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hourOfDay != null && Object.hasOwnProperty.call(message, "hourOfDay")) + $root.google.protobuf.Int32Value.encode(message.hourOfDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); + return writer; + }; + + /** + * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MaintenanceWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @static + * @param {google.cloud.metastore.v1alpha.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.MaintenanceWindow} MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceWindow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.MaintenanceWindow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hourOfDay = $root.google.protobuf.Int32Value.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dayOfWeek = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.MaintenanceWindow} MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaintenanceWindow message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaintenanceWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hourOfDay != null && message.hasOwnProperty("hourOfDay")) { + var error = $root.google.protobuf.Int32Value.verify(message.hourOfDay); + if (error) + return "hourOfDay." + error; + } + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + switch (message.dayOfWeek) { + default: + return "dayOfWeek: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; + + /** + * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.MaintenanceWindow} MaintenanceWindow + */ + MaintenanceWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.MaintenanceWindow) + return object; + var message = new $root.google.cloud.metastore.v1alpha.MaintenanceWindow(); + if (object.hourOfDay != null) { + if (typeof object.hourOfDay !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.MaintenanceWindow.hourOfDay: object expected"); + message.hourOfDay = $root.google.protobuf.Int32Value.fromObject(object.hourOfDay); + } + switch (object.dayOfWeek) { + default: + if (typeof object.dayOfWeek === "number") { + message.dayOfWeek = object.dayOfWeek; + break; + } + break; + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.dayOfWeek = 0; + break; + case "MONDAY": + case 1: + message.dayOfWeek = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeek = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeek = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeek = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeek = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeek = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeek = 7; + break; + } + return message; + }; + + /** + * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @static + * @param {google.cloud.metastore.v1alpha.MaintenanceWindow} message MaintenanceWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaintenanceWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hourOfDay = null; + object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + } + if (message.hourOfDay != null && message.hasOwnProperty("hourOfDay")) + object.hourOfDay = $root.google.protobuf.Int32Value.toObject(message.hourOfDay, options); + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + return object; + }; + + /** + * Converts this MaintenanceWindow to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @instance + * @returns {Object.} JSON object + */ + MaintenanceWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MaintenanceWindow + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.MaintenanceWindow"; + }; + + return MaintenanceWindow; + })(); + + v1alpha.HiveMetastoreConfig = (function() { + + /** + * Properties of a HiveMetastoreConfig. + * @memberof google.cloud.metastore.v1alpha + * @interface IHiveMetastoreConfig + * @property {string|null} [version] HiveMetastoreConfig version + * @property {Object.|null} [configOverrides] HiveMetastoreConfig configOverrides + * @property {google.cloud.metastore.v1alpha.IKerberosConfig|null} [kerberosConfig] HiveMetastoreConfig kerberosConfig + * @property {google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol|null} [endpointProtocol] HiveMetastoreConfig endpointProtocol + * @property {Object.|null} [auxiliaryVersions] HiveMetastoreConfig auxiliaryVersions + */ + + /** + * Constructs a new HiveMetastoreConfig. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a HiveMetastoreConfig. + * @implements IHiveMetastoreConfig + * @constructor + * @param {google.cloud.metastore.v1alpha.IHiveMetastoreConfig=} [properties] Properties to set + */ + function HiveMetastoreConfig(properties) { + this.configOverrides = {}; + this.auxiliaryVersions = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HiveMetastoreConfig version. + * @member {string} version + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @instance + */ + HiveMetastoreConfig.prototype.version = ""; + + /** + * HiveMetastoreConfig configOverrides. + * @member {Object.} configOverrides + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @instance + */ + HiveMetastoreConfig.prototype.configOverrides = $util.emptyObject; + + /** + * HiveMetastoreConfig kerberosConfig. + * @member {google.cloud.metastore.v1alpha.IKerberosConfig|null|undefined} kerberosConfig + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @instance + */ + HiveMetastoreConfig.prototype.kerberosConfig = null; + + /** + * HiveMetastoreConfig endpointProtocol. + * @member {google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol} endpointProtocol + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @instance + */ + HiveMetastoreConfig.prototype.endpointProtocol = 0; + + /** + * HiveMetastoreConfig auxiliaryVersions. + * @member {Object.} auxiliaryVersions + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @instance + */ + HiveMetastoreConfig.prototype.auxiliaryVersions = $util.emptyObject; + + /** + * Creates a new HiveMetastoreConfig instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @static + * @param {google.cloud.metastore.v1alpha.IHiveMetastoreConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.HiveMetastoreConfig} HiveMetastoreConfig instance + */ + HiveMetastoreConfig.create = function create(properties) { + return new HiveMetastoreConfig(properties); + }; + + /** + * Encodes the specified HiveMetastoreConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.HiveMetastoreConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @static + * @param {google.cloud.metastore.v1alpha.IHiveMetastoreConfig} message HiveMetastoreConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HiveMetastoreConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.configOverrides != null && Object.hasOwnProperty.call(message, "configOverrides")) + for (var keys = Object.keys(message.configOverrides), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.configOverrides[keys[i]]).ldelim(); + if (message.kerberosConfig != null && Object.hasOwnProperty.call(message, "kerberosConfig")) + $root.google.cloud.metastore.v1alpha.KerberosConfig.encode(message.kerberosConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endpointProtocol != null && Object.hasOwnProperty.call(message, "endpointProtocol")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.endpointProtocol); + if (message.auxiliaryVersions != null && Object.hasOwnProperty.call(message, "auxiliaryVersions")) + for (var keys = Object.keys(message.auxiliaryVersions), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.encode(message.auxiliaryVersions[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified HiveMetastoreConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.HiveMetastoreConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @static + * @param {google.cloud.metastore.v1alpha.IHiveMetastoreConfig} message HiveMetastoreConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HiveMetastoreConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HiveMetastoreConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.HiveMetastoreConfig} HiveMetastoreConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HiveMetastoreConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + if (message.configOverrides === $util.emptyObject) + message.configOverrides = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.configOverrides[key] = value; + break; + } + case 3: { + message.kerberosConfig = $root.google.cloud.metastore.v1alpha.KerberosConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endpointProtocol = reader.int32(); + break; + } + case 5: { + if (message.auxiliaryVersions === $util.emptyObject) + message.auxiliaryVersions = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.auxiliaryVersions[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HiveMetastoreConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.HiveMetastoreConfig} HiveMetastoreConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HiveMetastoreConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HiveMetastoreConfig message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HiveMetastoreConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.configOverrides != null && message.hasOwnProperty("configOverrides")) { + if (!$util.isObject(message.configOverrides)) + return "configOverrides: object expected"; + var key = Object.keys(message.configOverrides); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.configOverrides[key[i]])) + return "configOverrides: string{k:string} expected"; + } + if (message.kerberosConfig != null && message.hasOwnProperty("kerberosConfig")) { + var error = $root.google.cloud.metastore.v1alpha.KerberosConfig.verify(message.kerberosConfig); + if (error) + return "kerberosConfig." + error; + } + if (message.endpointProtocol != null && message.hasOwnProperty("endpointProtocol")) + switch (message.endpointProtocol) { + default: + return "endpointProtocol: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.auxiliaryVersions != null && message.hasOwnProperty("auxiliaryVersions")) { + if (!$util.isObject(message.auxiliaryVersions)) + return "auxiliaryVersions: object expected"; + var key = Object.keys(message.auxiliaryVersions); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.verify(message.auxiliaryVersions[key[i]]); + if (error) + return "auxiliaryVersions." + error; + } + } + return null; + }; + + /** + * Creates a HiveMetastoreConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.HiveMetastoreConfig} HiveMetastoreConfig + */ + HiveMetastoreConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig) + return object; + var message = new $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig(); + if (object.version != null) + message.version = String(object.version); + if (object.configOverrides) { + if (typeof object.configOverrides !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.HiveMetastoreConfig.configOverrides: object expected"); + message.configOverrides = {}; + for (var keys = Object.keys(object.configOverrides), i = 0; i < keys.length; ++i) + message.configOverrides[keys[i]] = String(object.configOverrides[keys[i]]); + } + if (object.kerberosConfig != null) { + if (typeof object.kerberosConfig !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.HiveMetastoreConfig.kerberosConfig: object expected"); + message.kerberosConfig = $root.google.cloud.metastore.v1alpha.KerberosConfig.fromObject(object.kerberosConfig); + } + switch (object.endpointProtocol) { + default: + if (typeof object.endpointProtocol === "number") { + message.endpointProtocol = object.endpointProtocol; + break; + } + break; + case "ENDPOINT_PROTOCOL_UNSPECIFIED": + case 0: + message.endpointProtocol = 0; + break; + case "THRIFT": + case 1: + message.endpointProtocol = 1; + break; + case "GRPC": + case 2: + message.endpointProtocol = 2; + break; + } + if (object.auxiliaryVersions) { + if (typeof object.auxiliaryVersions !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.HiveMetastoreConfig.auxiliaryVersions: object expected"); + message.auxiliaryVersions = {}; + for (var keys = Object.keys(object.auxiliaryVersions), i = 0; i < keys.length; ++i) { + if (typeof object.auxiliaryVersions[keys[i]] !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.HiveMetastoreConfig.auxiliaryVersions: object expected"); + message.auxiliaryVersions[keys[i]] = $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.fromObject(object.auxiliaryVersions[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a HiveMetastoreConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @static + * @param {google.cloud.metastore.v1alpha.HiveMetastoreConfig} message HiveMetastoreConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HiveMetastoreConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.configOverrides = {}; + object.auxiliaryVersions = {}; + } + if (options.defaults) { + object.version = ""; + object.kerberosConfig = null; + object.endpointProtocol = options.enums === String ? "ENDPOINT_PROTOCOL_UNSPECIFIED" : 0; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + var keys2; + if (message.configOverrides && (keys2 = Object.keys(message.configOverrides)).length) { + object.configOverrides = {}; + for (var j = 0; j < keys2.length; ++j) + object.configOverrides[keys2[j]] = message.configOverrides[keys2[j]]; + } + if (message.kerberosConfig != null && message.hasOwnProperty("kerberosConfig")) + object.kerberosConfig = $root.google.cloud.metastore.v1alpha.KerberosConfig.toObject(message.kerberosConfig, options); + if (message.endpointProtocol != null && message.hasOwnProperty("endpointProtocol")) + object.endpointProtocol = options.enums === String ? $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol[message.endpointProtocol] === undefined ? message.endpointProtocol : $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol[message.endpointProtocol] : message.endpointProtocol; + if (message.auxiliaryVersions && (keys2 = Object.keys(message.auxiliaryVersions)).length) { + object.auxiliaryVersions = {}; + for (var j = 0; j < keys2.length; ++j) + object.auxiliaryVersions[keys2[j]] = $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.toObject(message.auxiliaryVersions[keys2[j]], options); + } + return object; + }; + + /** + * Converts this HiveMetastoreConfig to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @instance + * @returns {Object.} JSON object + */ + HiveMetastoreConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HiveMetastoreConfig + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HiveMetastoreConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.HiveMetastoreConfig"; + }; + + /** + * EndpointProtocol enum. + * @name google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol + * @enum {number} + * @property {number} ENDPOINT_PROTOCOL_UNSPECIFIED=0 ENDPOINT_PROTOCOL_UNSPECIFIED value + * @property {number} THRIFT=1 THRIFT value + * @property {number} GRPC=2 GRPC value + */ + HiveMetastoreConfig.EndpointProtocol = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENDPOINT_PROTOCOL_UNSPECIFIED"] = 0; + values[valuesById[1] = "THRIFT"] = 1; + values[valuesById[2] = "GRPC"] = 2; + return values; + })(); + + return HiveMetastoreConfig; + })(); + + v1alpha.KerberosConfig = (function() { + + /** + * Properties of a KerberosConfig. + * @memberof google.cloud.metastore.v1alpha + * @interface IKerberosConfig + * @property {google.cloud.metastore.v1alpha.ISecret|null} [keytab] KerberosConfig keytab + * @property {string|null} [principal] KerberosConfig principal + * @property {string|null} [krb5ConfigGcsUri] KerberosConfig krb5ConfigGcsUri + */ + + /** + * Constructs a new KerberosConfig. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a KerberosConfig. + * @implements IKerberosConfig + * @constructor + * @param {google.cloud.metastore.v1alpha.IKerberosConfig=} [properties] Properties to set + */ + function KerberosConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KerberosConfig keytab. + * @member {google.cloud.metastore.v1alpha.ISecret|null|undefined} keytab + * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @instance + */ + KerberosConfig.prototype.keytab = null; + + /** + * KerberosConfig principal. + * @member {string} principal + * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @instance + */ + KerberosConfig.prototype.principal = ""; + + /** + * KerberosConfig krb5ConfigGcsUri. + * @member {string} krb5ConfigGcsUri + * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @instance + */ + KerberosConfig.prototype.krb5ConfigGcsUri = ""; + + /** + * Creates a new KerberosConfig instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @static + * @param {google.cloud.metastore.v1alpha.IKerberosConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.KerberosConfig} KerberosConfig instance + */ + KerberosConfig.create = function create(properties) { + return new KerberosConfig(properties); + }; + + /** + * Encodes the specified KerberosConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.KerberosConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @static + * @param {google.cloud.metastore.v1alpha.IKerberosConfig} message KerberosConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KerberosConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keytab != null && Object.hasOwnProperty.call(message, "keytab")) + $root.google.cloud.metastore.v1alpha.Secret.encode(message.keytab, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.principal != null && Object.hasOwnProperty.call(message, "principal")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.principal); + if (message.krb5ConfigGcsUri != null && Object.hasOwnProperty.call(message, "krb5ConfigGcsUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.krb5ConfigGcsUri); + return writer; + }; + + /** + * Encodes the specified KerberosConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.KerberosConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @static + * @param {google.cloud.metastore.v1alpha.IKerberosConfig} message KerberosConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KerberosConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KerberosConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.KerberosConfig} KerberosConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KerberosConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.KerberosConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.keytab = $root.google.cloud.metastore.v1alpha.Secret.decode(reader, reader.uint32()); + break; + } + case 2: { + message.principal = reader.string(); + break; + } + case 3: { + message.krb5ConfigGcsUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KerberosConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.KerberosConfig} KerberosConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KerberosConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KerberosConfig message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KerberosConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keytab != null && message.hasOwnProperty("keytab")) { + var error = $root.google.cloud.metastore.v1alpha.Secret.verify(message.keytab); + if (error) + return "keytab." + error; + } + if (message.principal != null && message.hasOwnProperty("principal")) + if (!$util.isString(message.principal)) + return "principal: string expected"; + if (message.krb5ConfigGcsUri != null && message.hasOwnProperty("krb5ConfigGcsUri")) + if (!$util.isString(message.krb5ConfigGcsUri)) + return "krb5ConfigGcsUri: string expected"; + return null; + }; + + /** + * Creates a KerberosConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.KerberosConfig} KerberosConfig + */ + KerberosConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.KerberosConfig) + return object; + var message = new $root.google.cloud.metastore.v1alpha.KerberosConfig(); + if (object.keytab != null) { + if (typeof object.keytab !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.KerberosConfig.keytab: object expected"); + message.keytab = $root.google.cloud.metastore.v1alpha.Secret.fromObject(object.keytab); + } + if (object.principal != null) + message.principal = String(object.principal); + if (object.krb5ConfigGcsUri != null) + message.krb5ConfigGcsUri = String(object.krb5ConfigGcsUri); + return message; + }; + + /** + * Creates a plain object from a KerberosConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @static + * @param {google.cloud.metastore.v1alpha.KerberosConfig} message KerberosConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KerberosConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keytab = null; + object.principal = ""; + object.krb5ConfigGcsUri = ""; + } + if (message.keytab != null && message.hasOwnProperty("keytab")) + object.keytab = $root.google.cloud.metastore.v1alpha.Secret.toObject(message.keytab, options); + if (message.principal != null && message.hasOwnProperty("principal")) + object.principal = message.principal; + if (message.krb5ConfigGcsUri != null && message.hasOwnProperty("krb5ConfigGcsUri")) + object.krb5ConfigGcsUri = message.krb5ConfigGcsUri; + return object; + }; + + /** + * Converts this KerberosConfig to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @instance + * @returns {Object.} JSON object + */ + KerberosConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KerberosConfig + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KerberosConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.KerberosConfig"; + }; + + return KerberosConfig; + })(); + + v1alpha.Secret = (function() { + + /** + * Properties of a Secret. + * @memberof google.cloud.metastore.v1alpha + * @interface ISecret + * @property {string|null} [cloudSecret] Secret cloudSecret + */ + + /** + * Constructs a new Secret. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a Secret. + * @implements ISecret + * @constructor + * @param {google.cloud.metastore.v1alpha.ISecret=} [properties] Properties to set + */ + function Secret(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Secret cloudSecret. + * @member {string|null|undefined} cloudSecret + * @memberof google.cloud.metastore.v1alpha.Secret + * @instance + */ + Secret.prototype.cloudSecret = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Secret value. + * @member {"cloudSecret"|undefined} value + * @memberof google.cloud.metastore.v1alpha.Secret + * @instance + */ + Object.defineProperty(Secret.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["cloudSecret"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Secret instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.Secret + * @static + * @param {google.cloud.metastore.v1alpha.ISecret=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.Secret} Secret instance + */ + Secret.create = function create(properties) { + return new Secret(properties); + }; + + /** + * Encodes the specified Secret message. Does not implicitly {@link google.cloud.metastore.v1alpha.Secret.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.Secret + * @static + * @param {google.cloud.metastore.v1alpha.ISecret} message Secret message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Secret.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudSecret != null && Object.hasOwnProperty.call(message, "cloudSecret")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cloudSecret); + return writer; + }; + + /** + * Encodes the specified Secret message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Secret.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.Secret + * @static + * @param {google.cloud.metastore.v1alpha.ISecret} message Secret message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Secret.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Secret message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.Secret + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.Secret} Secret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Secret.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.Secret(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.cloudSecret = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Secret message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.Secret + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.Secret} Secret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Secret.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Secret message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.Secret + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Secret.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.cloudSecret != null && message.hasOwnProperty("cloudSecret")) { + properties.value = 1; + if (!$util.isString(message.cloudSecret)) + return "cloudSecret: string expected"; + } + return null; + }; + + /** + * Creates a Secret message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.Secret + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.Secret} Secret + */ + Secret.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.Secret) + return object; + var message = new $root.google.cloud.metastore.v1alpha.Secret(); + if (object.cloudSecret != null) + message.cloudSecret = String(object.cloudSecret); + return message; + }; + + /** + * Creates a plain object from a Secret message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.Secret + * @static + * @param {google.cloud.metastore.v1alpha.Secret} message Secret + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Secret.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.cloudSecret != null && message.hasOwnProperty("cloudSecret")) { + object.cloudSecret = message.cloudSecret; + if (options.oneofs) + object.value = "cloudSecret"; + } + return object; + }; + + /** + * Converts this Secret to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.Secret + * @instance + * @returns {Object.} JSON object + */ + Secret.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Secret + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.Secret + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Secret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.Secret"; + }; + + return Secret; + })(); + + v1alpha.EncryptionConfig = (function() { + + /** + * Properties of an EncryptionConfig. + * @memberof google.cloud.metastore.v1alpha + * @interface IEncryptionConfig + * @property {string|null} [kmsKey] EncryptionConfig kmsKey + */ + + /** + * Constructs a new EncryptionConfig. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents an EncryptionConfig. + * @implements IEncryptionConfig + * @constructor + * @param {google.cloud.metastore.v1alpha.IEncryptionConfig=} [properties] Properties to set + */ + function EncryptionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptionConfig kmsKey. + * @member {string} kmsKey + * @memberof google.cloud.metastore.v1alpha.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.kmsKey = ""; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.EncryptionConfig + * @static + * @param {google.cloud.metastore.v1alpha.IEncryptionConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.EncryptionConfig} EncryptionConfig instance + */ + EncryptionConfig.create = function create(properties) { + return new EncryptionConfig(properties); + }; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.EncryptionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.EncryptionConfig + * @static + * @param {google.cloud.metastore.v1alpha.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKey); + return writer; + }; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.EncryptionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.EncryptionConfig + * @static + * @param {google.cloud.metastore.v1alpha.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.EncryptionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kmsKey = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionConfig message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.EncryptionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + if (!$util.isString(message.kmsKey)) + return "kmsKey: string expected"; + return null; + }; + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.EncryptionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.EncryptionConfig} EncryptionConfig + */ + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.EncryptionConfig) + return object; + var message = new $root.google.cloud.metastore.v1alpha.EncryptionConfig(); + if (object.kmsKey != null) + message.kmsKey = String(object.kmsKey); + return message; + }; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.EncryptionConfig + * @static + * @param {google.cloud.metastore.v1alpha.EncryptionConfig} message EncryptionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.kmsKey = ""; + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + object.kmsKey = message.kmsKey; + return object; + }; + + /** + * Converts this EncryptionConfig to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.EncryptionConfig + * @instance + * @returns {Object.} JSON object + */ + EncryptionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptionConfig + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.EncryptionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.EncryptionConfig"; + }; + + return EncryptionConfig; + })(); + + v1alpha.AuxiliaryVersionConfig = (function() { + + /** + * Properties of an AuxiliaryVersionConfig. + * @memberof google.cloud.metastore.v1alpha + * @interface IAuxiliaryVersionConfig + * @property {string|null} [version] AuxiliaryVersionConfig version + * @property {Object.|null} [configOverrides] AuxiliaryVersionConfig configOverrides + * @property {google.cloud.metastore.v1alpha.INetworkConfig|null} [networkConfig] AuxiliaryVersionConfig networkConfig + */ + + /** + * Constructs a new AuxiliaryVersionConfig. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents an AuxiliaryVersionConfig. + * @implements IAuxiliaryVersionConfig + * @constructor + * @param {google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig=} [properties] Properties to set + */ + function AuxiliaryVersionConfig(properties) { + this.configOverrides = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuxiliaryVersionConfig version. + * @member {string} version + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * @instance + */ + AuxiliaryVersionConfig.prototype.version = ""; + + /** + * AuxiliaryVersionConfig configOverrides. + * @member {Object.} configOverrides + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * @instance + */ + AuxiliaryVersionConfig.prototype.configOverrides = $util.emptyObject; + + /** + * AuxiliaryVersionConfig networkConfig. + * @member {google.cloud.metastore.v1alpha.INetworkConfig|null|undefined} networkConfig + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * @instance + */ + AuxiliaryVersionConfig.prototype.networkConfig = null; + + /** + * Creates a new AuxiliaryVersionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * @static + * @param {google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} AuxiliaryVersionConfig instance + */ + AuxiliaryVersionConfig.create = function create(properties) { + return new AuxiliaryVersionConfig(properties); + }; + + /** + * Encodes the specified AuxiliaryVersionConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * @static + * @param {google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig} message AuxiliaryVersionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuxiliaryVersionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.configOverrides != null && Object.hasOwnProperty.call(message, "configOverrides")) + for (var keys = Object.keys(message.configOverrides), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.configOverrides[keys[i]]).ldelim(); + if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) + $root.google.cloud.metastore.v1alpha.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuxiliaryVersionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * @static + * @param {google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig} message AuxiliaryVersionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuxiliaryVersionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} AuxiliaryVersionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuxiliaryVersionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + if (message.configOverrides === $util.emptyObject) + message.configOverrides = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.configOverrides[key] = value; + break; + } + case 3: { + message.networkConfig = $root.google.cloud.metastore.v1alpha.NetworkConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} AuxiliaryVersionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuxiliaryVersionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuxiliaryVersionConfig message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuxiliaryVersionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.configOverrides != null && message.hasOwnProperty("configOverrides")) { + if (!$util.isObject(message.configOverrides)) + return "configOverrides: object expected"; + var key = Object.keys(message.configOverrides); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.configOverrides[key[i]])) + return "configOverrides: string{k:string} expected"; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { + var error = $root.google.cloud.metastore.v1alpha.NetworkConfig.verify(message.networkConfig); + if (error) + return "networkConfig." + error; + } + return null; + }; + + /** + * Creates an AuxiliaryVersionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} AuxiliaryVersionConfig + */ + AuxiliaryVersionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) + return object; + var message = new $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig(); + if (object.version != null) + message.version = String(object.version); + if (object.configOverrides) { + if (typeof object.configOverrides !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.configOverrides: object expected"); + message.configOverrides = {}; + for (var keys = Object.keys(object.configOverrides), i = 0; i < keys.length; ++i) + message.configOverrides[keys[i]] = String(object.configOverrides[keys[i]]); + } + if (object.networkConfig != null) { + if (typeof object.networkConfig !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.networkConfig: object expected"); + message.networkConfig = $root.google.cloud.metastore.v1alpha.NetworkConfig.fromObject(object.networkConfig); + } + return message; + }; + + /** + * Creates a plain object from an AuxiliaryVersionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * @static + * @param {google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} message AuxiliaryVersionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuxiliaryVersionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.configOverrides = {}; + if (options.defaults) { + object.version = ""; + object.networkConfig = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + var keys2; + if (message.configOverrides && (keys2 = Object.keys(message.configOverrides)).length) { + object.configOverrides = {}; + for (var j = 0; j < keys2.length; ++j) + object.configOverrides[keys2[j]] = message.configOverrides[keys2[j]]; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) + object.networkConfig = $root.google.cloud.metastore.v1alpha.NetworkConfig.toObject(message.networkConfig, options); + return object; + }; + + /** + * Converts this AuxiliaryVersionConfig to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * @instance + * @returns {Object.} JSON object + */ + AuxiliaryVersionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuxiliaryVersionConfig + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuxiliaryVersionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.AuxiliaryVersionConfig"; + }; + + return AuxiliaryVersionConfig; + })(); + + v1alpha.NetworkConfig = (function() { + + /** + * Properties of a NetworkConfig. + * @memberof google.cloud.metastore.v1alpha + * @interface INetworkConfig + * @property {Array.|null} [consumers] NetworkConfig consumers + */ + + /** + * Constructs a new NetworkConfig. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a NetworkConfig. + * @implements INetworkConfig + * @constructor + * @param {google.cloud.metastore.v1alpha.INetworkConfig=} [properties] Properties to set + */ + function NetworkConfig(properties) { + this.consumers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkConfig consumers. + * @member {Array.} consumers + * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @instance + */ + NetworkConfig.prototype.consumers = $util.emptyArray; + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @static + * @param {google.cloud.metastore.v1alpha.INetworkConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.NetworkConfig} NetworkConfig instance + */ + NetworkConfig.create = function create(properties) { + return new NetworkConfig(properties); + }; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @static + * @param {google.cloud.metastore.v1alpha.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumers != null && message.consumers.length) + for (var i = 0; i < message.consumers.length; ++i) + $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.encode(message.consumers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @static + * @param {google.cloud.metastore.v1alpha.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.NetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.consumers && message.consumers.length)) + message.consumers = []; + message.consumers.push($root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkConfig message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consumers != null && message.hasOwnProperty("consumers")) { + if (!Array.isArray(message.consumers)) + return "consumers: array expected"; + for (var i = 0; i < message.consumers.length; ++i) { + var error = $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.verify(message.consumers[i]); + if (error) + return "consumers." + error; + } + } + return null; + }; + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.NetworkConfig} NetworkConfig + */ + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.NetworkConfig) + return object; + var message = new $root.google.cloud.metastore.v1alpha.NetworkConfig(); + if (object.consumers) { + if (!Array.isArray(object.consumers)) + throw TypeError(".google.cloud.metastore.v1alpha.NetworkConfig.consumers: array expected"); + message.consumers = []; + for (var i = 0; i < object.consumers.length; ++i) { + if (typeof object.consumers[i] !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.NetworkConfig.consumers: object expected"); + message.consumers[i] = $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.fromObject(object.consumers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @static + * @param {google.cloud.metastore.v1alpha.NetworkConfig} message NetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.consumers = []; + if (message.consumers && message.consumers.length) { + object.consumers = []; + for (var j = 0; j < message.consumers.length; ++j) + object.consumers[j] = $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.toObject(message.consumers[j], options); + } + return object; + }; + + /** + * Converts this NetworkConfig to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkConfig + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.NetworkConfig"; + }; + + NetworkConfig.Consumer = (function() { + + /** + * Properties of a Consumer. + * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @interface IConsumer + * @property {string|null} [subnetwork] Consumer subnetwork + * @property {string|null} [endpointUri] Consumer endpointUri + */ + + /** + * Constructs a new Consumer. + * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @classdesc Represents a Consumer. + * @implements IConsumer + * @constructor + * @param {google.cloud.metastore.v1alpha.NetworkConfig.IConsumer=} [properties] Properties to set + */ + function Consumer(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Consumer subnetwork. + * @member {string|null|undefined} subnetwork + * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer + * @instance + */ + Consumer.prototype.subnetwork = null; + + /** + * Consumer endpointUri. + * @member {string} endpointUri + * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer + * @instance + */ + Consumer.prototype.endpointUri = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Consumer vpcResource. + * @member {"subnetwork"|undefined} vpcResource + * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer + * @instance + */ + Object.defineProperty(Consumer.prototype, "vpcResource", { + get: $util.oneOfGetter($oneOfFields = ["subnetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Consumer instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer + * @static + * @param {google.cloud.metastore.v1alpha.NetworkConfig.IConsumer=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.NetworkConfig.Consumer} Consumer instance + */ + Consumer.create = function create(properties) { + return new Consumer(properties); + }; + + /** + * Encodes the specified Consumer message. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.Consumer.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer + * @static + * @param {google.cloud.metastore.v1alpha.NetworkConfig.IConsumer} message Consumer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Consumer.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetwork); + if (message.endpointUri != null && Object.hasOwnProperty.call(message, "endpointUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.endpointUri); + return writer; + }; + + /** + * Encodes the specified Consumer message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.Consumer.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer + * @static + * @param {google.cloud.metastore.v1alpha.NetworkConfig.IConsumer} message Consumer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Consumer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Consumer message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.NetworkConfig.Consumer} Consumer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Consumer.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.subnetwork = reader.string(); + break; + } + case 3: { + message.endpointUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Consumer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.NetworkConfig.Consumer} Consumer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Consumer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Consumer message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Consumer.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + properties.vpcResource = 1; + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + } + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + if (!$util.isString(message.endpointUri)) + return "endpointUri: string expected"; + return null; + }; + + /** + * Creates a Consumer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.NetworkConfig.Consumer} Consumer + */ + Consumer.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer) + return object; + var message = new $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer(); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.endpointUri != null) + message.endpointUri = String(object.endpointUri); + return message; + }; + + /** + * Creates a plain object from a Consumer message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer + * @static + * @param {google.cloud.metastore.v1alpha.NetworkConfig.Consumer} message Consumer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Consumer.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.endpointUri = ""; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + object.subnetwork = message.subnetwork; + if (options.oneofs) + object.vpcResource = "subnetwork"; + } + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + object.endpointUri = message.endpointUri; + return object; + }; + + /** + * Converts this Consumer to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer + * @instance + * @returns {Object.} JSON object + */ + Consumer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Consumer + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Consumer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.NetworkConfig.Consumer"; + }; + + return Consumer; + })(); + + return NetworkConfig; + })(); + + v1alpha.TelemetryConfig = (function() { + + /** + * Properties of a TelemetryConfig. + * @memberof google.cloud.metastore.v1alpha + * @interface ITelemetryConfig + * @property {google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat|null} [logFormat] TelemetryConfig logFormat + */ + + /** + * Constructs a new TelemetryConfig. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a TelemetryConfig. + * @implements ITelemetryConfig + * @constructor + * @param {google.cloud.metastore.v1alpha.ITelemetryConfig=} [properties] Properties to set + */ + function TelemetryConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TelemetryConfig logFormat. + * @member {google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat} logFormat + * @memberof google.cloud.metastore.v1alpha.TelemetryConfig + * @instance + */ + TelemetryConfig.prototype.logFormat = 0; + + /** + * Creates a new TelemetryConfig instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.TelemetryConfig + * @static + * @param {google.cloud.metastore.v1alpha.ITelemetryConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.TelemetryConfig} TelemetryConfig instance + */ + TelemetryConfig.create = function create(properties) { + return new TelemetryConfig(properties); + }; + + /** + * Encodes the specified TelemetryConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.TelemetryConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.TelemetryConfig + * @static + * @param {google.cloud.metastore.v1alpha.ITelemetryConfig} message TelemetryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TelemetryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logFormat != null && Object.hasOwnProperty.call(message, "logFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logFormat); + return writer; + }; + + /** + * Encodes the specified TelemetryConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.TelemetryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.TelemetryConfig + * @static + * @param {google.cloud.metastore.v1alpha.ITelemetryConfig} message TelemetryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TelemetryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TelemetryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.TelemetryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.TelemetryConfig} TelemetryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TelemetryConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.TelemetryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.logFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TelemetryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.TelemetryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.TelemetryConfig} TelemetryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TelemetryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TelemetryConfig message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.TelemetryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TelemetryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logFormat != null && message.hasOwnProperty("logFormat")) + switch (message.logFormat) { + default: + return "logFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a TelemetryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.TelemetryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.TelemetryConfig} TelemetryConfig + */ + TelemetryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.TelemetryConfig) + return object; + var message = new $root.google.cloud.metastore.v1alpha.TelemetryConfig(); + switch (object.logFormat) { + default: + if (typeof object.logFormat === "number") { + message.logFormat = object.logFormat; + break; + } + break; + case "LOG_FORMAT_UNSPECIFIED": + case 0: + message.logFormat = 0; + break; + case "LEGACY": + case 1: + message.logFormat = 1; + break; + case "JSON": + case 2: + message.logFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a TelemetryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.TelemetryConfig + * @static + * @param {google.cloud.metastore.v1alpha.TelemetryConfig} message TelemetryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TelemetryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.logFormat = options.enums === String ? "LOG_FORMAT_UNSPECIFIED" : 0; + if (message.logFormat != null && message.hasOwnProperty("logFormat")) + object.logFormat = options.enums === String ? $root.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat[message.logFormat] === undefined ? message.logFormat : $root.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat[message.logFormat] : message.logFormat; + return object; + }; + + /** + * Converts this TelemetryConfig to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.TelemetryConfig + * @instance + * @returns {Object.} JSON object + */ + TelemetryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TelemetryConfig + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.TelemetryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TelemetryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.TelemetryConfig"; + }; + + /** + * LogFormat enum. + * @name google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat + * @enum {number} + * @property {number} LOG_FORMAT_UNSPECIFIED=0 LOG_FORMAT_UNSPECIFIED value + * @property {number} LEGACY=1 LEGACY value + * @property {number} JSON=2 JSON value + */ + TelemetryConfig.LogFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "LEGACY"] = 1; + values[valuesById[2] = "JSON"] = 2; + return values; + })(); + + return TelemetryConfig; + })(); + + v1alpha.MetadataManagementActivity = (function() { + + /** + * Properties of a MetadataManagementActivity. + * @memberof google.cloud.metastore.v1alpha + * @interface IMetadataManagementActivity + * @property {Array.|null} [metadataExports] MetadataManagementActivity metadataExports + * @property {Array.|null} [restores] MetadataManagementActivity restores + */ + + /** + * Constructs a new MetadataManagementActivity. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a MetadataManagementActivity. + * @implements IMetadataManagementActivity + * @constructor + * @param {google.cloud.metastore.v1alpha.IMetadataManagementActivity=} [properties] Properties to set + */ + function MetadataManagementActivity(properties) { + this.metadataExports = []; + this.restores = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetadataManagementActivity metadataExports. + * @member {Array.} metadataExports + * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @instance + */ + MetadataManagementActivity.prototype.metadataExports = $util.emptyArray; + + /** + * MetadataManagementActivity restores. + * @member {Array.} restores + * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @instance + */ + MetadataManagementActivity.prototype.restores = $util.emptyArray; + + /** + * Creates a new MetadataManagementActivity instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @static + * @param {google.cloud.metastore.v1alpha.IMetadataManagementActivity=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.MetadataManagementActivity} MetadataManagementActivity instance + */ + MetadataManagementActivity.create = function create(properties) { + return new MetadataManagementActivity(properties); + }; + + /** + * Encodes the specified MetadataManagementActivity message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataManagementActivity.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @static + * @param {google.cloud.metastore.v1alpha.IMetadataManagementActivity} message MetadataManagementActivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataManagementActivity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadataExports != null && message.metadataExports.length) + for (var i = 0; i < message.metadataExports.length; ++i) + $root.google.cloud.metastore.v1alpha.MetadataExport.encode(message.metadataExports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.restores != null && message.restores.length) + for (var i = 0; i < message.restores.length; ++i) + $root.google.cloud.metastore.v1alpha.Restore.encode(message.restores[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetadataManagementActivity message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataManagementActivity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @static + * @param {google.cloud.metastore.v1alpha.IMetadataManagementActivity} message MetadataManagementActivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataManagementActivity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetadataManagementActivity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.MetadataManagementActivity} MetadataManagementActivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataManagementActivity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.MetadataManagementActivity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.metadataExports && message.metadataExports.length)) + message.metadataExports = []; + message.metadataExports.push($root.google.cloud.metastore.v1alpha.MetadataExport.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.restores && message.restores.length)) + message.restores = []; + message.restores.push($root.google.cloud.metastore.v1alpha.Restore.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetadataManagementActivity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.MetadataManagementActivity} MetadataManagementActivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataManagementActivity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetadataManagementActivity message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetadataManagementActivity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadataExports != null && message.hasOwnProperty("metadataExports")) { + if (!Array.isArray(message.metadataExports)) + return "metadataExports: array expected"; + for (var i = 0; i < message.metadataExports.length; ++i) { + var error = $root.google.cloud.metastore.v1alpha.MetadataExport.verify(message.metadataExports[i]); + if (error) + return "metadataExports." + error; + } + } + if (message.restores != null && message.hasOwnProperty("restores")) { + if (!Array.isArray(message.restores)) + return "restores: array expected"; + for (var i = 0; i < message.restores.length; ++i) { + var error = $root.google.cloud.metastore.v1alpha.Restore.verify(message.restores[i]); + if (error) + return "restores." + error; + } + } + return null; + }; + + /** + * Creates a MetadataManagementActivity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.MetadataManagementActivity} MetadataManagementActivity + */ + MetadataManagementActivity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.MetadataManagementActivity) + return object; + var message = new $root.google.cloud.metastore.v1alpha.MetadataManagementActivity(); + if (object.metadataExports) { + if (!Array.isArray(object.metadataExports)) + throw TypeError(".google.cloud.metastore.v1alpha.MetadataManagementActivity.metadataExports: array expected"); + message.metadataExports = []; + for (var i = 0; i < object.metadataExports.length; ++i) { + if (typeof object.metadataExports[i] !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.MetadataManagementActivity.metadataExports: object expected"); + message.metadataExports[i] = $root.google.cloud.metastore.v1alpha.MetadataExport.fromObject(object.metadataExports[i]); + } + } + if (object.restores) { + if (!Array.isArray(object.restores)) + throw TypeError(".google.cloud.metastore.v1alpha.MetadataManagementActivity.restores: array expected"); + message.restores = []; + for (var i = 0; i < object.restores.length; ++i) { + if (typeof object.restores[i] !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.MetadataManagementActivity.restores: object expected"); + message.restores[i] = $root.google.cloud.metastore.v1alpha.Restore.fromObject(object.restores[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MetadataManagementActivity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @static + * @param {google.cloud.metastore.v1alpha.MetadataManagementActivity} message MetadataManagementActivity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetadataManagementActivity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.metadataExports = []; + object.restores = []; + } + if (message.metadataExports && message.metadataExports.length) { + object.metadataExports = []; + for (var j = 0; j < message.metadataExports.length; ++j) + object.metadataExports[j] = $root.google.cloud.metastore.v1alpha.MetadataExport.toObject(message.metadataExports[j], options); + } + if (message.restores && message.restores.length) { + object.restores = []; + for (var j = 0; j < message.restores.length; ++j) + object.restores[j] = $root.google.cloud.metastore.v1alpha.Restore.toObject(message.restores[j], options); + } + return object; + }; + + /** + * Converts this MetadataManagementActivity to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @instance + * @returns {Object.} JSON object + */ + MetadataManagementActivity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetadataManagementActivity + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetadataManagementActivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.MetadataManagementActivity"; + }; + + return MetadataManagementActivity; + })(); + + v1alpha.MetadataImport = (function() { + + /** + * Properties of a MetadataImport. + * @memberof google.cloud.metastore.v1alpha + * @interface IMetadataImport + * @property {google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump|null} [databaseDump] MetadataImport databaseDump + * @property {string|null} [name] MetadataImport name + * @property {string|null} [description] MetadataImport description + * @property {google.protobuf.ITimestamp|null} [createTime] MetadataImport createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] MetadataImport updateTime + * @property {google.protobuf.ITimestamp|null} [endTime] MetadataImport endTime + * @property {google.cloud.metastore.v1alpha.MetadataImport.State|null} [state] MetadataImport state + */ + + /** + * Constructs a new MetadataImport. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a MetadataImport. + * @implements IMetadataImport + * @constructor + * @param {google.cloud.metastore.v1alpha.IMetadataImport=} [properties] Properties to set + */ + function MetadataImport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetadataImport databaseDump. + * @member {google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump|null|undefined} databaseDump + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @instance + */ + MetadataImport.prototype.databaseDump = null; + + /** + * MetadataImport name. + * @member {string} name + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @instance + */ + MetadataImport.prototype.name = ""; + + /** + * MetadataImport description. + * @member {string} description + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @instance + */ + MetadataImport.prototype.description = ""; + + /** + * MetadataImport createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @instance + */ + MetadataImport.prototype.createTime = null; + + /** + * MetadataImport updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @instance + */ + MetadataImport.prototype.updateTime = null; + + /** + * MetadataImport endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @instance + */ + MetadataImport.prototype.endTime = null; + + /** + * MetadataImport state. + * @member {google.cloud.metastore.v1alpha.MetadataImport.State} state + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @instance + */ + MetadataImport.prototype.state = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MetadataImport metadata. + * @member {"databaseDump"|undefined} metadata + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @instance + */ + Object.defineProperty(MetadataImport.prototype, "metadata", { + get: $util.oneOfGetter($oneOfFields = ["databaseDump"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MetadataImport instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @static + * @param {google.cloud.metastore.v1alpha.IMetadataImport=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.MetadataImport} MetadataImport instance + */ + MetadataImport.create = function create(properties) { + return new MetadataImport(properties); + }; + + /** + * Encodes the specified MetadataImport message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @static + * @param {google.cloud.metastore.v1alpha.IMetadataImport} message MetadataImport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataImport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.databaseDump != null && Object.hasOwnProperty.call(message, "databaseDump")) + $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.encode(message.databaseDump, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetadataImport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @static + * @param {google.cloud.metastore.v1alpha.IMetadataImport} message MetadataImport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataImport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetadataImport message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.MetadataImport} MetadataImport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataImport.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.MetadataImport(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: { + message.databaseDump = $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetadataImport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.MetadataImport} MetadataImport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataImport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetadataImport message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetadataImport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.databaseDump != null && message.hasOwnProperty("databaseDump")) { + properties.metadata = 1; + { + var error = $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.verify(message.databaseDump); + if (error) + return "databaseDump." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a MetadataImport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.MetadataImport} MetadataImport + */ + MetadataImport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.MetadataImport) + return object; + var message = new $root.google.cloud.metastore.v1alpha.MetadataImport(); + if (object.databaseDump != null) { + if (typeof object.databaseDump !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.MetadataImport.databaseDump: object expected"); + message.databaseDump = $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.fromObject(object.databaseDump); + } + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.MetadataImport.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.MetadataImport.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.MetadataImport.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a MetadataImport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @static + * @param {google.cloud.metastore.v1alpha.MetadataImport} message MetadataImport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetadataImport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.endTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1alpha.MetadataImport.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1alpha.MetadataImport.State[message.state] : message.state; + if (message.databaseDump != null && message.hasOwnProperty("databaseDump")) { + object.databaseDump = $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.toObject(message.databaseDump, options); + if (options.oneofs) + object.metadata = "databaseDump"; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + return object; + }; + + /** + * Converts this MetadataImport to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @instance + * @returns {Object.} JSON object + */ + MetadataImport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetadataImport + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetadataImport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.MetadataImport"; + }; + + MetadataImport.DatabaseDump = (function() { + + /** + * Properties of a DatabaseDump. + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @interface IDatabaseDump + * @property {google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType|null} [databaseType] DatabaseDump databaseType + * @property {string|null} [gcsUri] DatabaseDump gcsUri + * @property {string|null} [sourceDatabase] DatabaseDump sourceDatabase + * @property {google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|null} [type] DatabaseDump type + */ + + /** + * Constructs a new DatabaseDump. + * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @classdesc Represents a DatabaseDump. + * @implements IDatabaseDump + * @constructor + * @param {google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump=} [properties] Properties to set + */ + function DatabaseDump(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatabaseDump databaseType. + * @member {google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType} databaseType + * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @instance + */ + DatabaseDump.prototype.databaseType = 0; + + /** + * DatabaseDump gcsUri. + * @member {string} gcsUri + * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @instance + */ + DatabaseDump.prototype.gcsUri = ""; + + /** + * DatabaseDump sourceDatabase. + * @member {string} sourceDatabase + * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @instance + */ + DatabaseDump.prototype.sourceDatabase = ""; + + /** + * DatabaseDump type. + * @member {google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type} type + * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @instance + */ + DatabaseDump.prototype.type = 0; + + /** + * Creates a new DatabaseDump instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @static + * @param {google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump} DatabaseDump instance + */ + DatabaseDump.create = function create(properties) { + return new DatabaseDump(properties); + }; + + /** + * Encodes the specified DatabaseDump message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @static + * @param {google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump} message DatabaseDump message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseDump.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.databaseType != null && Object.hasOwnProperty.call(message, "databaseType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.databaseType); + if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsUri); + if (message.sourceDatabase != null && Object.hasOwnProperty.call(message, "sourceDatabase")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceDatabase); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + return writer; + }; + + /** + * Encodes the specified DatabaseDump message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @static + * @param {google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump} message DatabaseDump message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseDump.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseDump message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump} DatabaseDump + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseDump.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.databaseType = reader.int32(); + break; + } + case 2: { + message.gcsUri = reader.string(); + break; + } + case 3: { + message.sourceDatabase = reader.string(); + break; + } + case 4: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseDump message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump} DatabaseDump + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseDump.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseDump message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseDump.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.databaseType != null && message.hasOwnProperty("databaseType")) + switch (message.databaseType) { + default: + return "databaseType: enum value expected"; + case 0: + case 1: + break; + } + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) + if (!$util.isString(message.gcsUri)) + return "gcsUri: string expected"; + if (message.sourceDatabase != null && message.hasOwnProperty("sourceDatabase")) + if (!$util.isString(message.sourceDatabase)) + return "sourceDatabase: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a DatabaseDump message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump} DatabaseDump + */ + DatabaseDump.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) + return object; + var message = new $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump(); + switch (object.databaseType) { + default: + if (typeof object.databaseType === "number") { + message.databaseType = object.databaseType; + break; + } + break; + case "DATABASE_TYPE_UNSPECIFIED": + case 0: + message.databaseType = 0; + break; + case "MYSQL": + case 1: + message.databaseType = 1; + break; + } + if (object.gcsUri != null) + message.gcsUri = String(object.gcsUri); + if (object.sourceDatabase != null) + message.sourceDatabase = String(object.sourceDatabase); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "MYSQL": + case 1: + message.type = 1; + break; + case "AVRO": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DatabaseDump message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @static + * @param {google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump} message DatabaseDump + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseDump.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.databaseType = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; + object.gcsUri = ""; + object.sourceDatabase = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.databaseType != null && message.hasOwnProperty("databaseType")) + object.databaseType = options.enums === String ? $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType[message.databaseType] === undefined ? message.databaseType : $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType[message.databaseType] : message.databaseType; + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) + object.gcsUri = message.gcsUri; + if (message.sourceDatabase != null && message.hasOwnProperty("sourceDatabase")) + object.sourceDatabase = message.sourceDatabase; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this DatabaseDump to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @instance + * @returns {Object.} JSON object + */ + DatabaseDump.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseDump + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseDump.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump"; + }; + + /** + * DatabaseType enum. + * @name google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType + * @enum {number} + * @property {number} DATABASE_TYPE_UNSPECIFIED=0 DATABASE_TYPE_UNSPECIFIED value + * @property {number} MYSQL=1 MYSQL value + */ + DatabaseDump.DatabaseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MYSQL"] = 1; + return values; + })(); + + return DatabaseDump; + })(); + + /** + * State enum. + * @name google.cloud.metastore.v1alpha.MetadataImport.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} UPDATING=3 UPDATING value + * @property {number} FAILED=4 FAILED value + */ + MetadataImport.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "FAILED"] = 4; + return values; + })(); + + return MetadataImport; + })(); + + v1alpha.MetadataExport = (function() { + + /** + * Properties of a MetadataExport. + * @memberof google.cloud.metastore.v1alpha + * @interface IMetadataExport + * @property {string|null} [destinationGcsUri] MetadataExport destinationGcsUri + * @property {google.protobuf.ITimestamp|null} [startTime] MetadataExport startTime + * @property {google.protobuf.ITimestamp|null} [endTime] MetadataExport endTime + * @property {google.cloud.metastore.v1alpha.MetadataExport.State|null} [state] MetadataExport state + * @property {google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|null} [databaseDumpType] MetadataExport databaseDumpType + */ + + /** + * Constructs a new MetadataExport. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a MetadataExport. + * @implements IMetadataExport + * @constructor + * @param {google.cloud.metastore.v1alpha.IMetadataExport=} [properties] Properties to set + */ + function MetadataExport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetadataExport destinationGcsUri. + * @member {string|null|undefined} destinationGcsUri + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @instance + */ + MetadataExport.prototype.destinationGcsUri = null; + + /** + * MetadataExport startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @instance + */ + MetadataExport.prototype.startTime = null; + + /** + * MetadataExport endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @instance + */ + MetadataExport.prototype.endTime = null; + + /** + * MetadataExport state. + * @member {google.cloud.metastore.v1alpha.MetadataExport.State} state + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @instance + */ + MetadataExport.prototype.state = 0; + + /** + * MetadataExport databaseDumpType. + * @member {google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type} databaseDumpType + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @instance + */ + MetadataExport.prototype.databaseDumpType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MetadataExport destination. + * @member {"destinationGcsUri"|undefined} destination + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @instance + */ + Object.defineProperty(MetadataExport.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["destinationGcsUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MetadataExport instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @static + * @param {google.cloud.metastore.v1alpha.IMetadataExport=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.MetadataExport} MetadataExport instance + */ + MetadataExport.create = function create(properties) { + return new MetadataExport(properties); + }; + + /** + * Encodes the specified MetadataExport message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataExport.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @static + * @param {google.cloud.metastore.v1alpha.IMetadataExport} message MetadataExport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataExport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.destinationGcsUri != null && Object.hasOwnProperty.call(message, "destinationGcsUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationGcsUri); + if (message.databaseDumpType != null && Object.hasOwnProperty.call(message, "databaseDumpType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.databaseDumpType); + return writer; + }; + + /** + * Encodes the specified MetadataExport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataExport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @static + * @param {google.cloud.metastore.v1alpha.IMetadataExport} message MetadataExport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataExport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetadataExport message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.MetadataExport} MetadataExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataExport.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.MetadataExport(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.destinationGcsUri = reader.string(); + break; + } + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 5: { + message.databaseDumpType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetadataExport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.MetadataExport} MetadataExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataExport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetadataExport message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetadataExport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.destinationGcsUri != null && message.hasOwnProperty("destinationGcsUri")) { + properties.destination = 1; + if (!$util.isString(message.destinationGcsUri)) + return "destinationGcsUri: string expected"; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) + switch (message.databaseDumpType) { + default: + return "databaseDumpType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a MetadataExport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.MetadataExport} MetadataExport + */ + MetadataExport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.MetadataExport) + return object; + var message = new $root.google.cloud.metastore.v1alpha.MetadataExport(); + if (object.destinationGcsUri != null) + message.destinationGcsUri = String(object.destinationGcsUri); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.MetadataExport.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.MetadataExport.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + case "CANCELLED": + case 4: + message.state = 4; + break; + } + switch (object.databaseDumpType) { + default: + if (typeof object.databaseDumpType === "number") { + message.databaseDumpType = object.databaseDumpType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.databaseDumpType = 0; + break; + case "MYSQL": + case 1: + message.databaseDumpType = 1; + break; + case "AVRO": + case 2: + message.databaseDumpType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a MetadataExport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @static + * @param {google.cloud.metastore.v1alpha.MetadataExport} message MetadataExport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetadataExport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.databaseDumpType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1alpha.MetadataExport.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1alpha.MetadataExport.State[message.state] : message.state; + if (message.destinationGcsUri != null && message.hasOwnProperty("destinationGcsUri")) { + object.destinationGcsUri = message.destinationGcsUri; + if (options.oneofs) + object.destination = "destinationGcsUri"; + } + if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) + object.databaseDumpType = options.enums === String ? $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type[message.databaseDumpType] === undefined ? message.databaseDumpType : $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type[message.databaseDumpType] : message.databaseDumpType; + return object; + }; + + /** + * Converts this MetadataExport to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @instance + * @returns {Object.} JSON object + */ + MetadataExport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetadataExport + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetadataExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.MetadataExport"; + }; + + /** + * State enum. + * @name google.cloud.metastore.v1alpha.MetadataExport.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} CANCELLED=4 CANCELLED value + */ + MetadataExport.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "CANCELLED"] = 4; + return values; + })(); + + return MetadataExport; + })(); + + v1alpha.Backup = (function() { + + /** + * Properties of a Backup. + * @memberof google.cloud.metastore.v1alpha + * @interface IBackup + * @property {string|null} [name] Backup name + * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime + * @property {google.protobuf.ITimestamp|null} [endTime] Backup endTime + * @property {google.cloud.metastore.v1alpha.Backup.State|null} [state] Backup state + * @property {google.cloud.metastore.v1alpha.IService|null} [serviceRevision] Backup serviceRevision + * @property {string|null} [description] Backup description + * @property {Array.|null} [restoringServices] Backup restoringServices + */ + + /** + * Constructs a new Backup. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a Backup. + * @implements IBackup + * @constructor + * @param {google.cloud.metastore.v1alpha.IBackup=} [properties] Properties to set + */ + function Backup(properties) { + this.restoringServices = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Backup name. + * @member {string} name + * @memberof google.cloud.metastore.v1alpha.Backup + * @instance + */ + Backup.prototype.name = ""; + + /** + * Backup createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.metastore.v1alpha.Backup + * @instance + */ + Backup.prototype.createTime = null; + + /** + * Backup endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1alpha.Backup + * @instance + */ + Backup.prototype.endTime = null; + + /** + * Backup state. + * @member {google.cloud.metastore.v1alpha.Backup.State} state + * @memberof google.cloud.metastore.v1alpha.Backup + * @instance + */ + Backup.prototype.state = 0; + + /** + * Backup serviceRevision. + * @member {google.cloud.metastore.v1alpha.IService|null|undefined} serviceRevision + * @memberof google.cloud.metastore.v1alpha.Backup + * @instance + */ + Backup.prototype.serviceRevision = null; + + /** + * Backup description. + * @member {string} description + * @memberof google.cloud.metastore.v1alpha.Backup + * @instance + */ + Backup.prototype.description = ""; + + /** + * Backup restoringServices. + * @member {Array.} restoringServices + * @memberof google.cloud.metastore.v1alpha.Backup + * @instance + */ + Backup.prototype.restoringServices = $util.emptyArray; + + /** + * Creates a new Backup instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.Backup + * @static + * @param {google.cloud.metastore.v1alpha.IBackup=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.Backup} Backup instance + */ + Backup.create = function create(properties) { + return new Backup(properties); + }; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.metastore.v1alpha.Backup.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.Backup + * @static + * @param {google.cloud.metastore.v1alpha.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.serviceRevision != null && Object.hasOwnProperty.call(message, "serviceRevision")) + $root.google.cloud.metastore.v1alpha.Service.encode(message.serviceRevision, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.restoringServices != null && message.restoringServices.length) + for (var i = 0; i < message.restoringServices.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.restoringServices[i]); + return writer; + }; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Backup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.Backup + * @static + * @param {google.cloud.metastore.v1alpha.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.Backup(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.serviceRevision = $root.google.cloud.metastore.v1alpha.Service.decode(reader, reader.uint32()); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + if (!(message.restoringServices && message.restoringServices.length)) + message.restoringServices = []; + message.restoringServices.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Backup message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.Backup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Backup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.serviceRevision != null && message.hasOwnProperty("serviceRevision")) { + var error = $root.google.cloud.metastore.v1alpha.Service.verify(message.serviceRevision); + if (error) + return "serviceRevision." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.restoringServices != null && message.hasOwnProperty("restoringServices")) { + if (!Array.isArray(message.restoringServices)) + return "restoringServices: array expected"; + for (var i = 0; i < message.restoringServices.length; ++i) + if (!$util.isString(message.restoringServices[i])) + return "restoringServices: string[] expected"; + } + return null; + }; + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.Backup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.Backup} Backup + */ + Backup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.Backup) + return object; + var message = new $root.google.cloud.metastore.v1alpha.Backup(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Backup.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Backup.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "DELETING": + case 2: + message.state = 2; + break; + case "ACTIVE": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "RESTORING": + case 5: + message.state = 5; + break; + } + if (object.serviceRevision != null) { + if (typeof object.serviceRevision !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Backup.serviceRevision: object expected"); + message.serviceRevision = $root.google.cloud.metastore.v1alpha.Service.fromObject(object.serviceRevision); + } + if (object.description != null) + message.description = String(object.description); + if (object.restoringServices) { + if (!Array.isArray(object.restoringServices)) + throw TypeError(".google.cloud.metastore.v1alpha.Backup.restoringServices: array expected"); + message.restoringServices = []; + for (var i = 0; i < object.restoringServices.length; ++i) + message.restoringServices[i] = String(object.restoringServices[i]); + } + return message; + }; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.Backup + * @static + * @param {google.cloud.metastore.v1alpha.Backup} message Backup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Backup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.restoringServices = []; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.serviceRevision = null; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1alpha.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1alpha.Backup.State[message.state] : message.state; + if (message.serviceRevision != null && message.hasOwnProperty("serviceRevision")) + object.serviceRevision = $root.google.cloud.metastore.v1alpha.Service.toObject(message.serviceRevision, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.restoringServices && message.restoringServices.length) { + object.restoringServices = []; + for (var j = 0; j < message.restoringServices.length; ++j) + object.restoringServices[j] = message.restoringServices[j]; + } + return object; + }; + + /** + * Converts this Backup to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.Backup + * @instance + * @returns {Object.} JSON object + */ + Backup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Backup + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.Backup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.Backup"; + }; + + /** + * State enum. + * @name google.cloud.metastore.v1alpha.Backup.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} DELETING=2 DELETING value + * @property {number} ACTIVE=3 ACTIVE value + * @property {number} FAILED=4 FAILED value + * @property {number} RESTORING=5 RESTORING value + */ + Backup.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "DELETING"] = 2; + values[valuesById[3] = "ACTIVE"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "RESTORING"] = 5; + return values; + })(); + + return Backup; + })(); + + v1alpha.Restore = (function() { + + /** + * Properties of a Restore. + * @memberof google.cloud.metastore.v1alpha + * @interface IRestore + * @property {google.protobuf.ITimestamp|null} [startTime] Restore startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Restore endTime + * @property {google.cloud.metastore.v1alpha.Restore.State|null} [state] Restore state + * @property {string|null} [backup] Restore backup + * @property {google.cloud.metastore.v1alpha.Restore.RestoreType|null} [type] Restore type + * @property {string|null} [details] Restore details + */ + + /** + * Constructs a new Restore. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a Restore. + * @implements IRestore + * @constructor + * @param {google.cloud.metastore.v1alpha.IRestore=} [properties] Properties to set + */ + function Restore(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Restore startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.metastore.v1alpha.Restore + * @instance + */ + Restore.prototype.startTime = null; + + /** + * Restore endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1alpha.Restore + * @instance + */ + Restore.prototype.endTime = null; + + /** + * Restore state. + * @member {google.cloud.metastore.v1alpha.Restore.State} state + * @memberof google.cloud.metastore.v1alpha.Restore + * @instance + */ + Restore.prototype.state = 0; + + /** + * Restore backup. + * @member {string} backup + * @memberof google.cloud.metastore.v1alpha.Restore + * @instance + */ + Restore.prototype.backup = ""; + + /** + * Restore type. + * @member {google.cloud.metastore.v1alpha.Restore.RestoreType} type + * @memberof google.cloud.metastore.v1alpha.Restore + * @instance + */ + Restore.prototype.type = 0; + + /** + * Restore details. + * @member {string} details + * @memberof google.cloud.metastore.v1alpha.Restore + * @instance + */ + Restore.prototype.details = ""; + + /** + * Creates a new Restore instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.Restore + * @static + * @param {google.cloud.metastore.v1alpha.IRestore=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.Restore} Restore instance + */ + Restore.create = function create(properties) { + return new Restore(properties); + }; + + /** + * Encodes the specified Restore message. Does not implicitly {@link google.cloud.metastore.v1alpha.Restore.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.Restore + * @static + * @param {google.cloud.metastore.v1alpha.IRestore} message Restore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Restore.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.backup); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.details); + return writer; + }; + + /** + * Encodes the specified Restore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Restore.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.Restore + * @static + * @param {google.cloud.metastore.v1alpha.IRestore} message Restore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Restore.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Restore message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.Restore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.Restore} Restore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Restore.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.Restore(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.backup = reader.string(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.details = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Restore message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.Restore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.Restore} Restore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Restore.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Restore message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.Restore + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Restore.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.backup != null && message.hasOwnProperty("backup")) + if (!$util.isString(message.backup)) + return "backup: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.details != null && message.hasOwnProperty("details")) + if (!$util.isString(message.details)) + return "details: string expected"; + return null; + }; + + /** + * Creates a Restore message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.Restore + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.Restore} Restore + */ + Restore.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.Restore) + return object; + var message = new $root.google.cloud.metastore.v1alpha.Restore(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Restore.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Restore.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + case "CANCELLED": + case 4: + message.state = 4; + break; + } + if (object.backup != null) + message.backup = String(object.backup); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "RESTORE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "FULL": + case 1: + message.type = 1; + break; + case "METADATA_ONLY": + case 2: + message.type = 2; + break; + } + if (object.details != null) + message.details = String(object.details); + return message; + }; + + /** + * Creates a plain object from a Restore message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.Restore + * @static + * @param {google.cloud.metastore.v1alpha.Restore} message Restore + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Restore.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.backup = ""; + object.type = options.enums === String ? "RESTORE_TYPE_UNSPECIFIED" : 0; + object.details = ""; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1alpha.Restore.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1alpha.Restore.State[message.state] : message.state; + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = message.backup; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.metastore.v1alpha.Restore.RestoreType[message.type] === undefined ? message.type : $root.google.cloud.metastore.v1alpha.Restore.RestoreType[message.type] : message.type; + if (message.details != null && message.hasOwnProperty("details")) + object.details = message.details; + return object; + }; + + /** + * Converts this Restore to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.Restore + * @instance + * @returns {Object.} JSON object + */ + Restore.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Restore + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.Restore + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Restore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.Restore"; + }; + + /** + * State enum. + * @name google.cloud.metastore.v1alpha.Restore.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} CANCELLED=4 CANCELLED value + */ + Restore.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "CANCELLED"] = 4; + return values; + })(); + + /** + * RestoreType enum. + * @name google.cloud.metastore.v1alpha.Restore.RestoreType + * @enum {number} + * @property {number} RESTORE_TYPE_UNSPECIFIED=0 RESTORE_TYPE_UNSPECIFIED value + * @property {number} FULL=1 FULL value + * @property {number} METADATA_ONLY=2 METADATA_ONLY value + */ + Restore.RestoreType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTORE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FULL"] = 1; + values[valuesById[2] = "METADATA_ONLY"] = 2; + return values; + })(); + + return Restore; + })(); + + v1alpha.ListServicesRequest = (function() { + + /** + * Properties of a ListServicesRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface IListServicesRequest + * @property {string|null} [parent] ListServicesRequest parent + * @property {number|null} [pageSize] ListServicesRequest pageSize + * @property {string|null} [pageToken] ListServicesRequest pageToken + * @property {string|null} [filter] ListServicesRequest filter + * @property {string|null} [orderBy] ListServicesRequest orderBy + */ + + /** + * Constructs a new ListServicesRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a ListServicesRequest. + * @implements IListServicesRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.IListServicesRequest=} [properties] Properties to set + */ + function ListServicesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListServicesRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.parent = ""; + + /** + * ListServicesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.pageSize = 0; + + /** + * ListServicesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.pageToken = ""; + + /** + * ListServicesRequest filter. + * @member {string} filter + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.filter = ""; + + /** + * ListServicesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListServicesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @static + * @param {google.cloud.metastore.v1alpha.IListServicesRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.ListServicesRequest} ListServicesRequest instance + */ + ListServicesRequest.create = function create(properties) { + return new ListServicesRequest(properties); + }; + + /** + * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @static + * @param {google.cloud.metastore.v1alpha.IListServicesRequest} message ListServicesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServicesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @static + * @param {google.cloud.metastore.v1alpha.IListServicesRequest} message ListServicesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServicesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServicesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.ListServicesRequest} ListServicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServicesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ListServicesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.ListServicesRequest} ListServicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServicesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServicesRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServicesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.ListServicesRequest} ListServicesRequest + */ + ListServicesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.ListServicesRequest) + return object; + var message = new $root.google.cloud.metastore.v1alpha.ListServicesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @static + * @param {google.cloud.metastore.v1alpha.ListServicesRequest} message ListServicesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServicesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListServicesRequest to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @instance + * @returns {Object.} JSON object + */ + ListServicesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListServicesRequest + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListServicesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ListServicesRequest"; + }; + + return ListServicesRequest; + })(); + + v1alpha.ListServicesResponse = (function() { + + /** + * Properties of a ListServicesResponse. + * @memberof google.cloud.metastore.v1alpha + * @interface IListServicesResponse + * @property {Array.|null} [services] ListServicesResponse services + * @property {string|null} [nextPageToken] ListServicesResponse nextPageToken + * @property {Array.|null} [unreachable] ListServicesResponse unreachable + */ + + /** + * Constructs a new ListServicesResponse. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a ListServicesResponse. + * @implements IListServicesResponse + * @constructor + * @param {google.cloud.metastore.v1alpha.IListServicesResponse=} [properties] Properties to set + */ + function ListServicesResponse(properties) { + this.services = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListServicesResponse services. + * @member {Array.} services + * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @instance + */ + ListServicesResponse.prototype.services = $util.emptyArray; + + /** + * ListServicesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @instance + */ + ListServicesResponse.prototype.nextPageToken = ""; + + /** + * ListServicesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @instance + */ + ListServicesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListServicesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @static + * @param {google.cloud.metastore.v1alpha.IListServicesResponse=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.ListServicesResponse} ListServicesResponse instance + */ + ListServicesResponse.create = function create(properties) { + return new ListServicesResponse(properties); + }; + + /** + * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @static + * @param {google.cloud.metastore.v1alpha.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServicesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.services != null && message.services.length) + for (var i = 0; i < message.services.length; ++i) + $root.google.cloud.metastore.v1alpha.Service.encode(message.services[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @static + * @param {google.cloud.metastore.v1alpha.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServicesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServicesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.ListServicesResponse} ListServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServicesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ListServicesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.services && message.services.length)) + message.services = []; + message.services.push($root.google.cloud.metastore.v1alpha.Service.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.ListServicesResponse} ListServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServicesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServicesResponse message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServicesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.services != null && message.hasOwnProperty("services")) { + if (!Array.isArray(message.services)) + return "services: array expected"; + for (var i = 0; i < message.services.length; ++i) { + var error = $root.google.cloud.metastore.v1alpha.Service.verify(message.services[i]); + if (error) + return "services." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.ListServicesResponse} ListServicesResponse + */ + ListServicesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.ListServicesResponse) + return object; + var message = new $root.google.cloud.metastore.v1alpha.ListServicesResponse(); + if (object.services) { + if (!Array.isArray(object.services)) + throw TypeError(".google.cloud.metastore.v1alpha.ListServicesResponse.services: array expected"); + message.services = []; + for (var i = 0; i < object.services.length; ++i) { + if (typeof object.services[i] !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.ListServicesResponse.services: object expected"); + message.services[i] = $root.google.cloud.metastore.v1alpha.Service.fromObject(object.services[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.metastore.v1alpha.ListServicesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @static + * @param {google.cloud.metastore.v1alpha.ListServicesResponse} message ListServicesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServicesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.services = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.services && message.services.length) { + object.services = []; + for (var j = 0; j < message.services.length; ++j) + object.services[j] = $root.google.cloud.metastore.v1alpha.Service.toObject(message.services[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListServicesResponse to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @instance + * @returns {Object.} JSON object + */ + ListServicesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListServicesResponse + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListServicesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ListServicesResponse"; + }; + + return ListServicesResponse; + })(); + + v1alpha.GetServiceRequest = (function() { + + /** + * Properties of a GetServiceRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface IGetServiceRequest + * @property {string|null} [name] GetServiceRequest name + */ + + /** + * Constructs a new GetServiceRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a GetServiceRequest. + * @implements IGetServiceRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.IGetServiceRequest=} [properties] Properties to set + */ + function GetServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetServiceRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @instance + */ + GetServiceRequest.prototype.name = ""; + + /** + * Creates a new GetServiceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.IGetServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.GetServiceRequest} GetServiceRequest instance + */ + GetServiceRequest.create = function create(properties) { + return new GetServiceRequest(properties); + }; + + /** + * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.GetServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.IGetServiceRequest} message GetServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.GetServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.IGetServiceRequest} message GetServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.GetServiceRequest} GetServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.GetServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.GetServiceRequest} GetServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetServiceRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.GetServiceRequest} GetServiceRequest + */ + GetServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.GetServiceRequest) + return object; + var message = new $root.google.cloud.metastore.v1alpha.GetServiceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.GetServiceRequest} message GetServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetServiceRequest to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @instance + * @returns {Object.} JSON object + */ + GetServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetServiceRequest + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.GetServiceRequest"; + }; + + return GetServiceRequest; + })(); + + v1alpha.CreateServiceRequest = (function() { + + /** + * Properties of a CreateServiceRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface ICreateServiceRequest + * @property {string|null} [parent] CreateServiceRequest parent + * @property {string|null} [serviceId] CreateServiceRequest serviceId + * @property {google.cloud.metastore.v1alpha.IService|null} [service] CreateServiceRequest service + * @property {string|null} [requestId] CreateServiceRequest requestId + */ + + /** + * Constructs a new CreateServiceRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a CreateServiceRequest. + * @implements ICreateServiceRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.ICreateServiceRequest=} [properties] Properties to set + */ + function CreateServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateServiceRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @instance + */ + CreateServiceRequest.prototype.parent = ""; + + /** + * CreateServiceRequest serviceId. + * @member {string} serviceId + * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @instance + */ + CreateServiceRequest.prototype.serviceId = ""; + + /** + * CreateServiceRequest service. + * @member {google.cloud.metastore.v1alpha.IService|null|undefined} service + * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @instance + */ + CreateServiceRequest.prototype.service = null; + + /** + * CreateServiceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @instance + */ + CreateServiceRequest.prototype.requestId = ""; + + /** + * Creates a new CreateServiceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.ICreateServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.CreateServiceRequest} CreateServiceRequest instance + */ + CreateServiceRequest.create = function create(properties) { + return new CreateServiceRequest(properties); + }; + + /** + * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.serviceId != null && Object.hasOwnProperty.call(message, "serviceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceId); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + $root.google.cloud.metastore.v1alpha.Service.encode(message.service, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.CreateServiceRequest} CreateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.CreateServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.serviceId = reader.string(); + break; + } + case 3: { + message.service = $root.google.cloud.metastore.v1alpha.Service.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.CreateServiceRequest} CreateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateServiceRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.serviceId != null && message.hasOwnProperty("serviceId")) + if (!$util.isString(message.serviceId)) + return "serviceId: string expected"; + if (message.service != null && message.hasOwnProperty("service")) { + var error = $root.google.cloud.metastore.v1alpha.Service.verify(message.service); + if (error) + return "service." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.CreateServiceRequest} CreateServiceRequest + */ + CreateServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.CreateServiceRequest) + return object; + var message = new $root.google.cloud.metastore.v1alpha.CreateServiceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.serviceId != null) + message.serviceId = String(object.serviceId); + if (object.service != null) { + if (typeof object.service !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.CreateServiceRequest.service: object expected"); + message.service = $root.google.cloud.metastore.v1alpha.Service.fromObject(object.service); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.CreateServiceRequest} message CreateServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.serviceId = ""; + object.service = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.serviceId != null && message.hasOwnProperty("serviceId")) + object.serviceId = message.serviceId; + if (message.service != null && message.hasOwnProperty("service")) + object.service = $root.google.cloud.metastore.v1alpha.Service.toObject(message.service, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateServiceRequest to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @instance + * @returns {Object.} JSON object + */ + CreateServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateServiceRequest + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.CreateServiceRequest"; + }; + + return CreateServiceRequest; + })(); + + v1alpha.UpdateServiceRequest = (function() { + + /** + * Properties of an UpdateServiceRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface IUpdateServiceRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateServiceRequest updateMask + * @property {google.cloud.metastore.v1alpha.IService|null} [service] UpdateServiceRequest service + * @property {string|null} [requestId] UpdateServiceRequest requestId + */ + + /** + * Constructs a new UpdateServiceRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents an UpdateServiceRequest. + * @implements IUpdateServiceRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.IUpdateServiceRequest=} [properties] Properties to set + */ + function UpdateServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateServiceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest + * @instance + */ + UpdateServiceRequest.prototype.updateMask = null; + + /** + * UpdateServiceRequest service. + * @member {google.cloud.metastore.v1alpha.IService|null|undefined} service + * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest + * @instance + */ + UpdateServiceRequest.prototype.service = null; + + /** + * UpdateServiceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest + * @instance + */ + UpdateServiceRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateServiceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.IUpdateServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.UpdateServiceRequest} UpdateServiceRequest instance + */ + UpdateServiceRequest.create = function create(properties) { + return new UpdateServiceRequest(properties); + }; + + /** + * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + $root.google.cloud.metastore.v1alpha.Service.encode(message.service, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.UpdateServiceRequest} UpdateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.UpdateServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.service = $root.google.cloud.metastore.v1alpha.Service.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.UpdateServiceRequest} UpdateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateServiceRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.service != null && message.hasOwnProperty("service")) { + var error = $root.google.cloud.metastore.v1alpha.Service.verify(message.service); + if (error) + return "service." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.UpdateServiceRequest} UpdateServiceRequest + */ + UpdateServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.UpdateServiceRequest) + return object; + var message = new $root.google.cloud.metastore.v1alpha.UpdateServiceRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.UpdateServiceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.service != null) { + if (typeof object.service !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.UpdateServiceRequest.service: object expected"); + message.service = $root.google.cloud.metastore.v1alpha.Service.fromObject(object.service); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.UpdateServiceRequest} message UpdateServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.service = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.service != null && message.hasOwnProperty("service")) + object.service = $root.google.cloud.metastore.v1alpha.Service.toObject(message.service, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateServiceRequest to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateServiceRequest + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.UpdateServiceRequest"; + }; + + return UpdateServiceRequest; + })(); + + v1alpha.DeleteServiceRequest = (function() { + + /** + * Properties of a DeleteServiceRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface IDeleteServiceRequest + * @property {string|null} [name] DeleteServiceRequest name + * @property {string|null} [requestId] DeleteServiceRequest requestId + */ + + /** + * Constructs a new DeleteServiceRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a DeleteServiceRequest. + * @implements IDeleteServiceRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.IDeleteServiceRequest=} [properties] Properties to set + */ + function DeleteServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteServiceRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @instance + */ + DeleteServiceRequest.prototype.name = ""; + + /** + * DeleteServiceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @instance + */ + DeleteServiceRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteServiceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.IDeleteServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.DeleteServiceRequest} DeleteServiceRequest instance + */ + DeleteServiceRequest.create = function create(properties) { + return new DeleteServiceRequest(properties); + }; + + /** + * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.DeleteServiceRequest} DeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.DeleteServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.DeleteServiceRequest} DeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteServiceRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.DeleteServiceRequest} DeleteServiceRequest + */ + DeleteServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.DeleteServiceRequest) + return object; + var message = new $root.google.cloud.metastore.v1alpha.DeleteServiceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.DeleteServiceRequest} message DeleteServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DeleteServiceRequest to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteServiceRequest + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.DeleteServiceRequest"; + }; + + return DeleteServiceRequest; + })(); + + v1alpha.ListMetadataImportsRequest = (function() { + + /** + * Properties of a ListMetadataImportsRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface IListMetadataImportsRequest + * @property {string|null} [parent] ListMetadataImportsRequest parent + * @property {number|null} [pageSize] ListMetadataImportsRequest pageSize + * @property {string|null} [pageToken] ListMetadataImportsRequest pageToken + * @property {string|null} [filter] ListMetadataImportsRequest filter + * @property {string|null} [orderBy] ListMetadataImportsRequest orderBy + */ + + /** + * Constructs a new ListMetadataImportsRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a ListMetadataImportsRequest. + * @implements IListMetadataImportsRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.IListMetadataImportsRequest=} [properties] Properties to set + */ + function ListMetadataImportsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMetadataImportsRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @instance + */ + ListMetadataImportsRequest.prototype.parent = ""; + + /** + * ListMetadataImportsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @instance + */ + ListMetadataImportsRequest.prototype.pageSize = 0; + + /** + * ListMetadataImportsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @instance + */ + ListMetadataImportsRequest.prototype.pageToken = ""; + + /** + * ListMetadataImportsRequest filter. + * @member {string} filter + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @instance + */ + ListMetadataImportsRequest.prototype.filter = ""; + + /** + * ListMetadataImportsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @instance + */ + ListMetadataImportsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListMetadataImportsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @static + * @param {google.cloud.metastore.v1alpha.IListMetadataImportsRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsRequest} ListMetadataImportsRequest instance + */ + ListMetadataImportsRequest.create = function create(properties) { + return new ListMetadataImportsRequest(properties); + }; + + /** + * Encodes the specified ListMetadataImportsRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @static + * @param {google.cloud.metastore.v1alpha.IListMetadataImportsRequest} message ListMetadataImportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetadataImportsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListMetadataImportsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @static + * @param {google.cloud.metastore.v1alpha.IListMetadataImportsRequest} message ListMetadataImportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetadataImportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMetadataImportsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsRequest} ListMetadataImportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetadataImportsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ListMetadataImportsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMetadataImportsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsRequest} ListMetadataImportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetadataImportsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMetadataImportsRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMetadataImportsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListMetadataImportsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsRequest} ListMetadataImportsRequest + */ + ListMetadataImportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.ListMetadataImportsRequest) + return object; + var message = new $root.google.cloud.metastore.v1alpha.ListMetadataImportsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListMetadataImportsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @static + * @param {google.cloud.metastore.v1alpha.ListMetadataImportsRequest} message ListMetadataImportsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMetadataImportsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListMetadataImportsRequest to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMetadataImportsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMetadataImportsRequest + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMetadataImportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ListMetadataImportsRequest"; + }; + + return ListMetadataImportsRequest; + })(); + + v1alpha.ListMetadataImportsResponse = (function() { + + /** + * Properties of a ListMetadataImportsResponse. + * @memberof google.cloud.metastore.v1alpha + * @interface IListMetadataImportsResponse + * @property {Array.|null} [metadataImports] ListMetadataImportsResponse metadataImports + * @property {string|null} [nextPageToken] ListMetadataImportsResponse nextPageToken + * @property {Array.|null} [unreachable] ListMetadataImportsResponse unreachable + */ + + /** + * Constructs a new ListMetadataImportsResponse. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a ListMetadataImportsResponse. + * @implements IListMetadataImportsResponse + * @constructor + * @param {google.cloud.metastore.v1alpha.IListMetadataImportsResponse=} [properties] Properties to set + */ + function ListMetadataImportsResponse(properties) { + this.metadataImports = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMetadataImportsResponse metadataImports. + * @member {Array.} metadataImports + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * @instance + */ + ListMetadataImportsResponse.prototype.metadataImports = $util.emptyArray; + + /** + * ListMetadataImportsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * @instance + */ + ListMetadataImportsResponse.prototype.nextPageToken = ""; + + /** + * ListMetadataImportsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * @instance + */ + ListMetadataImportsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListMetadataImportsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * @static + * @param {google.cloud.metastore.v1alpha.IListMetadataImportsResponse=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsResponse} ListMetadataImportsResponse instance + */ + ListMetadataImportsResponse.create = function create(properties) { + return new ListMetadataImportsResponse(properties); + }; + + /** + * Encodes the specified ListMetadataImportsResponse message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * @static + * @param {google.cloud.metastore.v1alpha.IListMetadataImportsResponse} message ListMetadataImportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetadataImportsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadataImports != null && message.metadataImports.length) + for (var i = 0; i < message.metadataImports.length; ++i) + $root.google.cloud.metastore.v1alpha.MetadataImport.encode(message.metadataImports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListMetadataImportsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * @static + * @param {google.cloud.metastore.v1alpha.IListMetadataImportsResponse} message ListMetadataImportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetadataImportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMetadataImportsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsResponse} ListMetadataImportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetadataImportsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ListMetadataImportsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.metadataImports && message.metadataImports.length)) + message.metadataImports = []; + message.metadataImports.push($root.google.cloud.metastore.v1alpha.MetadataImport.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMetadataImportsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsResponse} ListMetadataImportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetadataImportsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMetadataImportsResponse message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMetadataImportsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadataImports != null && message.hasOwnProperty("metadataImports")) { + if (!Array.isArray(message.metadataImports)) + return "metadataImports: array expected"; + for (var i = 0; i < message.metadataImports.length; ++i) { + var error = $root.google.cloud.metastore.v1alpha.MetadataImport.verify(message.metadataImports[i]); + if (error) + return "metadataImports." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListMetadataImportsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsResponse} ListMetadataImportsResponse + */ + ListMetadataImportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.ListMetadataImportsResponse) + return object; + var message = new $root.google.cloud.metastore.v1alpha.ListMetadataImportsResponse(); + if (object.metadataImports) { + if (!Array.isArray(object.metadataImports)) + throw TypeError(".google.cloud.metastore.v1alpha.ListMetadataImportsResponse.metadataImports: array expected"); + message.metadataImports = []; + for (var i = 0; i < object.metadataImports.length; ++i) { + if (typeof object.metadataImports[i] !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.ListMetadataImportsResponse.metadataImports: object expected"); + message.metadataImports[i] = $root.google.cloud.metastore.v1alpha.MetadataImport.fromObject(object.metadataImports[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.metastore.v1alpha.ListMetadataImportsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListMetadataImportsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * @static + * @param {google.cloud.metastore.v1alpha.ListMetadataImportsResponse} message ListMetadataImportsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMetadataImportsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.metadataImports = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.metadataImports && message.metadataImports.length) { + object.metadataImports = []; + for (var j = 0; j < message.metadataImports.length; ++j) + object.metadataImports[j] = $root.google.cloud.metastore.v1alpha.MetadataImport.toObject(message.metadataImports[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListMetadataImportsResponse to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMetadataImportsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMetadataImportsResponse + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMetadataImportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ListMetadataImportsResponse"; + }; + + return ListMetadataImportsResponse; + })(); + + v1alpha.GetMetadataImportRequest = (function() { + + /** + * Properties of a GetMetadataImportRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface IGetMetadataImportRequest + * @property {string|null} [name] GetMetadataImportRequest name + */ + + /** + * Constructs a new GetMetadataImportRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a GetMetadataImportRequest. + * @implements IGetMetadataImportRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.IGetMetadataImportRequest=} [properties] Properties to set + */ + function GetMetadataImportRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetMetadataImportRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest + * @instance + */ + GetMetadataImportRequest.prototype.name = ""; + + /** + * Creates a new GetMetadataImportRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest + * @static + * @param {google.cloud.metastore.v1alpha.IGetMetadataImportRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.GetMetadataImportRequest} GetMetadataImportRequest instance + */ + GetMetadataImportRequest.create = function create(properties) { + return new GetMetadataImportRequest(properties); + }; + + /** + * Encodes the specified GetMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.GetMetadataImportRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest + * @static + * @param {google.cloud.metastore.v1alpha.IGetMetadataImportRequest} message GetMetadataImportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMetadataImportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.GetMetadataImportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest + * @static + * @param {google.cloud.metastore.v1alpha.IGetMetadataImportRequest} message GetMetadataImportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMetadataImportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.GetMetadataImportRequest} GetMetadataImportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetadataImportRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.GetMetadataImportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMetadataImportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.GetMetadataImportRequest} GetMetadataImportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMetadataImportRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMetadataImportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.GetMetadataImportRequest} GetMetadataImportRequest + */ + GetMetadataImportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.GetMetadataImportRequest) + return object; + var message = new $root.google.cloud.metastore.v1alpha.GetMetadataImportRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMetadataImportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest + * @static + * @param {google.cloud.metastore.v1alpha.GetMetadataImportRequest} message GetMetadataImportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMetadataImportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetMetadataImportRequest to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest + * @instance + * @returns {Object.} JSON object + */ + GetMetadataImportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMetadataImportRequest + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.GetMetadataImportRequest"; + }; + + return GetMetadataImportRequest; + })(); + + v1alpha.CreateMetadataImportRequest = (function() { + + /** + * Properties of a CreateMetadataImportRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface ICreateMetadataImportRequest + * @property {string|null} [parent] CreateMetadataImportRequest parent + * @property {string|null} [metadataImportId] CreateMetadataImportRequest metadataImportId + * @property {google.cloud.metastore.v1alpha.IMetadataImport|null} [metadataImport] CreateMetadataImportRequest metadataImport + * @property {string|null} [requestId] CreateMetadataImportRequest requestId + */ + + /** + * Constructs a new CreateMetadataImportRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a CreateMetadataImportRequest. + * @implements ICreateMetadataImportRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.ICreateMetadataImportRequest=} [properties] Properties to set + */ + function CreateMetadataImportRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateMetadataImportRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * @instance + */ + CreateMetadataImportRequest.prototype.parent = ""; + + /** + * CreateMetadataImportRequest metadataImportId. + * @member {string} metadataImportId + * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * @instance + */ + CreateMetadataImportRequest.prototype.metadataImportId = ""; + + /** + * CreateMetadataImportRequest metadataImport. + * @member {google.cloud.metastore.v1alpha.IMetadataImport|null|undefined} metadataImport + * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * @instance + */ + CreateMetadataImportRequest.prototype.metadataImport = null; + + /** + * CreateMetadataImportRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * @instance + */ + CreateMetadataImportRequest.prototype.requestId = ""; + + /** + * Creates a new CreateMetadataImportRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * @static + * @param {google.cloud.metastore.v1alpha.ICreateMetadataImportRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.CreateMetadataImportRequest} CreateMetadataImportRequest instance + */ + CreateMetadataImportRequest.create = function create(properties) { + return new CreateMetadataImportRequest(properties); + }; + + /** + * Encodes the specified CreateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateMetadataImportRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * @static + * @param {google.cloud.metastore.v1alpha.ICreateMetadataImportRequest} message CreateMetadataImportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMetadataImportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.metadataImportId != null && Object.hasOwnProperty.call(message, "metadataImportId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataImportId); + if (message.metadataImport != null && Object.hasOwnProperty.call(message, "metadataImport")) + $root.google.cloud.metastore.v1alpha.MetadataImport.encode(message.metadataImport, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateMetadataImportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * @static + * @param {google.cloud.metastore.v1alpha.ICreateMetadataImportRequest} message CreateMetadataImportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateMetadataImportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.CreateMetadataImportRequest} CreateMetadataImportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMetadataImportRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.CreateMetadataImportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.metadataImportId = reader.string(); + break; + } + case 3: { + message.metadataImport = $root.google.cloud.metastore.v1alpha.MetadataImport.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateMetadataImportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.CreateMetadataImportRequest} CreateMetadataImportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateMetadataImportRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateMetadataImportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.metadataImportId != null && message.hasOwnProperty("metadataImportId")) + if (!$util.isString(message.metadataImportId)) + return "metadataImportId: string expected"; + if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) { + var error = $root.google.cloud.metastore.v1alpha.MetadataImport.verify(message.metadataImport); + if (error) + return "metadataImport." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.CreateMetadataImportRequest} CreateMetadataImportRequest + */ + CreateMetadataImportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.CreateMetadataImportRequest) + return object; + var message = new $root.google.cloud.metastore.v1alpha.CreateMetadataImportRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.metadataImportId != null) + message.metadataImportId = String(object.metadataImportId); + if (object.metadataImport != null) { + if (typeof object.metadataImport !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.CreateMetadataImportRequest.metadataImport: object expected"); + message.metadataImport = $root.google.cloud.metastore.v1alpha.MetadataImport.fromObject(object.metadataImport); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateMetadataImportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * @static + * @param {google.cloud.metastore.v1alpha.CreateMetadataImportRequest} message CreateMetadataImportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateMetadataImportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.metadataImportId = ""; + object.metadataImport = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.metadataImportId != null && message.hasOwnProperty("metadataImportId")) + object.metadataImportId = message.metadataImportId; + if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) + object.metadataImport = $root.google.cloud.metastore.v1alpha.MetadataImport.toObject(message.metadataImport, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateMetadataImportRequest to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * @instance + * @returns {Object.} JSON object + */ + CreateMetadataImportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateMetadataImportRequest + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.CreateMetadataImportRequest"; + }; + + return CreateMetadataImportRequest; + })(); + + v1alpha.UpdateMetadataImportRequest = (function() { + + /** + * Properties of an UpdateMetadataImportRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface IUpdateMetadataImportRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMetadataImportRequest updateMask + * @property {google.cloud.metastore.v1alpha.IMetadataImport|null} [metadataImport] UpdateMetadataImportRequest metadataImport + * @property {string|null} [requestId] UpdateMetadataImportRequest requestId + */ + + /** + * Constructs a new UpdateMetadataImportRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents an UpdateMetadataImportRequest. + * @implements IUpdateMetadataImportRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest=} [properties] Properties to set + */ + function UpdateMetadataImportRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateMetadataImportRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @instance + */ + UpdateMetadataImportRequest.prototype.updateMask = null; + + /** + * UpdateMetadataImportRequest metadataImport. + * @member {google.cloud.metastore.v1alpha.IMetadataImport|null|undefined} metadataImport + * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @instance + */ + UpdateMetadataImportRequest.prototype.metadataImport = null; + + /** + * UpdateMetadataImportRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @instance + */ + UpdateMetadataImportRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateMetadataImportRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @static + * @param {google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.UpdateMetadataImportRequest} UpdateMetadataImportRequest instance + */ + UpdateMetadataImportRequest.create = function create(properties) { + return new UpdateMetadataImportRequest(properties); + }; + + /** + * Encodes the specified UpdateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @static + * @param {google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest} message UpdateMetadataImportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMetadataImportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metadataImport != null && Object.hasOwnProperty.call(message, "metadataImport")) + $root.google.cloud.metastore.v1alpha.MetadataImport.encode(message.metadataImport, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @static + * @param {google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest} message UpdateMetadataImportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.UpdateMetadataImportRequest} UpdateMetadataImportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMetadataImportRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.metadataImport = $root.google.cloud.metastore.v1alpha.MetadataImport.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.UpdateMetadataImportRequest} UpdateMetadataImportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateMetadataImportRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateMetadataImportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) { + var error = $root.google.cloud.metastore.v1alpha.MetadataImport.verify(message.metadataImport); + if (error) + return "metadataImport." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.UpdateMetadataImportRequest} UpdateMetadataImportRequest + */ + UpdateMetadataImportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) + return object; + var message = new $root.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.metadataImport != null) { + if (typeof object.metadataImport !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.metadataImport: object expected"); + message.metadataImport = $root.google.cloud.metastore.v1alpha.MetadataImport.fromObject(object.metadataImport); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateMetadataImportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @static + * @param {google.cloud.metastore.v1alpha.UpdateMetadataImportRequest} message UpdateMetadataImportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateMetadataImportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.metadataImport = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) + object.metadataImport = $root.google.cloud.metastore.v1alpha.MetadataImport.toObject(message.metadataImport, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateMetadataImportRequest to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateMetadataImportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateMetadataImportRequest + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.UpdateMetadataImportRequest"; + }; + + return UpdateMetadataImportRequest; + })(); + + v1alpha.ListBackupsRequest = (function() { + + /** + * Properties of a ListBackupsRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface IListBackupsRequest + * @property {string|null} [parent] ListBackupsRequest parent + * @property {number|null} [pageSize] ListBackupsRequest pageSize + * @property {string|null} [pageToken] ListBackupsRequest pageToken + * @property {string|null} [filter] ListBackupsRequest filter + * @property {string|null} [orderBy] ListBackupsRequest orderBy + */ + + /** + * Constructs a new ListBackupsRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a ListBackupsRequest. + * @implements IListBackupsRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.IListBackupsRequest=} [properties] Properties to set + */ + function ListBackupsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupsRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.parent = ""; + + /** + * ListBackupsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageSize = 0; + + /** + * ListBackupsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageToken = ""; + + /** + * ListBackupsRequest filter. + * @member {string} filter + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.filter = ""; + + /** + * ListBackupsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListBackupsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @static + * @param {google.cloud.metastore.v1alpha.IListBackupsRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.ListBackupsRequest} ListBackupsRequest instance + */ + ListBackupsRequest.create = function create(properties) { + return new ListBackupsRequest(properties); + }; + + /** + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @static + * @param {google.cloud.metastore.v1alpha.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @static + * @param {google.cloud.metastore.v1alpha.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.ListBackupsRequest} ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ListBackupsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.ListBackupsRequest} ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupsRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.ListBackupsRequest} ListBackupsRequest + */ + ListBackupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.ListBackupsRequest) + return object; + var message = new $root.google.cloud.metastore.v1alpha.ListBackupsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @static + * @param {google.cloud.metastore.v1alpha.ListBackupsRequest} message ListBackupsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListBackupsRequest to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupsRequest + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ListBackupsRequest"; + }; + + return ListBackupsRequest; + })(); + + v1alpha.ListBackupsResponse = (function() { + + /** + * Properties of a ListBackupsResponse. + * @memberof google.cloud.metastore.v1alpha + * @interface IListBackupsResponse + * @property {Array.|null} [backups] ListBackupsResponse backups + * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupsResponse unreachable + */ + + /** + * Constructs a new ListBackupsResponse. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a ListBackupsResponse. + * @implements IListBackupsResponse + * @constructor + * @param {google.cloud.metastore.v1alpha.IListBackupsResponse=} [properties] Properties to set + */ + function ListBackupsResponse(properties) { + this.backups = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupsResponse backups. + * @member {Array.} backups + * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.backups = $util.emptyArray; + + /** + * ListBackupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @static + * @param {google.cloud.metastore.v1alpha.IListBackupsResponse=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.ListBackupsResponse} ListBackupsResponse instance + */ + ListBackupsResponse.create = function create(properties) { + return new ListBackupsResponse(properties); + }; + + /** + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @static + * @param {google.cloud.metastore.v1alpha.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backups != null && message.backups.length) + for (var i = 0; i < message.backups.length; ++i) + $root.google.cloud.metastore.v1alpha.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @static + * @param {google.cloud.metastore.v1alpha.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.ListBackupsResponse} ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ListBackupsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.google.cloud.metastore.v1alpha.Backup.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.ListBackupsResponse} ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupsResponse message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backups != null && message.hasOwnProperty("backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (var i = 0; i < message.backups.length; ++i) { + var error = $root.google.cloud.metastore.v1alpha.Backup.verify(message.backups[i]); + if (error) + return "backups." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.ListBackupsResponse} ListBackupsResponse + */ + ListBackupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.ListBackupsResponse) + return object; + var message = new $root.google.cloud.metastore.v1alpha.ListBackupsResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".google.cloud.metastore.v1alpha.ListBackupsResponse.backups: array expected"); + message.backups = []; + for (var i = 0; i < object.backups.length; ++i) { + if (typeof object.backups[i] !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.ListBackupsResponse.backups: object expected"); + message.backups[i] = $root.google.cloud.metastore.v1alpha.Backup.fromObject(object.backups[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.metastore.v1alpha.ListBackupsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @static + * @param {google.cloud.metastore.v1alpha.ListBackupsResponse} message ListBackupsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backups = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backups && message.backups.length) { + object.backups = []; + for (var j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.google.cloud.metastore.v1alpha.Backup.toObject(message.backups[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListBackupsResponse to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupsResponse + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ListBackupsResponse"; + }; + + return ListBackupsResponse; + })(); + + v1alpha.GetBackupRequest = (function() { + + /** + * Properties of a GetBackupRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface IGetBackupRequest + * @property {string|null} [name] GetBackupRequest name + */ + + /** + * Constructs a new GetBackupRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a GetBackupRequest. + * @implements IGetBackupRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.IGetBackupRequest=} [properties] Properties to set + */ + function GetBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @instance + */ + GetBackupRequest.prototype.name = ""; + + /** + * Creates a new GetBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @static + * @param {google.cloud.metastore.v1alpha.IGetBackupRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.GetBackupRequest} GetBackupRequest instance + */ + GetBackupRequest.create = function create(properties) { + return new GetBackupRequest(properties); + }; + + /** + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.GetBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @static + * @param {google.cloud.metastore.v1alpha.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.GetBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @static + * @param {google.cloud.metastore.v1alpha.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.GetBackupRequest} GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.GetBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.GetBackupRequest} GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.GetBackupRequest} GetBackupRequest + */ + GetBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.GetBackupRequest) + return object; + var message = new $root.google.cloud.metastore.v1alpha.GetBackupRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @static + * @param {google.cloud.metastore.v1alpha.GetBackupRequest} message GetBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupRequest + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.GetBackupRequest"; + }; + + return GetBackupRequest; + })(); + + v1alpha.CreateBackupRequest = (function() { + + /** + * Properties of a CreateBackupRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface ICreateBackupRequest + * @property {string|null} [parent] CreateBackupRequest parent + * @property {string|null} [backupId] CreateBackupRequest backupId + * @property {google.cloud.metastore.v1alpha.IBackup|null} [backup] CreateBackupRequest backup + * @property {string|null} [requestId] CreateBackupRequest requestId + */ + + /** + * Constructs a new CreateBackupRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a CreateBackupRequest. + * @implements ICreateBackupRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.ICreateBackupRequest=} [properties] Properties to set + */ + function CreateBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @instance + */ + CreateBackupRequest.prototype.parent = ""; + + /** + * CreateBackupRequest backupId. + * @member {string} backupId + * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @instance + */ + CreateBackupRequest.prototype.backupId = ""; + + /** + * CreateBackupRequest backup. + * @member {google.cloud.metastore.v1alpha.IBackup|null|undefined} backup + * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @instance + */ + CreateBackupRequest.prototype.backup = null; + + /** + * CreateBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @instance + */ + CreateBackupRequest.prototype.requestId = ""; + + /** + * Creates a new CreateBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @static + * @param {google.cloud.metastore.v1alpha.ICreateBackupRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.CreateBackupRequest} CreateBackupRequest instance + */ + CreateBackupRequest.create = function create(properties) { + return new CreateBackupRequest(properties); + }; + + /** + * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @static + * @param {google.cloud.metastore.v1alpha.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupId); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + $root.google.cloud.metastore.v1alpha.Backup.encode(message.backup, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @static + * @param {google.cloud.metastore.v1alpha.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.CreateBackupRequest} CreateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.CreateBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupId = reader.string(); + break; + } + case 3: { + message.backup = $root.google.cloud.metastore.v1alpha.Backup.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.CreateBackupRequest} CreateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.backupId != null && message.hasOwnProperty("backupId")) + if (!$util.isString(message.backupId)) + return "backupId: string expected"; + if (message.backup != null && message.hasOwnProperty("backup")) { + var error = $root.google.cloud.metastore.v1alpha.Backup.verify(message.backup); + if (error) + return "backup." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.CreateBackupRequest} CreateBackupRequest + */ + CreateBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.CreateBackupRequest) + return object; + var message = new $root.google.cloud.metastore.v1alpha.CreateBackupRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupId != null) + message.backupId = String(object.backupId); + if (object.backup != null) { + if (typeof object.backup !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.CreateBackupRequest.backup: object expected"); + message.backup = $root.google.cloud.metastore.v1alpha.Backup.fromObject(object.backup); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @static + * @param {google.cloud.metastore.v1alpha.CreateBackupRequest} message CreateBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupId = ""; + object.backup = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupId != null && message.hasOwnProperty("backupId")) + object.backupId = message.backupId; + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = $root.google.cloud.metastore.v1alpha.Backup.toObject(message.backup, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupRequest + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.CreateBackupRequest"; + }; + + return CreateBackupRequest; + })(); + + v1alpha.DeleteBackupRequest = (function() { + + /** + * Properties of a DeleteBackupRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface IDeleteBackupRequest + * @property {string|null} [name] DeleteBackupRequest name + * @property {string|null} [requestId] DeleteBackupRequest requestId + */ + + /** + * Constructs a new DeleteBackupRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a DeleteBackupRequest. + * @implements IDeleteBackupRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.IDeleteBackupRequest=} [properties] Properties to set + */ + function DeleteBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @instance + */ + DeleteBackupRequest.prototype.name = ""; + + /** + * DeleteBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @instance + */ + DeleteBackupRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @static + * @param {google.cloud.metastore.v1alpha.IDeleteBackupRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.DeleteBackupRequest} DeleteBackupRequest instance + */ + DeleteBackupRequest.create = function create(properties) { + return new DeleteBackupRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @static + * @param {google.cloud.metastore.v1alpha.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @static + * @param {google.cloud.metastore.v1alpha.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.DeleteBackupRequest} DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.DeleteBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.DeleteBackupRequest} DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.DeleteBackupRequest} DeleteBackupRequest + */ + DeleteBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.DeleteBackupRequest) + return object; + var message = new $root.google.cloud.metastore.v1alpha.DeleteBackupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @static + * @param {google.cloud.metastore.v1alpha.DeleteBackupRequest} message DeleteBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DeleteBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupRequest + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.DeleteBackupRequest"; + }; + + return DeleteBackupRequest; + })(); + + v1alpha.ExportMetadataRequest = (function() { + + /** + * Properties of an ExportMetadataRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface IExportMetadataRequest + * @property {string|null} [destinationGcsFolder] ExportMetadataRequest destinationGcsFolder + * @property {string|null} [service] ExportMetadataRequest service + * @property {string|null} [requestId] ExportMetadataRequest requestId + * @property {google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|null} [databaseDumpType] ExportMetadataRequest databaseDumpType + */ + + /** + * Constructs a new ExportMetadataRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents an ExportMetadataRequest. + * @implements IExportMetadataRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.IExportMetadataRequest=} [properties] Properties to set + */ + function ExportMetadataRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportMetadataRequest destinationGcsFolder. + * @member {string|null|undefined} destinationGcsFolder + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @instance + */ + ExportMetadataRequest.prototype.destinationGcsFolder = null; + + /** + * ExportMetadataRequest service. + * @member {string} service + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @instance + */ + ExportMetadataRequest.prototype.service = ""; + + /** + * ExportMetadataRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @instance + */ + ExportMetadataRequest.prototype.requestId = ""; + + /** + * ExportMetadataRequest databaseDumpType. + * @member {google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type} databaseDumpType + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @instance + */ + ExportMetadataRequest.prototype.databaseDumpType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExportMetadataRequest destination. + * @member {"destinationGcsFolder"|undefined} destination + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @instance + */ + Object.defineProperty(ExportMetadataRequest.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["destinationGcsFolder"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportMetadataRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @static + * @param {google.cloud.metastore.v1alpha.IExportMetadataRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.ExportMetadataRequest} ExportMetadataRequest instance + */ + ExportMetadataRequest.create = function create(properties) { + return new ExportMetadataRequest(properties); + }; + + /** + * Encodes the specified ExportMetadataRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ExportMetadataRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @static + * @param {google.cloud.metastore.v1alpha.IExportMetadataRequest} message ExportMetadataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportMetadataRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.destinationGcsFolder != null && Object.hasOwnProperty.call(message, "destinationGcsFolder")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationGcsFolder); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.databaseDumpType != null && Object.hasOwnProperty.call(message, "databaseDumpType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.databaseDumpType); + return writer; + }; + + /** + * Encodes the specified ExportMetadataRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ExportMetadataRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @static + * @param {google.cloud.metastore.v1alpha.IExportMetadataRequest} message ExportMetadataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportMetadataRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.ExportMetadataRequest} ExportMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportMetadataRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ExportMetadataRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.destinationGcsFolder = reader.string(); + break; + } + case 1: { + message.service = reader.string(); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + case 4: { + message.databaseDumpType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportMetadataRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.ExportMetadataRequest} ExportMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportMetadataRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportMetadataRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportMetadataRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.destinationGcsFolder != null && message.hasOwnProperty("destinationGcsFolder")) { + properties.destination = 1; + if (!$util.isString(message.destinationGcsFolder)) + return "destinationGcsFolder: string expected"; + } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) + switch (message.databaseDumpType) { + default: + return "databaseDumpType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an ExportMetadataRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.ExportMetadataRequest} ExportMetadataRequest + */ + ExportMetadataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.ExportMetadataRequest) + return object; + var message = new $root.google.cloud.metastore.v1alpha.ExportMetadataRequest(); + if (object.destinationGcsFolder != null) + message.destinationGcsFolder = String(object.destinationGcsFolder); + if (object.service != null) + message.service = String(object.service); + if (object.requestId != null) + message.requestId = String(object.requestId); + switch (object.databaseDumpType) { + default: + if (typeof object.databaseDumpType === "number") { + message.databaseDumpType = object.databaseDumpType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.databaseDumpType = 0; + break; + case "MYSQL": + case 1: + message.databaseDumpType = 1; + break; + case "AVRO": + case 2: + message.databaseDumpType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExportMetadataRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @static + * @param {google.cloud.metastore.v1alpha.ExportMetadataRequest} message ExportMetadataRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportMetadataRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.service = ""; + object.requestId = ""; + object.databaseDumpType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.destinationGcsFolder != null && message.hasOwnProperty("destinationGcsFolder")) { + object.destinationGcsFolder = message.destinationGcsFolder; + if (options.oneofs) + object.destination = "destinationGcsFolder"; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) + object.databaseDumpType = options.enums === String ? $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type[message.databaseDumpType] === undefined ? message.databaseDumpType : $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type[message.databaseDumpType] : message.databaseDumpType; + return object; + }; + + /** + * Converts this ExportMetadataRequest to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @instance + * @returns {Object.} JSON object + */ + ExportMetadataRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportMetadataRequest + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportMetadataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ExportMetadataRequest"; + }; + + return ExportMetadataRequest; + })(); + + v1alpha.RestoreServiceRequest = (function() { + + /** + * Properties of a RestoreServiceRequest. + * @memberof google.cloud.metastore.v1alpha + * @interface IRestoreServiceRequest + * @property {string|null} [service] RestoreServiceRequest service + * @property {string|null} [backup] RestoreServiceRequest backup + * @property {google.cloud.metastore.v1alpha.Restore.RestoreType|null} [restoreType] RestoreServiceRequest restoreType + * @property {string|null} [requestId] RestoreServiceRequest requestId + */ + + /** + * Constructs a new RestoreServiceRequest. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a RestoreServiceRequest. + * @implements IRestoreServiceRequest + * @constructor + * @param {google.cloud.metastore.v1alpha.IRestoreServiceRequest=} [properties] Properties to set + */ + function RestoreServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreServiceRequest service. + * @member {string} service + * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @instance + */ + RestoreServiceRequest.prototype.service = ""; + + /** + * RestoreServiceRequest backup. + * @member {string} backup + * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @instance + */ + RestoreServiceRequest.prototype.backup = ""; + + /** + * RestoreServiceRequest restoreType. + * @member {google.cloud.metastore.v1alpha.Restore.RestoreType} restoreType + * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @instance + */ + RestoreServiceRequest.prototype.restoreType = 0; + + /** + * RestoreServiceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @instance + */ + RestoreServiceRequest.prototype.requestId = ""; + + /** + * Creates a new RestoreServiceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.IRestoreServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.RestoreServiceRequest} RestoreServiceRequest instance + */ + RestoreServiceRequest.create = function create(properties) { + return new RestoreServiceRequest(properties); + }; + + /** + * Encodes the specified RestoreServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.RestoreServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.IRestoreServiceRequest} message RestoreServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backup); + if (message.restoreType != null && Object.hasOwnProperty.call(message, "restoreType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.restoreType); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified RestoreServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.RestoreServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @static + * @param {google.cloud.metastore.v1alpha.IRestoreServiceRequest} message RestoreServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.RestoreServiceRequest} RestoreServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.RestoreServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 2: { + message.backup = reader.string(); + break; + } + case 3: { + message.restoreType = reader.int32(); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; + + /** + * Decodes a RestoreServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.RestoreServiceRequest} RestoreServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreServiceRequest message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.backup != null && message.hasOwnProperty("backup")) + if (!$util.isString(message.backup)) + return "backup: string expected"; + if (message.restoreType != null && message.hasOwnProperty("restoreType")) + switch (message.restoreType) { + default: + return "restoreType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreServiceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.NetworkConfig} NetworkConfig + * @returns {google.cloud.metastore.v1alpha.RestoreServiceRequest} RestoreServiceRequest */ - NetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.NetworkConfig) + RestoreServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.RestoreServiceRequest) return object; - var message = new $root.google.cloud.metastore.v1alpha.NetworkConfig(); - if (object.consumers) { - if (!Array.isArray(object.consumers)) - throw TypeError(".google.cloud.metastore.v1alpha.NetworkConfig.consumers: array expected"); - message.consumers = []; - for (var i = 0; i < object.consumers.length; ++i) { - if (typeof object.consumers[i] !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.NetworkConfig.consumers: object expected"); - message.consumers[i] = $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.fromObject(object.consumers[i]); + var message = new $root.google.cloud.metastore.v1alpha.RestoreServiceRequest(); + if (object.service != null) + message.service = String(object.service); + if (object.backup != null) + message.backup = String(object.backup); + switch (object.restoreType) { + default: + if (typeof object.restoreType === "number") { + message.restoreType = object.restoreType; + break; } + break; + case "RESTORE_TYPE_UNSPECIFIED": + case 0: + message.restoreType = 0; + break; + case "FULL": + case 1: + message.restoreType = 1; + break; + case "METADATA_ONLY": + case 2: + message.restoreType = 2; + break; } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * Creates a plain object from a RestoreServiceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest * @static - * @param {google.cloud.metastore.v1alpha.NetworkConfig} message NetworkConfig + * @param {google.cloud.metastore.v1alpha.RestoreServiceRequest} message RestoreServiceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NetworkConfig.toObject = function toObject(message, options) { + RestoreServiceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.consumers = []; - if (message.consumers && message.consumers.length) { - object.consumers = []; - for (var j = 0; j < message.consumers.length; ++j) - object.consumers[j] = $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.toObject(message.consumers[j], options); + if (options.defaults) { + object.service = ""; + object.backup = ""; + object.restoreType = options.enums === String ? "RESTORE_TYPE_UNSPECIFIED" : 0; + object.requestId = ""; } + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = message.backup; + if (message.restoreType != null && message.hasOwnProperty("restoreType")) + object.restoreType = options.enums === String ? $root.google.cloud.metastore.v1alpha.Restore.RestoreType[message.restoreType] === undefined ? message.restoreType : $root.google.cloud.metastore.v1alpha.Restore.RestoreType[message.restoreType] : message.restoreType; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this NetworkConfig to JSON. + * Converts this RestoreServiceRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest * @instance * @returns {Object.} JSON object */ - NetworkConfig.prototype.toJSON = function toJSON() { + RestoreServiceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NetworkConfig + * Gets the default type url for RestoreServiceRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RestoreServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.NetworkConfig"; + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.RestoreServiceRequest"; }; - NetworkConfig.Consumer = (function() { - - /** - * Properties of a Consumer. - * @memberof google.cloud.metastore.v1alpha.NetworkConfig - * @interface IConsumer - * @property {string|null} [subnetwork] Consumer subnetwork - * @property {string|null} [endpointUri] Consumer endpointUri - */ - - /** - * Constructs a new Consumer. - * @memberof google.cloud.metastore.v1alpha.NetworkConfig - * @classdesc Represents a Consumer. - * @implements IConsumer - * @constructor - * @param {google.cloud.metastore.v1alpha.NetworkConfig.IConsumer=} [properties] Properties to set - */ - function Consumer(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Consumer subnetwork. - * @member {string|null|undefined} subnetwork - * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer - * @instance - */ - Consumer.prototype.subnetwork = null; - - /** - * Consumer endpointUri. - * @member {string} endpointUri - * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer - * @instance - */ - Consumer.prototype.endpointUri = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Consumer vpcResource. - * @member {"subnetwork"|undefined} vpcResource - * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer - * @instance - */ - Object.defineProperty(Consumer.prototype, "vpcResource", { - get: $util.oneOfGetter($oneOfFields = ["subnetwork"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Consumer instance using the specified properties. - * @function create - * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer - * @static - * @param {google.cloud.metastore.v1alpha.NetworkConfig.IConsumer=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.NetworkConfig.Consumer} Consumer instance - */ - Consumer.create = function create(properties) { - return new Consumer(properties); - }; - - /** - * Encodes the specified Consumer message. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.Consumer.verify|verify} messages. - * @function encode - * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer - * @static - * @param {google.cloud.metastore.v1alpha.NetworkConfig.IConsumer} message Consumer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Consumer.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetwork); - if (message.endpointUri != null && Object.hasOwnProperty.call(message, "endpointUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.endpointUri); - return writer; - }; - - /** - * Encodes the specified Consumer message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.Consumer.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer - * @static - * @param {google.cloud.metastore.v1alpha.NetworkConfig.IConsumer} message Consumer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Consumer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Consumer message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.NetworkConfig.Consumer} Consumer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Consumer.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.subnetwork = reader.string(); - break; - } - case 3: { - message.endpointUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Consumer message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.NetworkConfig.Consumer} Consumer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Consumer.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Consumer message. - * @function verify - * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Consumer.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { - properties.vpcResource = 1; - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - } - if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) - if (!$util.isString(message.endpointUri)) - return "endpointUri: string expected"; - return null; - }; - - /** - * Creates a Consumer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.NetworkConfig.Consumer} Consumer - */ - Consumer.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer) - return object; - var message = new $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer(); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.endpointUri != null) - message.endpointUri = String(object.endpointUri); - return message; - }; - - /** - * Creates a plain object from a Consumer message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer - * @static - * @param {google.cloud.metastore.v1alpha.NetworkConfig.Consumer} message Consumer - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Consumer.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.endpointUri = ""; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { - object.subnetwork = message.subnetwork; - if (options.oneofs) - object.vpcResource = "subnetwork"; - } - if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) - object.endpointUri = message.endpointUri; - return object; - }; - - /** - * Converts this Consumer to JSON. - * @function toJSON - * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer - * @instance - * @returns {Object.} JSON object - */ - Consumer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Consumer - * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.NetworkConfig.Consumer - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Consumer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.NetworkConfig.Consumer"; - }; - - return Consumer; - })(); - - return NetworkConfig; + return RestoreServiceRequest; })(); - v1alpha.MetadataManagementActivity = (function() { + v1alpha.OperationMetadata = (function() { /** - * Properties of a MetadataManagementActivity. + * Properties of an OperationMetadata. * @memberof google.cloud.metastore.v1alpha - * @interface IMetadataManagementActivity - * @property {Array.|null} [metadataExports] MetadataManagementActivity metadataExports - * @property {Array.|null} [restores] MetadataManagementActivity restores + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion */ /** - * Constructs a new MetadataManagementActivity. + * Constructs a new OperationMetadata. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a MetadataManagementActivity. - * @implements IMetadataManagementActivity + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata * @constructor - * @param {google.cloud.metastore.v1alpha.IMetadataManagementActivity=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.IOperationMetadata=} [properties] Properties to set */ - function MetadataManagementActivity(properties) { - this.metadataExports = []; - this.restores = []; + function OperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15007,95 +25997,159 @@ } /** - * MetadataManagementActivity metadataExports. - * @member {Array.} metadataExports - * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.metastore.v1alpha.OperationMetadata * @instance */ - MetadataManagementActivity.prototype.metadataExports = $util.emptyArray; + OperationMetadata.prototype.createTime = null; /** - * MetadataManagementActivity restores. - * @member {Array.} restores - * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1alpha.OperationMetadata * @instance */ - MetadataManagementActivity.prototype.restores = $util.emptyArray; + OperationMetadata.prototype.endTime = null; /** - * Creates a new MetadataManagementActivity instance using the specified properties. + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @memberof google.cloud.metastore.v1alpha.OperationMetadata * @static - * @param {google.cloud.metastore.v1alpha.IMetadataManagementActivity=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.MetadataManagementActivity} MetadataManagementActivity instance + * @param {google.cloud.metastore.v1alpha.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.OperationMetadata} OperationMetadata instance */ - MetadataManagementActivity.create = function create(properties) { - return new MetadataManagementActivity(properties); + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); }; /** - * Encodes the specified MetadataManagementActivity message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataManagementActivity.verify|verify} messages. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.metastore.v1alpha.OperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @memberof google.cloud.metastore.v1alpha.OperationMetadata * @static - * @param {google.cloud.metastore.v1alpha.IMetadataManagementActivity} message MetadataManagementActivity message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataManagementActivity.encode = function encode(message, writer) { + OperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metadataExports != null && message.metadataExports.length) - for (var i = 0; i < message.metadataExports.length; ++i) - $root.google.cloud.metastore.v1alpha.MetadataExport.encode(message.metadataExports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.restores != null && message.restores.length) - for (var i = 0; i < message.restores.length; ++i) - $root.google.cloud.metastore.v1alpha.Restore.encode(message.restores[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); return writer; }; /** - * Encodes the specified MetadataManagementActivity message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataManagementActivity.verify|verify} messages. + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.OperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @memberof google.cloud.metastore.v1alpha.OperationMetadata * @static - * @param {google.cloud.metastore.v1alpha.IMetadataManagementActivity} message MetadataManagementActivity message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataManagementActivity.encodeDelimited = function encodeDelimited(message, writer) { + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetadataManagementActivity message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @memberof google.cloud.metastore.v1alpha.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.MetadataManagementActivity} MetadataManagementActivity + * @returns {google.cloud.metastore.v1alpha.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataManagementActivity.decode = function decode(reader, length) { + OperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.MetadataManagementActivity(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.OperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.metadataExports && message.metadataExports.length)) - message.metadataExports = []; - message.metadataExports.push($root.google.cloud.metastore.v1alpha.MetadataExport.decode(reader, reader.uint32())); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - if (!(message.restores && message.restores.length)) - message.restores = []; - message.restores.push($root.google.cloud.metastore.v1alpha.Restore.decode(reader, reader.uint32())); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); break; } default: @@ -15107,171 +26161,182 @@ }; /** - * Decodes a MetadataManagementActivity message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @memberof google.cloud.metastore.v1alpha.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.MetadataManagementActivity} MetadataManagementActivity + * @returns {google.cloud.metastore.v1alpha.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataManagementActivity.decodeDelimited = function decodeDelimited(reader) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetadataManagementActivity message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @memberof google.cloud.metastore.v1alpha.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetadataManagementActivity.verify = function verify(message) { + OperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metadataExports != null && message.hasOwnProperty("metadataExports")) { - if (!Array.isArray(message.metadataExports)) - return "metadataExports: array expected"; - for (var i = 0; i < message.metadataExports.length; ++i) { - var error = $root.google.cloud.metastore.v1alpha.MetadataExport.verify(message.metadataExports[i]); - if (error) - return "metadataExports." + error; - } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.restores != null && message.hasOwnProperty("restores")) { - if (!Array.isArray(message.restores)) - return "restores: array expected"; - for (var i = 0; i < message.restores.length; ++i) { - var error = $root.google.cloud.metastore.v1alpha.Restore.verify(message.restores[i]); - if (error) - return "restores." + error; - } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; return null; }; /** - * Creates a MetadataManagementActivity message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @memberof google.cloud.metastore.v1alpha.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.MetadataManagementActivity} MetadataManagementActivity + * @returns {google.cloud.metastore.v1alpha.OperationMetadata} OperationMetadata */ - MetadataManagementActivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.MetadataManagementActivity) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.OperationMetadata) return object; - var message = new $root.google.cloud.metastore.v1alpha.MetadataManagementActivity(); - if (object.metadataExports) { - if (!Array.isArray(object.metadataExports)) - throw TypeError(".google.cloud.metastore.v1alpha.MetadataManagementActivity.metadataExports: array expected"); - message.metadataExports = []; - for (var i = 0; i < object.metadataExports.length; ++i) { - if (typeof object.metadataExports[i] !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.MetadataManagementActivity.metadataExports: object expected"); - message.metadataExports[i] = $root.google.cloud.metastore.v1alpha.MetadataExport.fromObject(object.metadataExports[i]); - } + var message = new $root.google.cloud.metastore.v1alpha.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.restores) { - if (!Array.isArray(object.restores)) - throw TypeError(".google.cloud.metastore.v1alpha.MetadataManagementActivity.restores: array expected"); - message.restores = []; - for (var i = 0; i < object.restores.length; ++i) { - if (typeof object.restores[i] !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.MetadataManagementActivity.restores: object expected"); - message.restores[i] = $root.google.cloud.metastore.v1alpha.Restore.fromObject(object.restores[i]); - } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); return message; }; /** - * Creates a plain object from a MetadataManagementActivity message. Also converts values to other types if specified. + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @memberof google.cloud.metastore.v1alpha.OperationMetadata * @static - * @param {google.cloud.metastore.v1alpha.MetadataManagementActivity} message MetadataManagementActivity + * @param {google.cloud.metastore.v1alpha.OperationMetadata} message OperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetadataManagementActivity.toObject = function toObject(message, options) { + OperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.metadataExports = []; - object.restores = []; - } - if (message.metadataExports && message.metadataExports.length) { - object.metadataExports = []; - for (var j = 0; j < message.metadataExports.length; ++j) - object.metadataExports[j] = $root.google.cloud.metastore.v1alpha.MetadataExport.toObject(message.metadataExports[j], options); - } - if (message.restores && message.restores.length) { - object.restores = []; - for (var j = 0; j < message.restores.length; ++j) - object.restores[j] = $root.google.cloud.metastore.v1alpha.Restore.toObject(message.restores[j], options); + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; return object; }; /** - * Converts this MetadataManagementActivity to JSON. + * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @memberof google.cloud.metastore.v1alpha.OperationMetadata * @instance * @returns {Object.} JSON object */ - MetadataManagementActivity.prototype.toJSON = function toJSON() { + OperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetadataManagementActivity + * Gets the default type url for OperationMetadata * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.MetadataManagementActivity + * @memberof google.cloud.metastore.v1alpha.OperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetadataManagementActivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.MetadataManagementActivity"; + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.OperationMetadata"; }; - return MetadataManagementActivity; + return OperationMetadata; })(); - v1alpha.MetadataImport = (function() { + v1alpha.LocationMetadata = (function() { /** - * Properties of a MetadataImport. + * Properties of a LocationMetadata. * @memberof google.cloud.metastore.v1alpha - * @interface IMetadataImport - * @property {google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump|null} [databaseDump] MetadataImport databaseDump - * @property {string|null} [name] MetadataImport name - * @property {string|null} [description] MetadataImport description - * @property {google.protobuf.ITimestamp|null} [createTime] MetadataImport createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] MetadataImport updateTime - * @property {google.protobuf.ITimestamp|null} [endTime] MetadataImport endTime - * @property {google.cloud.metastore.v1alpha.MetadataImport.State|null} [state] MetadataImport state + * @interface ILocationMetadata + * @property {Array.|null} [supportedHiveMetastoreVersions] LocationMetadata supportedHiveMetastoreVersions */ /** - * Constructs a new MetadataImport. + * Constructs a new LocationMetadata. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a MetadataImport. - * @implements IMetadataImport + * @classdesc Represents a LocationMetadata. + * @implements ILocationMetadata * @constructor - * @param {google.cloud.metastore.v1alpha.IMetadataImport=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.ILocationMetadata=} [properties] Properties to set */ - function MetadataImport(properties) { + function LocationMetadata(properties) { + this.supportedHiveMetastoreVersions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15279,173 +26344,78 @@ } /** - * MetadataImport databaseDump. - * @member {google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump|null|undefined} databaseDump - * @memberof google.cloud.metastore.v1alpha.MetadataImport - * @instance - */ - MetadataImport.prototype.databaseDump = null; - - /** - * MetadataImport name. - * @member {string} name - * @memberof google.cloud.metastore.v1alpha.MetadataImport - * @instance - */ - MetadataImport.prototype.name = ""; - - /** - * MetadataImport description. - * @member {string} description - * @memberof google.cloud.metastore.v1alpha.MetadataImport - * @instance - */ - MetadataImport.prototype.description = ""; - - /** - * MetadataImport createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.metastore.v1alpha.MetadataImport - * @instance - */ - MetadataImport.prototype.createTime = null; - - /** - * MetadataImport updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.metastore.v1alpha.MetadataImport - * @instance - */ - MetadataImport.prototype.updateTime = null; - - /** - * MetadataImport endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.metastore.v1alpha.MetadataImport - * @instance - */ - MetadataImport.prototype.endTime = null; - - /** - * MetadataImport state. - * @member {google.cloud.metastore.v1alpha.MetadataImport.State} state - * @memberof google.cloud.metastore.v1alpha.MetadataImport - * @instance - */ - MetadataImport.prototype.state = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MetadataImport metadata. - * @member {"databaseDump"|undefined} metadata - * @memberof google.cloud.metastore.v1alpha.MetadataImport + * LocationMetadata supportedHiveMetastoreVersions. + * @member {Array.} supportedHiveMetastoreVersions + * @memberof google.cloud.metastore.v1alpha.LocationMetadata * @instance */ - Object.defineProperty(MetadataImport.prototype, "metadata", { - get: $util.oneOfGetter($oneOfFields = ["databaseDump"]), - set: $util.oneOfSetter($oneOfFields) - }); + LocationMetadata.prototype.supportedHiveMetastoreVersions = $util.emptyArray; /** - * Creates a new MetadataImport instance using the specified properties. + * Creates a new LocationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @memberof google.cloud.metastore.v1alpha.LocationMetadata * @static - * @param {google.cloud.metastore.v1alpha.IMetadataImport=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.MetadataImport} MetadataImport instance + * @param {google.cloud.metastore.v1alpha.ILocationMetadata=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.LocationMetadata} LocationMetadata instance */ - MetadataImport.create = function create(properties) { - return new MetadataImport(properties); + LocationMetadata.create = function create(properties) { + return new LocationMetadata(properties); }; /** - * Encodes the specified MetadataImport message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.verify|verify} messages. + * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @memberof google.cloud.metastore.v1alpha.LocationMetadata * @static - * @param {google.cloud.metastore.v1alpha.IMetadataImport} message MetadataImport message or plain object to encode + * @param {google.cloud.metastore.v1alpha.ILocationMetadata} message LocationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataImport.encode = function encode(message, writer) { + LocationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.databaseDump != null && Object.hasOwnProperty.call(message, "databaseDump")) - $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.encode(message.databaseDump, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.supportedHiveMetastoreVersions != null && message.supportedHiveMetastoreVersions.length) + for (var i = 0; i < message.supportedHiveMetastoreVersions.length; ++i) + $root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.encode(message.supportedHiveMetastoreVersions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified MetadataImport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.verify|verify} messages. + * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @memberof google.cloud.metastore.v1alpha.LocationMetadata * @static - * @param {google.cloud.metastore.v1alpha.IMetadataImport} message MetadataImport message or plain object to encode + * @param {google.cloud.metastore.v1alpha.ILocationMetadata} message LocationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataImport.encodeDelimited = function encodeDelimited(message, writer) { + LocationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetadataImport message from the specified reader or buffer. + * Decodes a LocationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @memberof google.cloud.metastore.v1alpha.LocationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.MetadataImport} MetadataImport + * @returns {google.cloud.metastore.v1alpha.LocationMetadata} LocationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataImport.decode = function decode(reader, length) { + LocationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.MetadataImport(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.LocationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: { - message.databaseDump = $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.decode(reader, reader.uint32()); - break; - } case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.state = reader.int32(); + if (!(message.supportedHiveMetastoreVersions && message.supportedHiveMetastoreVersions.length)) + message.supportedHiveMetastoreVersions = []; + message.supportedHiveMetastoreVersions.push($root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.decode(reader, reader.uint32())); break; } default: @@ -15457,231 +26427,137 @@ }; /** - * Decodes a MetadataImport message from the specified reader or buffer, length delimited. + * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @memberof google.cloud.metastore.v1alpha.LocationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.MetadataImport} MetadataImport + * @returns {google.cloud.metastore.v1alpha.LocationMetadata} LocationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataImport.decodeDelimited = function decodeDelimited(reader) { + LocationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetadataImport message. + * Verifies a LocationMetadata message. * @function verify - * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @memberof google.cloud.metastore.v1alpha.LocationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetadataImport.verify = function verify(message) { + LocationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.databaseDump != null && message.hasOwnProperty("databaseDump")) { - properties.metadata = 1; - { - var error = $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.verify(message.databaseDump); - if (error) - return "databaseDump." + error; - } - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a MetadataImport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.metastore.v1alpha.MetadataImport - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.MetadataImport} MetadataImport - */ - MetadataImport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.MetadataImport) - return object; - var message = new $root.google.cloud.metastore.v1alpha.MetadataImport(); - if (object.databaseDump != null) { - if (typeof object.databaseDump !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.MetadataImport.databaseDump: object expected"); - message.databaseDump = $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.fromObject(object.databaseDump); - } - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.MetadataImport.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.MetadataImport.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.MetadataImport.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + if (message.supportedHiveMetastoreVersions != null && message.hasOwnProperty("supportedHiveMetastoreVersions")) { + if (!Array.isArray(message.supportedHiveMetastoreVersions)) + return "supportedHiveMetastoreVersions: array expected"; + for (var i = 0; i < message.supportedHiveMetastoreVersions.length; ++i) { + var error = $root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.verify(message.supportedHiveMetastoreVersions[i]); + if (error) + return "supportedHiveMetastoreVersions." + error; + } } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; + return null; + }; + + /** + * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.LocationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.LocationMetadata} LocationMetadata + */ + LocationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.LocationMetadata) + return object; + var message = new $root.google.cloud.metastore.v1alpha.LocationMetadata(); + if (object.supportedHiveMetastoreVersions) { + if (!Array.isArray(object.supportedHiveMetastoreVersions)) + throw TypeError(".google.cloud.metastore.v1alpha.LocationMetadata.supportedHiveMetastoreVersions: array expected"); + message.supportedHiveMetastoreVersions = []; + for (var i = 0; i < object.supportedHiveMetastoreVersions.length; ++i) { + if (typeof object.supportedHiveMetastoreVersions[i] !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.LocationMetadata.supportedHiveMetastoreVersions: object expected"); + message.supportedHiveMetastoreVersions[i] = $root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.fromObject(object.supportedHiveMetastoreVersions[i]); } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "RUNNING": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "FAILED": - case 4: - message.state = 4; - break; } return message; }; /** - * Creates a plain object from a MetadataImport message. Also converts values to other types if specified. + * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @memberof google.cloud.metastore.v1alpha.LocationMetadata * @static - * @param {google.cloud.metastore.v1alpha.MetadataImport} message MetadataImport + * @param {google.cloud.metastore.v1alpha.LocationMetadata} message LocationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetadataImport.toObject = function toObject(message, options) { + LocationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.endTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.metastore.v1alpha.MetadataImport.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1alpha.MetadataImport.State[message.state] : message.state; - if (message.databaseDump != null && message.hasOwnProperty("databaseDump")) { - object.databaseDump = $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.toObject(message.databaseDump, options); - if (options.oneofs) - object.metadata = "databaseDump"; + if (options.arrays || options.defaults) + object.supportedHiveMetastoreVersions = []; + if (message.supportedHiveMetastoreVersions && message.supportedHiveMetastoreVersions.length) { + object.supportedHiveMetastoreVersions = []; + for (var j = 0; j < message.supportedHiveMetastoreVersions.length; ++j) + object.supportedHiveMetastoreVersions[j] = $root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.toObject(message.supportedHiveMetastoreVersions[j], options); } - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); return object; }; /** - * Converts this MetadataImport to JSON. + * Converts this LocationMetadata to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @memberof google.cloud.metastore.v1alpha.LocationMetadata * @instance * @returns {Object.} JSON object */ - MetadataImport.prototype.toJSON = function toJSON() { + LocationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetadataImport + * Gets the default type url for LocationMetadata * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.MetadataImport + * @memberof google.cloud.metastore.v1alpha.LocationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetadataImport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LocationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.MetadataImport"; + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.LocationMetadata"; }; - MetadataImport.DatabaseDump = (function() { + LocationMetadata.HiveMetastoreVersion = (function() { /** - * Properties of a DatabaseDump. - * @memberof google.cloud.metastore.v1alpha.MetadataImport - * @interface IDatabaseDump - * @property {google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType|null} [databaseType] DatabaseDump databaseType - * @property {string|null} [gcsUri] DatabaseDump gcsUri - * @property {string|null} [sourceDatabase] DatabaseDump sourceDatabase - * @property {google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|null} [type] DatabaseDump type + * Properties of a HiveMetastoreVersion. + * @memberof google.cloud.metastore.v1alpha.LocationMetadata + * @interface IHiveMetastoreVersion + * @property {string|null} [version] HiveMetastoreVersion version + * @property {boolean|null} [isDefault] HiveMetastoreVersion isDefault */ /** - * Constructs a new DatabaseDump. - * @memberof google.cloud.metastore.v1alpha.MetadataImport - * @classdesc Represents a DatabaseDump. - * @implements IDatabaseDump + * Constructs a new HiveMetastoreVersion. + * @memberof google.cloud.metastore.v1alpha.LocationMetadata + * @classdesc Represents a HiveMetastoreVersion. + * @implements IHiveMetastoreVersion * @constructor - * @param {google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion=} [properties] Properties to set */ - function DatabaseDump(properties) { + function HiveMetastoreVersion(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15689,117 +26565,89 @@ } /** - * DatabaseDump databaseType. - * @member {google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType} databaseType - * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump - * @instance - */ - DatabaseDump.prototype.databaseType = 0; - - /** - * DatabaseDump gcsUri. - * @member {string} gcsUri - * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump - * @instance - */ - DatabaseDump.prototype.gcsUri = ""; - - /** - * DatabaseDump sourceDatabase. - * @member {string} sourceDatabase - * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * HiveMetastoreVersion version. + * @member {string} version + * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion * @instance */ - DatabaseDump.prototype.sourceDatabase = ""; + HiveMetastoreVersion.prototype.version = ""; /** - * DatabaseDump type. - * @member {google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type} type - * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * HiveMetastoreVersion isDefault. + * @member {boolean} isDefault + * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion * @instance */ - DatabaseDump.prototype.type = 0; + HiveMetastoreVersion.prototype.isDefault = false; /** - * Creates a new DatabaseDump instance using the specified properties. + * Creates a new HiveMetastoreVersion instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion * @static - * @param {google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump} DatabaseDump instance + * @param {google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion instance */ - DatabaseDump.create = function create(properties) { - return new DatabaseDump(properties); + HiveMetastoreVersion.create = function create(properties) { + return new HiveMetastoreVersion(properties); }; /** - * Encodes the specified DatabaseDump message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.verify|verify} messages. + * Encodes the specified HiveMetastoreVersion message. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion * @static - * @param {google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump} message DatabaseDump message or plain object to encode + * @param {google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion} message HiveMetastoreVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseDump.encode = function encode(message, writer) { + HiveMetastoreVersion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.databaseType != null && Object.hasOwnProperty.call(message, "databaseType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.databaseType); - if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsUri); - if (message.sourceDatabase != null && Object.hasOwnProperty.call(message, "sourceDatabase")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceDatabase); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDefault); return writer; }; /** - * Encodes the specified DatabaseDump message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.verify|verify} messages. + * Encodes the specified HiveMetastoreVersion message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion * @static - * @param {google.cloud.metastore.v1alpha.MetadataImport.IDatabaseDump} message DatabaseDump message or plain object to encode + * @param {google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion} message HiveMetastoreVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseDump.encodeDelimited = function encodeDelimited(message, writer) { + HiveMetastoreVersion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DatabaseDump message from the specified reader or buffer. + * Decodes a HiveMetastoreVersion message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump} DatabaseDump + * @returns {google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseDump.decode = function decode(reader, length) { + HiveMetastoreVersion.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.databaseType = reader.int32(); + message.version = reader.string(); break; } case 2: { - message.gcsUri = reader.string(); - break; - } - case 3: { - message.sourceDatabase = reader.string(); - break; - } - case 4: { - message.type = reader.int32(); + message.isDefault = reader.bool(); break; } default: @@ -15811,231 +26659,133 @@ }; /** - * Decodes a DatabaseDump message from the specified reader or buffer, length delimited. + * Decodes a HiveMetastoreVersion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump} DatabaseDump + * @returns {google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseDump.decodeDelimited = function decodeDelimited(reader) { + HiveMetastoreVersion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DatabaseDump message. + * Verifies a HiveMetastoreVersion message. * @function verify - * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DatabaseDump.verify = function verify(message) { + HiveMetastoreVersion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.databaseType != null && message.hasOwnProperty("databaseType")) - switch (message.databaseType) { - default: - return "databaseType: enum value expected"; - case 0: - case 1: - break; - } - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) - if (!$util.isString(message.gcsUri)) - return "gcsUri: string expected"; - if (message.sourceDatabase != null && message.hasOwnProperty("sourceDatabase")) - if (!$util.isString(message.sourceDatabase)) - return "sourceDatabase: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + if (typeof message.isDefault !== "boolean") + return "isDefault: boolean expected"; return null; }; /** - * Creates a DatabaseDump message from a plain object. Also converts values to their respective internal types. + * Creates a HiveMetastoreVersion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump} DatabaseDump + * @returns {google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion */ - DatabaseDump.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) + HiveMetastoreVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) return object; - var message = new $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump(); - switch (object.databaseType) { - default: - if (typeof object.databaseType === "number") { - message.databaseType = object.databaseType; - break; - } - break; - case "DATABASE_TYPE_UNSPECIFIED": - case 0: - message.databaseType = 0; - break; - case "MYSQL": - case 1: - message.databaseType = 1; - break; - } - if (object.gcsUri != null) - message.gcsUri = String(object.gcsUri); - if (object.sourceDatabase != null) - message.sourceDatabase = String(object.sourceDatabase); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "MYSQL": - case 1: - message.type = 1; - break; - case "AVRO": - case 2: - message.type = 2; - break; - } + var message = new $root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion(); + if (object.version != null) + message.version = String(object.version); + if (object.isDefault != null) + message.isDefault = Boolean(object.isDefault); return message; }; /** - * Creates a plain object from a DatabaseDump message. Also converts values to other types if specified. + * Creates a plain object from a HiveMetastoreVersion message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion * @static - * @param {google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump} message DatabaseDump + * @param {google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion} message HiveMetastoreVersion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DatabaseDump.toObject = function toObject(message, options) { + HiveMetastoreVersion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.databaseType = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; - object.gcsUri = ""; - object.sourceDatabase = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.version = ""; + object.isDefault = false; } - if (message.databaseType != null && message.hasOwnProperty("databaseType")) - object.databaseType = options.enums === String ? $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType[message.databaseType] === undefined ? message.databaseType : $root.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType[message.databaseType] : message.databaseType; - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) - object.gcsUri = message.gcsUri; - if (message.sourceDatabase != null && message.hasOwnProperty("sourceDatabase")) - object.sourceDatabase = message.sourceDatabase; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type[message.type] : message.type; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + object.isDefault = message.isDefault; return object; }; /** - * Converts this DatabaseDump to JSON. + * Converts this HiveMetastoreVersion to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion * @instance * @returns {Object.} JSON object */ - DatabaseDump.prototype.toJSON = function toJSON() { + HiveMetastoreVersion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DatabaseDump + * Gets the default type url for HiveMetastoreVersion * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump + * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DatabaseDump.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + HiveMetastoreVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump"; + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion"; }; - /** - * DatabaseType enum. - * @name google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType - * @enum {number} - * @property {number} DATABASE_TYPE_UNSPECIFIED=0 DATABASE_TYPE_UNSPECIFIED value - * @property {number} MYSQL=1 MYSQL value - */ - DatabaseDump.DatabaseType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MYSQL"] = 1; - return values; - })(); - - return DatabaseDump; - })(); - - /** - * State enum. - * @name google.cloud.metastore.v1alpha.MetadataImport.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} UPDATING=3 UPDATING value - * @property {number} FAILED=4 FAILED value - */ - MetadataImport.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[4] = "FAILED"] = 4; - return values; + return HiveMetastoreVersion; })(); - return MetadataImport; + return LocationMetadata; })(); - v1alpha.MetadataExport = (function() { + v1alpha.DatabaseDumpSpec = (function() { /** - * Properties of a MetadataExport. + * Properties of a DatabaseDumpSpec. * @memberof google.cloud.metastore.v1alpha - * @interface IMetadataExport - * @property {string|null} [destinationGcsUri] MetadataExport destinationGcsUri - * @property {google.protobuf.ITimestamp|null} [startTime] MetadataExport startTime - * @property {google.protobuf.ITimestamp|null} [endTime] MetadataExport endTime - * @property {google.cloud.metastore.v1alpha.MetadataExport.State|null} [state] MetadataExport state - * @property {google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|null} [databaseDumpType] MetadataExport databaseDumpType + * @interface IDatabaseDumpSpec */ /** - * Constructs a new MetadataExport. + * Constructs a new DatabaseDumpSpec. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a MetadataExport. - * @implements IMetadataExport + * @classdesc Represents a DatabaseDumpSpec. + * @implements IDatabaseDumpSpec * @constructor - * @param {google.cloud.metastore.v1alpha.IMetadataExport=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.IDatabaseDumpSpec=} [properties] Properties to set */ - function MetadataExport(properties) { + function DatabaseDumpSpec(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16043,147 +26793,63 @@ } /** - * MetadataExport destinationGcsUri. - * @member {string|null|undefined} destinationGcsUri - * @memberof google.cloud.metastore.v1alpha.MetadataExport - * @instance - */ - MetadataExport.prototype.destinationGcsUri = null; - - /** - * MetadataExport startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.metastore.v1alpha.MetadataExport - * @instance - */ - MetadataExport.prototype.startTime = null; - - /** - * MetadataExport endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.metastore.v1alpha.MetadataExport - * @instance - */ - MetadataExport.prototype.endTime = null; - - /** - * MetadataExport state. - * @member {google.cloud.metastore.v1alpha.MetadataExport.State} state - * @memberof google.cloud.metastore.v1alpha.MetadataExport - * @instance - */ - MetadataExport.prototype.state = 0; - - /** - * MetadataExport databaseDumpType. - * @member {google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type} databaseDumpType - * @memberof google.cloud.metastore.v1alpha.MetadataExport - * @instance - */ - MetadataExport.prototype.databaseDumpType = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MetadataExport destination. - * @member {"destinationGcsUri"|undefined} destination - * @memberof google.cloud.metastore.v1alpha.MetadataExport - * @instance - */ - Object.defineProperty(MetadataExport.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["destinationGcsUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MetadataExport instance using the specified properties. + * Creates a new DatabaseDumpSpec instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec * @static - * @param {google.cloud.metastore.v1alpha.IMetadataExport=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.MetadataExport} MetadataExport instance + * @param {google.cloud.metastore.v1alpha.IDatabaseDumpSpec=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.DatabaseDumpSpec} DatabaseDumpSpec instance */ - MetadataExport.create = function create(properties) { - return new MetadataExport(properties); + DatabaseDumpSpec.create = function create(properties) { + return new DatabaseDumpSpec(properties); }; /** - * Encodes the specified MetadataExport message. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataExport.verify|verify} messages. + * Encodes the specified DatabaseDumpSpec message. Does not implicitly {@link google.cloud.metastore.v1alpha.DatabaseDumpSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec * @static - * @param {google.cloud.metastore.v1alpha.IMetadataExport} message MetadataExport message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IDatabaseDumpSpec} message DatabaseDumpSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer - */ - MetadataExport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.destinationGcsUri != null && Object.hasOwnProperty.call(message, "destinationGcsUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationGcsUri); - if (message.databaseDumpType != null && Object.hasOwnProperty.call(message, "databaseDumpType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.databaseDumpType); + */ + DatabaseDumpSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); return writer; }; /** - * Encodes the specified MetadataExport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MetadataExport.verify|verify} messages. + * Encodes the specified DatabaseDumpSpec message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DatabaseDumpSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec * @static - * @param {google.cloud.metastore.v1alpha.IMetadataExport} message MetadataExport message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IDatabaseDumpSpec} message DatabaseDumpSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataExport.encodeDelimited = function encodeDelimited(message, writer) { + DatabaseDumpSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetadataExport message from the specified reader or buffer. + * Decodes a DatabaseDumpSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.MetadataExport} MetadataExport + * @returns {google.cloud.metastore.v1alpha.DatabaseDumpSpec} DatabaseDumpSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataExport.decode = function decode(reader, length) { + DatabaseDumpSpec.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.MetadataExport(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: { - message.destinationGcsUri = reader.string(); - break; - } - case 1: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.state = reader.int32(); - break; - } - case 5: { - message.databaseDumpType = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -16193,255 +26859,336 @@ }; /** - * Decodes a MetadataExport message from the specified reader or buffer, length delimited. + * Decodes a DatabaseDumpSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.MetadataExport} MetadataExport + * @returns {google.cloud.metastore.v1alpha.DatabaseDumpSpec} DatabaseDumpSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataExport.decodeDelimited = function decodeDelimited(reader) { + DatabaseDumpSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetadataExport message. + * Verifies a DatabaseDumpSpec message. * @function verify - * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetadataExport.verify = function verify(message) { + DatabaseDumpSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.destinationGcsUri != null && message.hasOwnProperty("destinationGcsUri")) { - properties.destination = 1; - if (!$util.isString(message.destinationGcsUri)) - return "destinationGcsUri: string expected"; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) - switch (message.databaseDumpType) { - default: - return "databaseDumpType: enum value expected"; - case 0: - case 1: - case 2: - break; - } return null; }; /** - * Creates a MetadataExport message from a plain object. Also converts values to their respective internal types. + * Creates a DatabaseDumpSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.MetadataExport} MetadataExport + * @returns {google.cloud.metastore.v1alpha.DatabaseDumpSpec} DatabaseDumpSpec */ - MetadataExport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.MetadataExport) + DatabaseDumpSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec) return object; - var message = new $root.google.cloud.metastore.v1alpha.MetadataExport(); - if (object.destinationGcsUri != null) - message.destinationGcsUri = String(object.destinationGcsUri); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.MetadataExport.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.MetadataExport.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "RUNNING": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - case "CANCELLED": - case 4: - message.state = 4; - break; - } - switch (object.databaseDumpType) { - default: - if (typeof object.databaseDumpType === "number") { - message.databaseDumpType = object.databaseDumpType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.databaseDumpType = 0; - break; - case "MYSQL": - case 1: - message.databaseDumpType = 1; - break; - case "AVRO": - case 2: - message.databaseDumpType = 2; - break; - } - return message; + return new $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec(); }; /** - * Creates a plain object from a MetadataExport message. Also converts values to other types if specified. + * Creates a plain object from a DatabaseDumpSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec * @static - * @param {google.cloud.metastore.v1alpha.MetadataExport} message MetadataExport + * @param {google.cloud.metastore.v1alpha.DatabaseDumpSpec} message DatabaseDumpSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetadataExport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.databaseDumpType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.metastore.v1alpha.MetadataExport.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1alpha.MetadataExport.State[message.state] : message.state; - if (message.destinationGcsUri != null && message.hasOwnProperty("destinationGcsUri")) { - object.destinationGcsUri = message.destinationGcsUri; - if (options.oneofs) - object.destination = "destinationGcsUri"; - } - if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) - object.databaseDumpType = options.enums === String ? $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type[message.databaseDumpType] === undefined ? message.databaseDumpType : $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type[message.databaseDumpType] : message.databaseDumpType; - return object; + DatabaseDumpSpec.toObject = function toObject() { + return {}; }; /** - * Converts this MetadataExport to JSON. + * Converts this DatabaseDumpSpec to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec * @instance * @returns {Object.} JSON object */ - MetadataExport.prototype.toJSON = function toJSON() { + DatabaseDumpSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetadataExport + * Gets the default type url for DatabaseDumpSpec * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.MetadataExport + * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetadataExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DatabaseDumpSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.MetadataExport"; + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.DatabaseDumpSpec"; }; /** - * State enum. - * @name google.cloud.metastore.v1alpha.MetadataExport.State + * Type enum. + * @name google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - * @property {number} CANCELLED=4 CANCELLED value + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} MYSQL=1 MYSQL value + * @property {number} AVRO=2 AVRO value */ - MetadataExport.State = (function() { + DatabaseDumpSpec.Type = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "CANCELLED"] = 4; + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MYSQL"] = 1; + values[valuesById[2] = "AVRO"] = 2; return values; })(); - return MetadataExport; + return DatabaseDumpSpec; })(); - v1alpha.Backup = (function() { + v1alpha.DataprocMetastoreFederation = (function() { /** - * Properties of a Backup. + * Constructs a new DataprocMetastoreFederation service. * @memberof google.cloud.metastore.v1alpha - * @interface IBackup - * @property {string|null} [name] Backup name - * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime - * @property {google.protobuf.ITimestamp|null} [endTime] Backup endTime - * @property {google.cloud.metastore.v1alpha.Backup.State|null} [state] Backup state - * @property {google.cloud.metastore.v1alpha.IService|null} [serviceRevision] Backup serviceRevision - * @property {string|null} [description] Backup description - * @property {Array.|null} [restoringServices] Backup restoringServices + * @classdesc Represents a DataprocMetastoreFederation + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function DataprocMetastoreFederation(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataprocMetastoreFederation.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataprocMetastoreFederation; /** - * Constructs a new Backup. + * Creates new DataprocMetastoreFederation service using the specified rpc implementation. + * @function create + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {DataprocMetastoreFederation} RPC service. Useful where requests and/or responses are streamed. + */ + DataprocMetastoreFederation.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastoreFederation|listFederations}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @typedef ListFederationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1alpha.ListFederationsResponse} [response] ListFederationsResponse + */ + + /** + * Calls ListFederations. + * @function listFederations + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1alpha.IListFederationsRequest} request ListFederationsRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastoreFederation.ListFederationsCallback} callback Node-style callback called with the error, if any, and ListFederationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastoreFederation.prototype.listFederations = function listFederations(request, callback) { + return this.rpcCall(listFederations, $root.google.cloud.metastore.v1alpha.ListFederationsRequest, $root.google.cloud.metastore.v1alpha.ListFederationsResponse, request, callback); + }, "name", { value: "ListFederations" }); + + /** + * Calls ListFederations. + * @function listFederations + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1alpha.IListFederationsRequest} request ListFederationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastoreFederation|getFederation}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @typedef GetFederationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1alpha.Federation} [response] Federation + */ + + /** + * Calls GetFederation. + * @function getFederation + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1alpha.IGetFederationRequest} request GetFederationRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastoreFederation.GetFederationCallback} callback Node-style callback called with the error, if any, and Federation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastoreFederation.prototype.getFederation = function getFederation(request, callback) { + return this.rpcCall(getFederation, $root.google.cloud.metastore.v1alpha.GetFederationRequest, $root.google.cloud.metastore.v1alpha.Federation, request, callback); + }, "name", { value: "GetFederation" }); + + /** + * Calls GetFederation. + * @function getFederation + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1alpha.IGetFederationRequest} request GetFederationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastoreFederation|createFederation}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @typedef CreateFederationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateFederation. + * @function createFederation + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1alpha.ICreateFederationRequest} request CreateFederationRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastoreFederation.CreateFederationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastoreFederation.prototype.createFederation = function createFederation(request, callback) { + return this.rpcCall(createFederation, $root.google.cloud.metastore.v1alpha.CreateFederationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateFederation" }); + + /** + * Calls CreateFederation. + * @function createFederation + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1alpha.ICreateFederationRequest} request CreateFederationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastoreFederation|updateFederation}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @typedef UpdateFederationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateFederation. + * @function updateFederation + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1alpha.IUpdateFederationRequest} request UpdateFederationRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastoreFederation.UpdateFederationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastoreFederation.prototype.updateFederation = function updateFederation(request, callback) { + return this.rpcCall(updateFederation, $root.google.cloud.metastore.v1alpha.UpdateFederationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateFederation" }); + + /** + * Calls UpdateFederation. + * @function updateFederation + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1alpha.IUpdateFederationRequest} request UpdateFederationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1alpha.DataprocMetastoreFederation|deleteFederation}. + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @typedef DeleteFederationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteFederation. + * @function deleteFederation + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1alpha.IDeleteFederationRequest} request DeleteFederationRequest message or plain object + * @param {google.cloud.metastore.v1alpha.DataprocMetastoreFederation.DeleteFederationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastoreFederation.prototype.deleteFederation = function deleteFederation(request, callback) { + return this.rpcCall(deleteFederation, $root.google.cloud.metastore.v1alpha.DeleteFederationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteFederation" }); + + /** + * Calls DeleteFederation. + * @function deleteFederation + * @memberof google.cloud.metastore.v1alpha.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1alpha.IDeleteFederationRequest} request DeleteFederationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataprocMetastoreFederation; + })(); + + v1alpha.Federation = (function() { + + /** + * Properties of a Federation. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a Backup. - * @implements IBackup + * @interface IFederation + * @property {string|null} [name] Federation name + * @property {google.protobuf.ITimestamp|null} [createTime] Federation createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Federation updateTime + * @property {Object.|null} [labels] Federation labels + * @property {string|null} [version] Federation version + * @property {Object.|null} [backendMetastores] Federation backendMetastores + * @property {string|null} [endpointUri] Federation endpointUri + * @property {google.cloud.metastore.v1alpha.Federation.State|null} [state] Federation state + * @property {string|null} [stateMessage] Federation stateMessage + * @property {string|null} [uid] Federation uid + */ + + /** + * Constructs a new Federation. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a Federation. + * @implements IFederation * @constructor - * @param {google.cloud.metastore.v1alpha.IBackup=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.IFederation=} [properties] Properties to set */ - function Backup(properties) { - this.restoringServices = []; + function Federation(properties) { + this.labels = {}; + this.backendMetastores = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16449,131 +27196,164 @@ } /** - * Backup name. + * Federation name. * @member {string} name - * @memberof google.cloud.metastore.v1alpha.Backup + * @memberof google.cloud.metastore.v1alpha.Federation * @instance */ - Backup.prototype.name = ""; + Federation.prototype.name = ""; /** - * Backup createTime. + * Federation createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.metastore.v1alpha.Backup + * @memberof google.cloud.metastore.v1alpha.Federation * @instance */ - Backup.prototype.createTime = null; + Federation.prototype.createTime = null; /** - * Backup endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.metastore.v1alpha.Backup + * Federation updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.metastore.v1alpha.Federation * @instance */ - Backup.prototype.endTime = null; + Federation.prototype.updateTime = null; /** - * Backup state. - * @member {google.cloud.metastore.v1alpha.Backup.State} state - * @memberof google.cloud.metastore.v1alpha.Backup + * Federation labels. + * @member {Object.} labels + * @memberof google.cloud.metastore.v1alpha.Federation * @instance */ - Backup.prototype.state = 0; + Federation.prototype.labels = $util.emptyObject; /** - * Backup serviceRevision. - * @member {google.cloud.metastore.v1alpha.IService|null|undefined} serviceRevision - * @memberof google.cloud.metastore.v1alpha.Backup + * Federation version. + * @member {string} version + * @memberof google.cloud.metastore.v1alpha.Federation * @instance */ - Backup.prototype.serviceRevision = null; + Federation.prototype.version = ""; /** - * Backup description. - * @member {string} description - * @memberof google.cloud.metastore.v1alpha.Backup + * Federation backendMetastores. + * @member {Object.} backendMetastores + * @memberof google.cloud.metastore.v1alpha.Federation * @instance */ - Backup.prototype.description = ""; + Federation.prototype.backendMetastores = $util.emptyObject; /** - * Backup restoringServices. - * @member {Array.} restoringServices - * @memberof google.cloud.metastore.v1alpha.Backup + * Federation endpointUri. + * @member {string} endpointUri + * @memberof google.cloud.metastore.v1alpha.Federation * @instance */ - Backup.prototype.restoringServices = $util.emptyArray; + Federation.prototype.endpointUri = ""; /** - * Creates a new Backup instance using the specified properties. + * Federation state. + * @member {google.cloud.metastore.v1alpha.Federation.State} state + * @memberof google.cloud.metastore.v1alpha.Federation + * @instance + */ + Federation.prototype.state = 0; + + /** + * Federation stateMessage. + * @member {string} stateMessage + * @memberof google.cloud.metastore.v1alpha.Federation + * @instance + */ + Federation.prototype.stateMessage = ""; + + /** + * Federation uid. + * @member {string} uid + * @memberof google.cloud.metastore.v1alpha.Federation + * @instance + */ + Federation.prototype.uid = ""; + + /** + * Creates a new Federation instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.Backup + * @memberof google.cloud.metastore.v1alpha.Federation * @static - * @param {google.cloud.metastore.v1alpha.IBackup=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.Backup} Backup instance + * @param {google.cloud.metastore.v1alpha.IFederation=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.Federation} Federation instance */ - Backup.create = function create(properties) { - return new Backup(properties); + Federation.create = function create(properties) { + return new Federation(properties); }; /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.metastore.v1alpha.Backup.verify|verify} messages. + * Encodes the specified Federation message. Does not implicitly {@link google.cloud.metastore.v1alpha.Federation.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.Backup + * @memberof google.cloud.metastore.v1alpha.Federation * @static - * @param {google.cloud.metastore.v1alpha.IBackup} message Backup message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IFederation} message Federation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Backup.encode = function encode(message, writer) { + Federation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + if (message.backendMetastores != null && Object.hasOwnProperty.call(message, "backendMetastores")) + for (var keys = Object.keys(message.backendMetastores), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); + $root.google.cloud.metastore.v1alpha.BackendMetastore.encode(message.backendMetastores[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.endpointUri != null && Object.hasOwnProperty.call(message, "endpointUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.endpointUri); if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.serviceRevision != null && Object.hasOwnProperty.call(message, "serviceRevision")) - $root.google.cloud.metastore.v1alpha.Service.encode(message.serviceRevision, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.restoringServices != null && message.restoringServices.length) - for (var i = 0; i < message.restoringServices.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.restoringServices[i]); + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.stateMessage != null && Object.hasOwnProperty.call(message, "stateMessage")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.stateMessage); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.uid); return writer; }; /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Backup.verify|verify} messages. + * Encodes the specified Federation message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Federation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.Backup + * @memberof google.cloud.metastore.v1alpha.Federation * @static - * @param {google.cloud.metastore.v1alpha.IBackup} message Backup message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IFederation} message Federation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Backup.encodeDelimited = function encodeDelimited(message, writer) { + Federation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Backup message from the specified reader or buffer. + * Decodes a Federation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.Backup + * @memberof google.cloud.metastore.v1alpha.Federation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.Backup} Backup + * @returns {google.cloud.metastore.v1alpha.Federation} Federation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Backup.decode = function decode(reader, length) { + Federation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.Backup(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.Federation(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -16586,25 +27366,73 @@ break; } case 3: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - message.state = reader.int32(); + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; } case 5: { - message.serviceRevision = $root.google.cloud.metastore.v1alpha.Service.decode(reader, reader.uint32()); + message.version = reader.string(); break; } case 6: { - message.description = reader.string(); + if (message.backendMetastores === $util.emptyObject) + message.backendMetastores = {}; + var end2 = reader.uint32() + reader.pos; + key = 0; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.int32(); + break; + case 2: + value = $root.google.cloud.metastore.v1alpha.BackendMetastore.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.backendMetastores[key] = value; break; } case 7: { - if (!(message.restoringServices && message.restoringServices.length)) - message.restoringServices = []; - message.restoringServices.push(reader.string()); + message.endpointUri = reader.string(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 9: { + message.stateMessage = reader.string(); + break; + } + case 10: { + message.uid = reader.string(); break; } default: @@ -16616,30 +27444,30 @@ }; /** - * Decodes a Backup message from the specified reader or buffer, length delimited. + * Decodes a Federation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.Backup + * @memberof google.cloud.metastore.v1alpha.Federation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.Backup} Backup + * @returns {google.cloud.metastore.v1alpha.Federation} Federation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Backup.decodeDelimited = function decodeDelimited(reader) { + Federation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Backup message. + * Verifies a Federation message. * @function verify - * @memberof google.cloud.metastore.v1alpha.Backup + * @memberof google.cloud.metastore.v1alpha.Federation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Backup.verify = function verify(message) { + Federation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -16650,11 +27478,39 @@ if (error) return "createTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "endTime." + error; + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.backendMetastores != null && message.hasOwnProperty("backendMetastores")) { + if (!$util.isObject(message.backendMetastores)) + return "backendMetastores: object expected"; + var key = Object.keys(message.backendMetastores); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "backendMetastores: integer key{k:int32} expected"; + { + var error = $root.google.cloud.metastore.v1alpha.BackendMetastore.verify(message.backendMetastores[key[i]]); + if (error) + return "backendMetastores." + error; + } + } } + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + if (!$util.isString(message.endpointUri)) + return "endpointUri: string expected"; if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: @@ -16667,48 +27523,60 @@ case 5: break; } - if (message.serviceRevision != null && message.hasOwnProperty("serviceRevision")) { - var error = $root.google.cloud.metastore.v1alpha.Service.verify(message.serviceRevision); - if (error) - return "serviceRevision." + error; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.restoringServices != null && message.hasOwnProperty("restoringServices")) { - if (!Array.isArray(message.restoringServices)) - return "restoringServices: array expected"; - for (var i = 0; i < message.restoringServices.length; ++i) - if (!$util.isString(message.restoringServices[i])) - return "restoringServices: string[] expected"; - } + if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) + if (!$util.isString(message.stateMessage)) + return "stateMessage: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; return null; }; /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * Creates a Federation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.Backup + * @memberof google.cloud.metastore.v1alpha.Federation * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.Backup} Backup + * @returns {google.cloud.metastore.v1alpha.Federation} Federation */ - Backup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.Backup) + Federation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.Federation) return object; - var message = new $root.google.cloud.metastore.v1alpha.Backup(); + var message = new $root.google.cloud.metastore.v1alpha.Federation(); if (object.name != null) message.name = String(object.name); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.Backup.createTime: object expected"); + throw TypeError(".google.cloud.metastore.v1alpha.Federation.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.Backup.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Federation.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Federation.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.version != null) + message.version = String(object.version); + if (object.backendMetastores) { + if (typeof object.backendMetastores !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Federation.backendMetastores: object expected"); + message.backendMetastores = {}; + for (var keys = Object.keys(object.backendMetastores), i = 0; i < keys.length; ++i) { + if (typeof object.backendMetastores[keys[i]] !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Federation.backendMetastores: object expected"); + message.backendMetastores[keys[i]] = $root.google.cloud.metastore.v1alpha.BackendMetastore.fromObject(object.backendMetastores[keys[i]]); + } } + if (object.endpointUri != null) + message.endpointUri = String(object.endpointUri); switch (object.state) { default: if (typeof object.state === "number") { @@ -16724,157 +27592,157 @@ case 1: message.state = 1; break; - case "DELETING": + case "ACTIVE": case 2: message.state = 2; break; - case "ACTIVE": + case "UPDATING": case 3: message.state = 3; break; - case "FAILED": + case "DELETING": case 4: message.state = 4; break; - case "RESTORING": + case "ERROR": case 5: message.state = 5; break; } - if (object.serviceRevision != null) { - if (typeof object.serviceRevision !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.Backup.serviceRevision: object expected"); - message.serviceRevision = $root.google.cloud.metastore.v1alpha.Service.fromObject(object.serviceRevision); - } - if (object.description != null) - message.description = String(object.description); - if (object.restoringServices) { - if (!Array.isArray(object.restoringServices)) - throw TypeError(".google.cloud.metastore.v1alpha.Backup.restoringServices: array expected"); - message.restoringServices = []; - for (var i = 0; i < object.restoringServices.length; ++i) - message.restoringServices[i] = String(object.restoringServices[i]); - } + if (object.stateMessage != null) + message.stateMessage = String(object.stateMessage); + if (object.uid != null) + message.uid = String(object.uid); return message; }; /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. + * Creates a plain object from a Federation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.Backup + * @memberof google.cloud.metastore.v1alpha.Federation * @static - * @param {google.cloud.metastore.v1alpha.Backup} message Backup + * @param {google.cloud.metastore.v1alpha.Federation} message Federation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Backup.toObject = function toObject(message, options) { + Federation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.restoringServices = []; + if (options.objects || options.defaults) { + object.labels = {}; + object.backendMetastores = {}; + } if (options.defaults) { object.name = ""; object.createTime = null; - object.endTime = null; + object.updateTime = null; + object.version = ""; + object.endpointUri = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.serviceRevision = null; - object.description = ""; + object.stateMessage = ""; + object.uid = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.metastore.v1alpha.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1alpha.Backup.State[message.state] : message.state; - if (message.serviceRevision != null && message.hasOwnProperty("serviceRevision")) - object.serviceRevision = $root.google.cloud.metastore.v1alpha.Service.toObject(message.serviceRevision, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.restoringServices && message.restoringServices.length) { - object.restoringServices = []; - for (var j = 0; j < message.restoringServices.length; ++j) - object.restoringServices[j] = message.restoringServices[j]; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.backendMetastores && (keys2 = Object.keys(message.backendMetastores)).length) { + object.backendMetastores = {}; + for (var j = 0; j < keys2.length; ++j) + object.backendMetastores[keys2[j]] = $root.google.cloud.metastore.v1alpha.BackendMetastore.toObject(message.backendMetastores[keys2[j]], options); } + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + object.endpointUri = message.endpointUri; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1alpha.Federation.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1alpha.Federation.State[message.state] : message.state; + if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) + object.stateMessage = message.stateMessage; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; return object; }; /** - * Converts this Backup to JSON. + * Converts this Federation to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.Backup + * @memberof google.cloud.metastore.v1alpha.Federation * @instance * @returns {Object.} JSON object */ - Backup.prototype.toJSON = function toJSON() { + Federation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Backup + * Gets the default type url for Federation * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.Backup + * @memberof google.cloud.metastore.v1alpha.Federation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Federation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.Backup"; + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.Federation"; }; /** * State enum. - * @name google.cloud.metastore.v1alpha.Backup.State + * @name google.cloud.metastore.v1alpha.Federation.State * @enum {number} * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value * @property {number} CREATING=1 CREATING value - * @property {number} DELETING=2 DELETING value - * @property {number} ACTIVE=3 ACTIVE value - * @property {number} FAILED=4 FAILED value - * @property {number} RESTORING=5 RESTORING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} UPDATING=3 UPDATING value + * @property {number} DELETING=4 DELETING value + * @property {number} ERROR=5 ERROR value */ - Backup.State = (function() { + Federation.State = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "DELETING"] = 2; - values[valuesById[3] = "ACTIVE"] = 3; - values[valuesById[4] = "FAILED"] = 4; - values[valuesById[5] = "RESTORING"] = 5; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "DELETING"] = 4; + values[valuesById[5] = "ERROR"] = 5; return values; })(); - return Backup; + return Federation; })(); - v1alpha.Restore = (function() { + v1alpha.BackendMetastore = (function() { /** - * Properties of a Restore. + * Properties of a BackendMetastore. * @memberof google.cloud.metastore.v1alpha - * @interface IRestore - * @property {google.protobuf.ITimestamp|null} [startTime] Restore startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Restore endTime - * @property {google.cloud.metastore.v1alpha.Restore.State|null} [state] Restore state - * @property {string|null} [backup] Restore backup - * @property {google.cloud.metastore.v1alpha.Restore.RestoreType|null} [type] Restore type - * @property {string|null} [details] Restore details + * @interface IBackendMetastore + * @property {string|null} [name] BackendMetastore name + * @property {google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType|null} [metastoreType] BackendMetastore metastoreType */ /** - * Constructs a new Restore. + * Constructs a new BackendMetastore. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a Restore. - * @implements IRestore + * @classdesc Represents a BackendMetastore. + * @implements IBackendMetastore * @constructor - * @param {google.cloud.metastore.v1alpha.IRestore=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.IBackendMetastore=} [properties] Properties to set */ - function Restore(properties) { + function BackendMetastore(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16882,145 +27750,89 @@ } /** - * Restore startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.metastore.v1alpha.Restore - * @instance - */ - Restore.prototype.startTime = null; - - /** - * Restore endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.metastore.v1alpha.Restore - * @instance - */ - Restore.prototype.endTime = null; - - /** - * Restore state. - * @member {google.cloud.metastore.v1alpha.Restore.State} state - * @memberof google.cloud.metastore.v1alpha.Restore - * @instance - */ - Restore.prototype.state = 0; - - /** - * Restore backup. - * @member {string} backup - * @memberof google.cloud.metastore.v1alpha.Restore - * @instance - */ - Restore.prototype.backup = ""; - - /** - * Restore type. - * @member {google.cloud.metastore.v1alpha.Restore.RestoreType} type - * @memberof google.cloud.metastore.v1alpha.Restore + * BackendMetastore name. + * @member {string} name + * @memberof google.cloud.metastore.v1alpha.BackendMetastore * @instance */ - Restore.prototype.type = 0; + BackendMetastore.prototype.name = ""; /** - * Restore details. - * @member {string} details - * @memberof google.cloud.metastore.v1alpha.Restore + * BackendMetastore metastoreType. + * @member {google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType} metastoreType + * @memberof google.cloud.metastore.v1alpha.BackendMetastore * @instance */ - Restore.prototype.details = ""; + BackendMetastore.prototype.metastoreType = 0; /** - * Creates a new Restore instance using the specified properties. + * Creates a new BackendMetastore instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.Restore + * @memberof google.cloud.metastore.v1alpha.BackendMetastore * @static - * @param {google.cloud.metastore.v1alpha.IRestore=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.Restore} Restore instance + * @param {google.cloud.metastore.v1alpha.IBackendMetastore=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.BackendMetastore} BackendMetastore instance */ - Restore.create = function create(properties) { - return new Restore(properties); + BackendMetastore.create = function create(properties) { + return new BackendMetastore(properties); }; /** - * Encodes the specified Restore message. Does not implicitly {@link google.cloud.metastore.v1alpha.Restore.verify|verify} messages. + * Encodes the specified BackendMetastore message. Does not implicitly {@link google.cloud.metastore.v1alpha.BackendMetastore.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.Restore + * @memberof google.cloud.metastore.v1alpha.BackendMetastore * @static - * @param {google.cloud.metastore.v1alpha.IRestore} message Restore message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IBackendMetastore} message BackendMetastore message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Restore.encode = function encode(message, writer) { + BackendMetastore.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.backup); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.details != null && Object.hasOwnProperty.call(message, "details")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.details); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metastoreType != null && Object.hasOwnProperty.call(message, "metastoreType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.metastoreType); return writer; }; /** - * Encodes the specified Restore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Restore.verify|verify} messages. + * Encodes the specified BackendMetastore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.BackendMetastore.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.Restore + * @memberof google.cloud.metastore.v1alpha.BackendMetastore * @static - * @param {google.cloud.metastore.v1alpha.IRestore} message Restore message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IBackendMetastore} message BackendMetastore message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Restore.encodeDelimited = function encodeDelimited(message, writer) { + BackendMetastore.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Restore message from the specified reader or buffer. + * Decodes a BackendMetastore message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.Restore + * @memberof google.cloud.metastore.v1alpha.BackendMetastore * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.Restore} Restore + * @returns {google.cloud.metastore.v1alpha.BackendMetastore} BackendMetastore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Restore.decode = function decode(reader, length) { + BackendMetastore.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.Restore(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.BackendMetastore(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.state = reader.int32(); - break; - } - case 4: { - message.backup = reader.string(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.details = reader.string(); + message.metastoreType = reader.int32(); break; } default: @@ -17032,271 +27844,175 @@ }; /** - * Decodes a Restore message from the specified reader or buffer, length delimited. + * Decodes a BackendMetastore message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.Restore + * @memberof google.cloud.metastore.v1alpha.BackendMetastore * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.Restore} Restore + * @returns {google.cloud.metastore.v1alpha.BackendMetastore} BackendMetastore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Restore.decodeDelimited = function decodeDelimited(reader) { + BackendMetastore.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Restore message. + * Verifies a BackendMetastore message. * @function verify - * @memberof google.cloud.metastore.v1alpha.Restore + * @memberof google.cloud.metastore.v1alpha.BackendMetastore * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Restore.verify = function verify(message) { + BackendMetastore.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metastoreType != null && message.hasOwnProperty("metastoreType")) + switch (message.metastoreType) { default: - return "state: enum value expected"; + return "metastoreType: enum value expected"; case 0: - case 1: case 2: case 3: - case 4: - break; - } - if (message.backup != null && message.hasOwnProperty("backup")) - if (!$util.isString(message.backup)) - return "backup: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: break; } - if (message.details != null && message.hasOwnProperty("details")) - if (!$util.isString(message.details)) - return "details: string expected"; return null; }; /** - * Creates a Restore message from a plain object. Also converts values to their respective internal types. + * Creates a BackendMetastore message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.Restore + * @memberof google.cloud.metastore.v1alpha.BackendMetastore * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.Restore} Restore + * @returns {google.cloud.metastore.v1alpha.BackendMetastore} BackendMetastore */ - Restore.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.Restore) + BackendMetastore.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.BackendMetastore) return object; - var message = new $root.google.cloud.metastore.v1alpha.Restore(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.Restore.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.Restore.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { + var message = new $root.google.cloud.metastore.v1alpha.BackendMetastore(); + if (object.name != null) + message.name = String(object.name); + switch (object.metastoreType) { default: - if (typeof object.state === "number") { - message.state = object.state; + if (typeof object.metastoreType === "number") { + message.metastoreType = object.metastoreType; break; } break; - case "STATE_UNSPECIFIED": + case "METASTORE_TYPE_UNSPECIFIED": case 0: - message.state = 0; - break; - case "RUNNING": - case 1: - message.state = 1; + message.metastoreType = 0; break; - case "SUCCEEDED": + case "BIGQUERY": case 2: - message.state = 2; + message.metastoreType = 2; break; - case "FAILED": + case "DATAPROC_METASTORE": case 3: - message.state = 3; - break; - case "CANCELLED": - case 4: - message.state = 4; - break; - } - if (object.backup != null) - message.backup = String(object.backup); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "RESTORE_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "FULL": - case 1: - message.type = 1; - break; - case "METADATA_ONLY": - case 2: - message.type = 2; + message.metastoreType = 3; break; } - if (object.details != null) - message.details = String(object.details); return message; }; /** - * Creates a plain object from a Restore message. Also converts values to other types if specified. + * Creates a plain object from a BackendMetastore message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.Restore + * @memberof google.cloud.metastore.v1alpha.BackendMetastore * @static - * @param {google.cloud.metastore.v1alpha.Restore} message Restore + * @param {google.cloud.metastore.v1alpha.BackendMetastore} message BackendMetastore * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Restore.toObject = function toObject(message, options) { + BackendMetastore.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.startTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.backup = ""; - object.type = options.enums === String ? "RESTORE_TYPE_UNSPECIFIED" : 0; - object.details = ""; + object.name = ""; + object.metastoreType = options.enums === String ? "METASTORE_TYPE_UNSPECIFIED" : 0; } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.metastore.v1alpha.Restore.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1alpha.Restore.State[message.state] : message.state; - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = message.backup; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.metastore.v1alpha.Restore.RestoreType[message.type] === undefined ? message.type : $root.google.cloud.metastore.v1alpha.Restore.RestoreType[message.type] : message.type; - if (message.details != null && message.hasOwnProperty("details")) - object.details = message.details; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metastoreType != null && message.hasOwnProperty("metastoreType")) + object.metastoreType = options.enums === String ? $root.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType[message.metastoreType] === undefined ? message.metastoreType : $root.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType[message.metastoreType] : message.metastoreType; return object; }; /** - * Converts this Restore to JSON. + * Converts this BackendMetastore to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.Restore + * @memberof google.cloud.metastore.v1alpha.BackendMetastore * @instance * @returns {Object.} JSON object */ - Restore.prototype.toJSON = function toJSON() { + BackendMetastore.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Restore + * Gets the default type url for BackendMetastore * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.Restore + * @memberof google.cloud.metastore.v1alpha.BackendMetastore * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Restore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BackendMetastore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.Restore"; + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.BackendMetastore"; }; /** - * State enum. - * @name google.cloud.metastore.v1alpha.Restore.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - * @property {number} CANCELLED=4 CANCELLED value - */ - Restore.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "CANCELLED"] = 4; - return values; - })(); - - /** - * RestoreType enum. - * @name google.cloud.metastore.v1alpha.Restore.RestoreType + * MetastoreType enum. + * @name google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType * @enum {number} - * @property {number} RESTORE_TYPE_UNSPECIFIED=0 RESTORE_TYPE_UNSPECIFIED value - * @property {number} FULL=1 FULL value - * @property {number} METADATA_ONLY=2 METADATA_ONLY value + * @property {number} METASTORE_TYPE_UNSPECIFIED=0 METASTORE_TYPE_UNSPECIFIED value + * @property {number} BIGQUERY=2 BIGQUERY value + * @property {number} DATAPROC_METASTORE=3 DATAPROC_METASTORE value */ - Restore.RestoreType = (function() { + BackendMetastore.MetastoreType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESTORE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FULL"] = 1; - values[valuesById[2] = "METADATA_ONLY"] = 2; + values[valuesById[0] = "METASTORE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[2] = "BIGQUERY"] = 2; + values[valuesById[3] = "DATAPROC_METASTORE"] = 3; return values; })(); - return Restore; + return BackendMetastore; })(); - v1alpha.ListServicesRequest = (function() { + v1alpha.ListFederationsRequest = (function() { /** - * Properties of a ListServicesRequest. + * Properties of a ListFederationsRequest. * @memberof google.cloud.metastore.v1alpha - * @interface IListServicesRequest - * @property {string|null} [parent] ListServicesRequest parent - * @property {number|null} [pageSize] ListServicesRequest pageSize - * @property {string|null} [pageToken] ListServicesRequest pageToken - * @property {string|null} [filter] ListServicesRequest filter - * @property {string|null} [orderBy] ListServicesRequest orderBy + * @interface IListFederationsRequest + * @property {string|null} [parent] ListFederationsRequest parent + * @property {number|null} [pageSize] ListFederationsRequest pageSize + * @property {string|null} [pageToken] ListFederationsRequest pageToken + * @property {string|null} [filter] ListFederationsRequest filter + * @property {string|null} [orderBy] ListFederationsRequest orderBy */ /** - * Constructs a new ListServicesRequest. + * Constructs a new ListFederationsRequest. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a ListServicesRequest. - * @implements IListServicesRequest + * @classdesc Represents a ListFederationsRequest. + * @implements IListFederationsRequest * @constructor - * @param {google.cloud.metastore.v1alpha.IListServicesRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.IListFederationsRequest=} [properties] Properties to set */ - function ListServicesRequest(properties) { + function ListFederationsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17304,67 +28020,67 @@ } /** - * ListServicesRequest parent. + * ListFederationsRequest parent. * @member {string} parent - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @instance */ - ListServicesRequest.prototype.parent = ""; + ListFederationsRequest.prototype.parent = ""; /** - * ListServicesRequest pageSize. + * ListFederationsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @instance */ - ListServicesRequest.prototype.pageSize = 0; + ListFederationsRequest.prototype.pageSize = 0; /** - * ListServicesRequest pageToken. + * ListFederationsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @instance */ - ListServicesRequest.prototype.pageToken = ""; + ListFederationsRequest.prototype.pageToken = ""; /** - * ListServicesRequest filter. + * ListFederationsRequest filter. * @member {string} filter - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @instance */ - ListServicesRequest.prototype.filter = ""; + ListFederationsRequest.prototype.filter = ""; /** - * ListServicesRequest orderBy. + * ListFederationsRequest orderBy. * @member {string} orderBy - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @instance */ - ListServicesRequest.prototype.orderBy = ""; + ListFederationsRequest.prototype.orderBy = ""; /** - * Creates a new ListServicesRequest instance using the specified properties. + * Creates a new ListFederationsRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @static - * @param {google.cloud.metastore.v1alpha.IListServicesRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.ListServicesRequest} ListServicesRequest instance + * @param {google.cloud.metastore.v1alpha.IListFederationsRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.ListFederationsRequest} ListFederationsRequest instance */ - ListServicesRequest.create = function create(properties) { - return new ListServicesRequest(properties); + ListFederationsRequest.create = function create(properties) { + return new ListFederationsRequest(properties); }; /** - * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesRequest.verify|verify} messages. + * Encodes the specified ListFederationsRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListFederationsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @static - * @param {google.cloud.metastore.v1alpha.IListServicesRequest} message ListServicesRequest message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IListFederationsRequest} message ListFederationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesRequest.encode = function encode(message, writer) { + ListFederationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -17381,33 +28097,33 @@ }; /** - * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesRequest.verify|verify} messages. + * Encodes the specified ListFederationsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListFederationsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @static - * @param {google.cloud.metastore.v1alpha.IListServicesRequest} message ListServicesRequest message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IListFederationsRequest} message ListFederationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListFederationsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListServicesRequest message from the specified reader or buffer. + * Decodes a ListFederationsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.ListServicesRequest} ListServicesRequest + * @returns {google.cloud.metastore.v1alpha.ListFederationsRequest} ListFederationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesRequest.decode = function decode(reader, length) { + ListFederationsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ListServicesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ListFederationsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -17440,30 +28156,30 @@ }; /** - * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFederationsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.ListServicesRequest} ListServicesRequest + * @returns {google.cloud.metastore.v1alpha.ListFederationsRequest} ListFederationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesRequest.decodeDelimited = function decodeDelimited(reader) { + ListFederationsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListServicesRequest message. + * Verifies a ListFederationsRequest message. * @function verify - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListServicesRequest.verify = function verify(message) { + ListFederationsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -17485,17 +28201,17 @@ }; /** - * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFederationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.ListServicesRequest} ListServicesRequest + * @returns {google.cloud.metastore.v1alpha.ListFederationsRequest} ListFederationsRequest */ - ListServicesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.ListServicesRequest) + ListFederationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.ListFederationsRequest) return object; - var message = new $root.google.cloud.metastore.v1alpha.ListServicesRequest(); + var message = new $root.google.cloud.metastore.v1alpha.ListFederationsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -17510,15 +28226,15 @@ }; /** - * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListFederationsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @static - * @param {google.cloud.metastore.v1alpha.ListServicesRequest} message ListServicesRequest + * @param {google.cloud.metastore.v1alpha.ListFederationsRequest} message ListFederationsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListServicesRequest.toObject = function toObject(message, options) { + ListFederationsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -17543,55 +28259,55 @@ }; /** - * Converts this ListServicesRequest to JSON. + * Converts this ListFederationsRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @instance * @returns {Object.} JSON object */ - ListServicesRequest.prototype.toJSON = function toJSON() { + ListFederationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListServicesRequest + * Gets the default type url for ListFederationsRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.ListServicesRequest + * @memberof google.cloud.metastore.v1alpha.ListFederationsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListServicesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListFederationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ListServicesRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ListFederationsRequest"; }; - return ListServicesRequest; + return ListFederationsRequest; })(); - v1alpha.ListServicesResponse = (function() { - - /** - * Properties of a ListServicesResponse. - * @memberof google.cloud.metastore.v1alpha - * @interface IListServicesResponse - * @property {Array.|null} [services] ListServicesResponse services - * @property {string|null} [nextPageToken] ListServicesResponse nextPageToken - * @property {Array.|null} [unreachable] ListServicesResponse unreachable + v1alpha.ListFederationsResponse = (function() { + + /** + * Properties of a ListFederationsResponse. + * @memberof google.cloud.metastore.v1alpha + * @interface IListFederationsResponse + * @property {Array.|null} [federations] ListFederationsResponse federations + * @property {string|null} [nextPageToken] ListFederationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListFederationsResponse unreachable */ /** - * Constructs a new ListServicesResponse. + * Constructs a new ListFederationsResponse. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a ListServicesResponse. - * @implements IListServicesResponse + * @classdesc Represents a ListFederationsResponse. + * @implements IListFederationsResponse * @constructor - * @param {google.cloud.metastore.v1alpha.IListServicesResponse=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.IListFederationsResponse=} [properties] Properties to set */ - function ListServicesResponse(properties) { - this.services = []; + function ListFederationsResponse(properties) { + this.federations = []; this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -17600,56 +28316,56 @@ } /** - * ListServicesResponse services. - * @member {Array.} services - * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * ListFederationsResponse federations. + * @member {Array.} federations + * @memberof google.cloud.metastore.v1alpha.ListFederationsResponse * @instance */ - ListServicesResponse.prototype.services = $util.emptyArray; + ListFederationsResponse.prototype.federations = $util.emptyArray; /** - * ListServicesResponse nextPageToken. + * ListFederationsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @memberof google.cloud.metastore.v1alpha.ListFederationsResponse * @instance */ - ListServicesResponse.prototype.nextPageToken = ""; + ListFederationsResponse.prototype.nextPageToken = ""; /** - * ListServicesResponse unreachable. + * ListFederationsResponse unreachable. * @member {Array.} unreachable - * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @memberof google.cloud.metastore.v1alpha.ListFederationsResponse * @instance */ - ListServicesResponse.prototype.unreachable = $util.emptyArray; + ListFederationsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new ListServicesResponse instance using the specified properties. + * Creates a new ListFederationsResponse instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @memberof google.cloud.metastore.v1alpha.ListFederationsResponse * @static - * @param {google.cloud.metastore.v1alpha.IListServicesResponse=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.ListServicesResponse} ListServicesResponse instance + * @param {google.cloud.metastore.v1alpha.IListFederationsResponse=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.ListFederationsResponse} ListFederationsResponse instance */ - ListServicesResponse.create = function create(properties) { - return new ListServicesResponse(properties); + ListFederationsResponse.create = function create(properties) { + return new ListFederationsResponse(properties); }; /** - * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesResponse.verify|verify} messages. + * Encodes the specified ListFederationsResponse message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListFederationsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @memberof google.cloud.metastore.v1alpha.ListFederationsResponse * @static - * @param {google.cloud.metastore.v1alpha.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IListFederationsResponse} message ListFederationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesResponse.encode = function encode(message, writer) { + ListFederationsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.services != null && message.services.length) - for (var i = 0; i < message.services.length; ++i) - $root.google.cloud.metastore.v1alpha.Service.encode(message.services[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.federations != null && message.federations.length) + for (var i = 0; i < message.federations.length; ++i) + $root.google.cloud.metastore.v1alpha.Federation.encode(message.federations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); if (message.unreachable != null && message.unreachable.length) @@ -17659,40 +28375,40 @@ }; /** - * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListServicesResponse.verify|verify} messages. + * Encodes the specified ListFederationsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListFederationsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @memberof google.cloud.metastore.v1alpha.ListFederationsResponse * @static - * @param {google.cloud.metastore.v1alpha.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IListFederationsResponse} message ListFederationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListFederationsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListServicesResponse message from the specified reader or buffer. + * Decodes a ListFederationsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @memberof google.cloud.metastore.v1alpha.ListFederationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.ListServicesResponse} ListServicesResponse + * @returns {google.cloud.metastore.v1alpha.ListFederationsResponse} ListFederationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesResponse.decode = function decode(reader, length) { + ListFederationsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ListServicesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ListFederationsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.services && message.services.length)) - message.services = []; - message.services.push($root.google.cloud.metastore.v1alpha.Service.decode(reader, reader.uint32())); + if (!(message.federations && message.federations.length)) + message.federations = []; + message.federations.push($root.google.cloud.metastore.v1alpha.Federation.decode(reader, reader.uint32())); break; } case 2: { @@ -17714,39 +28430,39 @@ }; /** - * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListFederationsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @memberof google.cloud.metastore.v1alpha.ListFederationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.ListServicesResponse} ListServicesResponse + * @returns {google.cloud.metastore.v1alpha.ListFederationsResponse} ListFederationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesResponse.decodeDelimited = function decodeDelimited(reader) { + ListFederationsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListServicesResponse message. + * Verifies a ListFederationsResponse message. * @function verify - * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @memberof google.cloud.metastore.v1alpha.ListFederationsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListServicesResponse.verify = function verify(message) { + ListFederationsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.services != null && message.hasOwnProperty("services")) { - if (!Array.isArray(message.services)) - return "services: array expected"; - for (var i = 0; i < message.services.length; ++i) { - var error = $root.google.cloud.metastore.v1alpha.Service.verify(message.services[i]); + if (message.federations != null && message.hasOwnProperty("federations")) { + if (!Array.isArray(message.federations)) + return "federations: array expected"; + for (var i = 0; i < message.federations.length; ++i) { + var error = $root.google.cloud.metastore.v1alpha.Federation.verify(message.federations[i]); if (error) - return "services." + error; + return "federations." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -17763,32 +28479,32 @@ }; /** - * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListFederationsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @memberof google.cloud.metastore.v1alpha.ListFederationsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.ListServicesResponse} ListServicesResponse + * @returns {google.cloud.metastore.v1alpha.ListFederationsResponse} ListFederationsResponse */ - ListServicesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.ListServicesResponse) + ListFederationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.ListFederationsResponse) return object; - var message = new $root.google.cloud.metastore.v1alpha.ListServicesResponse(); - if (object.services) { - if (!Array.isArray(object.services)) - throw TypeError(".google.cloud.metastore.v1alpha.ListServicesResponse.services: array expected"); - message.services = []; - for (var i = 0; i < object.services.length; ++i) { - if (typeof object.services[i] !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.ListServicesResponse.services: object expected"); - message.services[i] = $root.google.cloud.metastore.v1alpha.Service.fromObject(object.services[i]); + var message = new $root.google.cloud.metastore.v1alpha.ListFederationsResponse(); + if (object.federations) { + if (!Array.isArray(object.federations)) + throw TypeError(".google.cloud.metastore.v1alpha.ListFederationsResponse.federations: array expected"); + message.federations = []; + for (var i = 0; i < object.federations.length; ++i) { + if (typeof object.federations[i] !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.ListFederationsResponse.federations: object expected"); + message.federations[i] = $root.google.cloud.metastore.v1alpha.Federation.fromObject(object.federations[i]); } } if (object.nextPageToken != null) message.nextPageToken = String(object.nextPageToken); if (object.unreachable) { if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.metastore.v1alpha.ListServicesResponse.unreachable: array expected"); + throw TypeError(".google.cloud.metastore.v1alpha.ListFederationsResponse.unreachable: array expected"); message.unreachable = []; for (var i = 0; i < object.unreachable.length; ++i) message.unreachable[i] = String(object.unreachable[i]); @@ -17797,28 +28513,28 @@ }; /** - * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListFederationsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @memberof google.cloud.metastore.v1alpha.ListFederationsResponse * @static - * @param {google.cloud.metastore.v1alpha.ListServicesResponse} message ListServicesResponse + * @param {google.cloud.metastore.v1alpha.ListFederationsResponse} message ListFederationsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListServicesResponse.toObject = function toObject(message, options) { + ListFederationsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.services = []; + object.federations = []; object.unreachable = []; } if (options.defaults) object.nextPageToken = ""; - if (message.services && message.services.length) { - object.services = []; - for (var j = 0; j < message.services.length; ++j) - object.services[j] = $root.google.cloud.metastore.v1alpha.Service.toObject(message.services[j], options); + if (message.federations && message.federations.length) { + object.federations = []; + for (var j = 0; j < message.federations.length; ++j) + object.federations[j] = $root.google.cloud.metastore.v1alpha.Federation.toObject(message.federations[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -17831,52 +28547,52 @@ }; /** - * Converts this ListServicesResponse to JSON. + * Converts this ListFederationsResponse to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @memberof google.cloud.metastore.v1alpha.ListFederationsResponse * @instance * @returns {Object.} JSON object */ - ListServicesResponse.prototype.toJSON = function toJSON() { + ListFederationsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListServicesResponse + * Gets the default type url for ListFederationsResponse * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.ListServicesResponse + * @memberof google.cloud.metastore.v1alpha.ListFederationsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListServicesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListFederationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ListServicesResponse"; + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ListFederationsResponse"; }; - return ListServicesResponse; + return ListFederationsResponse; })(); - v1alpha.GetServiceRequest = (function() { + v1alpha.GetFederationRequest = (function() { /** - * Properties of a GetServiceRequest. + * Properties of a GetFederationRequest. * @memberof google.cloud.metastore.v1alpha - * @interface IGetServiceRequest - * @property {string|null} [name] GetServiceRequest name + * @interface IGetFederationRequest + * @property {string|null} [name] GetFederationRequest name */ /** - * Constructs a new GetServiceRequest. + * Constructs a new GetFederationRequest. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a GetServiceRequest. - * @implements IGetServiceRequest + * @classdesc Represents a GetFederationRequest. + * @implements IGetFederationRequest * @constructor - * @param {google.cloud.metastore.v1alpha.IGetServiceRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.IGetFederationRequest=} [properties] Properties to set */ - function GetServiceRequest(properties) { + function GetFederationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17884,35 +28600,35 @@ } /** - * GetServiceRequest name. + * GetFederationRequest name. * @member {string} name - * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @memberof google.cloud.metastore.v1alpha.GetFederationRequest * @instance */ - GetServiceRequest.prototype.name = ""; + GetFederationRequest.prototype.name = ""; /** - * Creates a new GetServiceRequest instance using the specified properties. + * Creates a new GetFederationRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @memberof google.cloud.metastore.v1alpha.GetFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IGetServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.GetServiceRequest} GetServiceRequest instance + * @param {google.cloud.metastore.v1alpha.IGetFederationRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.GetFederationRequest} GetFederationRequest instance */ - GetServiceRequest.create = function create(properties) { - return new GetServiceRequest(properties); + GetFederationRequest.create = function create(properties) { + return new GetFederationRequest(properties); }; /** - * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.GetServiceRequest.verify|verify} messages. + * Encodes the specified GetFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.GetFederationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @memberof google.cloud.metastore.v1alpha.GetFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IGetServiceRequest} message GetServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IGetFederationRequest} message GetFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetServiceRequest.encode = function encode(message, writer) { + GetFederationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -17921,33 +28637,33 @@ }; /** - * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.GetServiceRequest.verify|verify} messages. + * Encodes the specified GetFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.GetFederationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @memberof google.cloud.metastore.v1alpha.GetFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IGetServiceRequest} message GetServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IGetFederationRequest} message GetFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetFederationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetServiceRequest message from the specified reader or buffer. + * Decodes a GetFederationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @memberof google.cloud.metastore.v1alpha.GetFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.GetServiceRequest} GetServiceRequest + * @returns {google.cloud.metastore.v1alpha.GetFederationRequest} GetFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetServiceRequest.decode = function decode(reader, length) { + GetFederationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.GetServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.GetFederationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -17964,30 +28680,30 @@ }; /** - * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a GetFederationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @memberof google.cloud.metastore.v1alpha.GetFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.GetServiceRequest} GetServiceRequest + * @returns {google.cloud.metastore.v1alpha.GetFederationRequest} GetFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetServiceRequest.decodeDelimited = function decodeDelimited(reader) { + GetFederationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetServiceRequest message. + * Verifies a GetFederationRequest message. * @function verify - * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @memberof google.cloud.metastore.v1alpha.GetFederationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetServiceRequest.verify = function verify(message) { + GetFederationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -17997,32 +28713,32 @@ }; /** - * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetFederationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @memberof google.cloud.metastore.v1alpha.GetFederationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.GetServiceRequest} GetServiceRequest + * @returns {google.cloud.metastore.v1alpha.GetFederationRequest} GetFederationRequest */ - GetServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.GetServiceRequest) + GetFederationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.GetFederationRequest) return object; - var message = new $root.google.cloud.metastore.v1alpha.GetServiceRequest(); + var message = new $root.google.cloud.metastore.v1alpha.GetFederationRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetFederationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @memberof google.cloud.metastore.v1alpha.GetFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.GetServiceRequest} message GetServiceRequest + * @param {google.cloud.metastore.v1alpha.GetFederationRequest} message GetFederationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetServiceRequest.toObject = function toObject(message, options) { + GetFederationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -18034,55 +28750,55 @@ }; /** - * Converts this GetServiceRequest to JSON. + * Converts this GetFederationRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @memberof google.cloud.metastore.v1alpha.GetFederationRequest * @instance * @returns {Object.} JSON object */ - GetServiceRequest.prototype.toJSON = function toJSON() { + GetFederationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetServiceRequest + * Gets the default type url for GetFederationRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.GetServiceRequest + * @memberof google.cloud.metastore.v1alpha.GetFederationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetFederationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.GetServiceRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.GetFederationRequest"; }; - return GetServiceRequest; + return GetFederationRequest; })(); - v1alpha.CreateServiceRequest = (function() { + v1alpha.CreateFederationRequest = (function() { /** - * Properties of a CreateServiceRequest. + * Properties of a CreateFederationRequest. * @memberof google.cloud.metastore.v1alpha - * @interface ICreateServiceRequest - * @property {string|null} [parent] CreateServiceRequest parent - * @property {string|null} [serviceId] CreateServiceRequest serviceId - * @property {google.cloud.metastore.v1alpha.IService|null} [service] CreateServiceRequest service - * @property {string|null} [requestId] CreateServiceRequest requestId + * @interface ICreateFederationRequest + * @property {string|null} [parent] CreateFederationRequest parent + * @property {string|null} [federationId] CreateFederationRequest federationId + * @property {google.cloud.metastore.v1alpha.IFederation|null} [federation] CreateFederationRequest federation + * @property {string|null} [requestId] CreateFederationRequest requestId */ /** - * Constructs a new CreateServiceRequest. + * Constructs a new CreateFederationRequest. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a CreateServiceRequest. - * @implements ICreateServiceRequest + * @classdesc Represents a CreateFederationRequest. + * @implements ICreateFederationRequest * @constructor - * @param {google.cloud.metastore.v1alpha.ICreateServiceRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.ICreateFederationRequest=} [properties] Properties to set */ - function CreateServiceRequest(properties) { + function CreateFederationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18090,100 +28806,100 @@ } /** - * CreateServiceRequest parent. + * CreateFederationRequest parent. * @member {string} parent - * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @memberof google.cloud.metastore.v1alpha.CreateFederationRequest * @instance */ - CreateServiceRequest.prototype.parent = ""; + CreateFederationRequest.prototype.parent = ""; /** - * CreateServiceRequest serviceId. - * @member {string} serviceId - * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * CreateFederationRequest federationId. + * @member {string} federationId + * @memberof google.cloud.metastore.v1alpha.CreateFederationRequest * @instance */ - CreateServiceRequest.prototype.serviceId = ""; + CreateFederationRequest.prototype.federationId = ""; /** - * CreateServiceRequest service. - * @member {google.cloud.metastore.v1alpha.IService|null|undefined} service - * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * CreateFederationRequest federation. + * @member {google.cloud.metastore.v1alpha.IFederation|null|undefined} federation + * @memberof google.cloud.metastore.v1alpha.CreateFederationRequest * @instance */ - CreateServiceRequest.prototype.service = null; + CreateFederationRequest.prototype.federation = null; /** - * CreateServiceRequest requestId. + * CreateFederationRequest requestId. * @member {string} requestId - * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @memberof google.cloud.metastore.v1alpha.CreateFederationRequest * @instance */ - CreateServiceRequest.prototype.requestId = ""; + CreateFederationRequest.prototype.requestId = ""; /** - * Creates a new CreateServiceRequest instance using the specified properties. + * Creates a new CreateFederationRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @memberof google.cloud.metastore.v1alpha.CreateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.ICreateServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.CreateServiceRequest} CreateServiceRequest instance + * @param {google.cloud.metastore.v1alpha.ICreateFederationRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.CreateFederationRequest} CreateFederationRequest instance */ - CreateServiceRequest.create = function create(properties) { - return new CreateServiceRequest(properties); + CreateFederationRequest.create = function create(properties) { + return new CreateFederationRequest(properties); }; /** - * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateServiceRequest.verify|verify} messages. + * Encodes the specified CreateFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateFederationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @memberof google.cloud.metastore.v1alpha.CreateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1alpha.ICreateFederationRequest} message CreateFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateServiceRequest.encode = function encode(message, writer) { + CreateFederationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.serviceId != null && Object.hasOwnProperty.call(message, "serviceId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceId); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - $root.google.cloud.metastore.v1alpha.Service.encode(message.service, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.federationId != null && Object.hasOwnProperty.call(message, "federationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.federationId); + if (message.federation != null && Object.hasOwnProperty.call(message, "federation")) + $root.google.cloud.metastore.v1alpha.Federation.encode(message.federation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; /** - * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateServiceRequest.verify|verify} messages. + * Encodes the specified CreateFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateFederationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @memberof google.cloud.metastore.v1alpha.CreateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1alpha.ICreateFederationRequest} message CreateFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateFederationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer. + * Decodes a CreateFederationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @memberof google.cloud.metastore.v1alpha.CreateFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.CreateServiceRequest} CreateServiceRequest + * @returns {google.cloud.metastore.v1alpha.CreateFederationRequest} CreateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateServiceRequest.decode = function decode(reader, length) { + CreateFederationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.CreateServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.CreateFederationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -18192,11 +28908,11 @@ break; } case 2: { - message.serviceId = reader.string(); + message.federationId = reader.string(); break; } case 3: { - message.service = $root.google.cloud.metastore.v1alpha.Service.decode(reader, reader.uint32()); + message.federation = $root.google.cloud.metastore.v1alpha.Federation.decode(reader, reader.uint32()); break; } case 4: { @@ -18212,42 +28928,42 @@ }; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFederationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @memberof google.cloud.metastore.v1alpha.CreateFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.CreateServiceRequest} CreateServiceRequest + * @returns {google.cloud.metastore.v1alpha.CreateFederationRequest} CreateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateServiceRequest.decodeDelimited = function decodeDelimited(reader) { + CreateFederationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateServiceRequest message. + * Verifies a CreateFederationRequest message. * @function verify - * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @memberof google.cloud.metastore.v1alpha.CreateFederationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateServiceRequest.verify = function verify(message) { + CreateFederationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.serviceId != null && message.hasOwnProperty("serviceId")) - if (!$util.isString(message.serviceId)) - return "serviceId: string expected"; - if (message.service != null && message.hasOwnProperty("service")) { - var error = $root.google.cloud.metastore.v1alpha.Service.verify(message.service); + if (message.federationId != null && message.hasOwnProperty("federationId")) + if (!$util.isString(message.federationId)) + return "federationId: string expected"; + if (message.federation != null && message.hasOwnProperty("federation")) { + var error = $root.google.cloud.metastore.v1alpha.Federation.verify(message.federation); if (error) - return "service." + error; + return "federation." + error; } if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) @@ -18256,25 +28972,25 @@ }; /** - * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFederationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @memberof google.cloud.metastore.v1alpha.CreateFederationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.CreateServiceRequest} CreateServiceRequest + * @returns {google.cloud.metastore.v1alpha.CreateFederationRequest} CreateFederationRequest */ - CreateServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.CreateServiceRequest) + CreateFederationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.CreateFederationRequest) return object; - var message = new $root.google.cloud.metastore.v1alpha.CreateServiceRequest(); + var message = new $root.google.cloud.metastore.v1alpha.CreateFederationRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.serviceId != null) - message.serviceId = String(object.serviceId); - if (object.service != null) { - if (typeof object.service !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.CreateServiceRequest.service: object expected"); - message.service = $root.google.cloud.metastore.v1alpha.Service.fromObject(object.service); + if (object.federationId != null) + message.federationId = String(object.federationId); + if (object.federation != null) { + if (typeof object.federation !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.CreateFederationRequest.federation: object expected"); + message.federation = $root.google.cloud.metastore.v1alpha.Federation.fromObject(object.federation); } if (object.requestId != null) message.requestId = String(object.requestId); @@ -18282,84 +28998,84 @@ }; /** - * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateFederationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @memberof google.cloud.metastore.v1alpha.CreateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.CreateServiceRequest} message CreateServiceRequest + * @param {google.cloud.metastore.v1alpha.CreateFederationRequest} message CreateFederationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateServiceRequest.toObject = function toObject(message, options) { + CreateFederationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.serviceId = ""; - object.service = null; + object.federationId = ""; + object.federation = null; object.requestId = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.serviceId != null && message.hasOwnProperty("serviceId")) - object.serviceId = message.serviceId; - if (message.service != null && message.hasOwnProperty("service")) - object.service = $root.google.cloud.metastore.v1alpha.Service.toObject(message.service, options); + if (message.federationId != null && message.hasOwnProperty("federationId")) + object.federationId = message.federationId; + if (message.federation != null && message.hasOwnProperty("federation")) + object.federation = $root.google.cloud.metastore.v1alpha.Federation.toObject(message.federation, options); if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; return object; }; /** - * Converts this CreateServiceRequest to JSON. + * Converts this CreateFederationRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @memberof google.cloud.metastore.v1alpha.CreateFederationRequest * @instance * @returns {Object.} JSON object */ - CreateServiceRequest.prototype.toJSON = function toJSON() { + CreateFederationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateServiceRequest + * Gets the default type url for CreateFederationRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.CreateServiceRequest + * @memberof google.cloud.metastore.v1alpha.CreateFederationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateFederationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.CreateServiceRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.CreateFederationRequest"; }; - return CreateServiceRequest; + return CreateFederationRequest; })(); - v1alpha.UpdateServiceRequest = (function() { + v1alpha.UpdateFederationRequest = (function() { /** - * Properties of an UpdateServiceRequest. + * Properties of an UpdateFederationRequest. * @memberof google.cloud.metastore.v1alpha - * @interface IUpdateServiceRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateServiceRequest updateMask - * @property {google.cloud.metastore.v1alpha.IService|null} [service] UpdateServiceRequest service - * @property {string|null} [requestId] UpdateServiceRequest requestId + * @interface IUpdateFederationRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFederationRequest updateMask + * @property {google.cloud.metastore.v1alpha.IFederation|null} [federation] UpdateFederationRequest federation + * @property {string|null} [requestId] UpdateFederationRequest requestId */ /** - * Constructs a new UpdateServiceRequest. + * Constructs a new UpdateFederationRequest. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents an UpdateServiceRequest. - * @implements IUpdateServiceRequest + * @classdesc Represents an UpdateFederationRequest. + * @implements IUpdateFederationRequest * @constructor - * @param {google.cloud.metastore.v1alpha.IUpdateServiceRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.IUpdateFederationRequest=} [properties] Properties to set */ - function UpdateServiceRequest(properties) { + function UpdateFederationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18367,347 +29083,102 @@ } /** - * UpdateServiceRequest updateMask. + * UpdateFederationRequest updateMask. * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest - * @instance - */ - UpdateServiceRequest.prototype.updateMask = null; - - /** - * UpdateServiceRequest service. - * @member {google.cloud.metastore.v1alpha.IService|null|undefined} service - * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest - * @instance - */ - UpdateServiceRequest.prototype.service = null; - - /** - * UpdateServiceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest - * @instance - */ - UpdateServiceRequest.prototype.requestId = ""; - - /** - * Creates a new UpdateServiceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest - * @static - * @param {google.cloud.metastore.v1alpha.IUpdateServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.UpdateServiceRequest} UpdateServiceRequest instance - */ - UpdateServiceRequest.create = function create(properties) { - return new UpdateServiceRequest(properties); - }; - - /** - * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateServiceRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest - * @static - * @param {google.cloud.metastore.v1alpha.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateServiceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - $root.google.cloud.metastore.v1alpha.Service.encode(message.service, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateServiceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest - * @static - * @param {google.cloud.metastore.v1alpha.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.UpdateServiceRequest} UpdateServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateServiceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.UpdateServiceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.service = $root.google.cloud.metastore.v1alpha.Service.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.UpdateServiceRequest} UpdateServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateServiceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateServiceRequest message. - * @function verify - * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateServiceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.service != null && message.hasOwnProperty("service")) { - var error = $root.google.cloud.metastore.v1alpha.Service.verify(message.service); - if (error) - return "service." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates an UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.UpdateServiceRequest} UpdateServiceRequest - */ - UpdateServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.UpdateServiceRequest) - return object; - var message = new $root.google.cloud.metastore.v1alpha.UpdateServiceRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.UpdateServiceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.service != null) { - if (typeof object.service !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.UpdateServiceRequest.service: object expected"); - message.service = $root.google.cloud.metastore.v1alpha.Service.fromObject(object.service); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest - * @static - * @param {google.cloud.metastore.v1alpha.UpdateServiceRequest} message UpdateServiceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateServiceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.service = null; - object.requestId = ""; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.service != null && message.hasOwnProperty("service")) - object.service = $root.google.cloud.metastore.v1alpha.Service.toObject(message.service, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this UpdateServiceRequest to JSON. - * @function toJSON - * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest + * @memberof google.cloud.metastore.v1alpha.UpdateFederationRequest * @instance - * @returns {Object.} JSON object - */ - UpdateServiceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateServiceRequest - * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.UpdateServiceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.UpdateServiceRequest"; - }; - - return UpdateServiceRequest; - })(); - - v1alpha.DeleteServiceRequest = (function() { - - /** - * Properties of a DeleteServiceRequest. - * @memberof google.cloud.metastore.v1alpha - * @interface IDeleteServiceRequest - * @property {string|null} [name] DeleteServiceRequest name - * @property {string|null} [requestId] DeleteServiceRequest requestId - */ - - /** - * Constructs a new DeleteServiceRequest. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a DeleteServiceRequest. - * @implements IDeleteServiceRequest - * @constructor - * @param {google.cloud.metastore.v1alpha.IDeleteServiceRequest=} [properties] Properties to set */ - function DeleteServiceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + UpdateFederationRequest.prototype.updateMask = null; /** - * DeleteServiceRequest name. - * @member {string} name - * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * UpdateFederationRequest federation. + * @member {google.cloud.metastore.v1alpha.IFederation|null|undefined} federation + * @memberof google.cloud.metastore.v1alpha.UpdateFederationRequest * @instance */ - DeleteServiceRequest.prototype.name = ""; + UpdateFederationRequest.prototype.federation = null; /** - * DeleteServiceRequest requestId. + * UpdateFederationRequest requestId. * @member {string} requestId - * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @memberof google.cloud.metastore.v1alpha.UpdateFederationRequest * @instance */ - DeleteServiceRequest.prototype.requestId = ""; + UpdateFederationRequest.prototype.requestId = ""; /** - * Creates a new DeleteServiceRequest instance using the specified properties. + * Creates a new UpdateFederationRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @memberof google.cloud.metastore.v1alpha.UpdateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IDeleteServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.DeleteServiceRequest} DeleteServiceRequest instance + * @param {google.cloud.metastore.v1alpha.IUpdateFederationRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.UpdateFederationRequest} UpdateFederationRequest instance */ - DeleteServiceRequest.create = function create(properties) { - return new DeleteServiceRequest(properties); + UpdateFederationRequest.create = function create(properties) { + return new UpdateFederationRequest(properties); }; /** - * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteServiceRequest.verify|verify} messages. + * Encodes the specified UpdateFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateFederationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @memberof google.cloud.metastore.v1alpha.UpdateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IUpdateFederationRequest} message UpdateFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteServiceRequest.encode = function encode(message, writer) { + UpdateFederationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.federation != null && Object.hasOwnProperty.call(message, "federation")) + $root.google.cloud.metastore.v1alpha.Federation.encode(message.federation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteServiceRequest.verify|verify} messages. + * Encodes the specified UpdateFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateFederationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @memberof google.cloud.metastore.v1alpha.UpdateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IUpdateFederationRequest} message UpdateFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateFederationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * Decodes an UpdateFederationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @memberof google.cloud.metastore.v1alpha.UpdateFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.DeleteServiceRequest} DeleteServiceRequest + * @returns {google.cloud.metastore.v1alpha.UpdateFederationRequest} UpdateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteServiceRequest.decode = function decode(reader, length) { + UpdateFederationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.DeleteServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.UpdateFederationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { + message.federation = $root.google.cloud.metastore.v1alpha.Federation.decode(reader, reader.uint32()); + break; + } + case 3: { message.requestId = reader.string(); break; } @@ -18720,35 +29191,42 @@ }; /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateFederationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @memberof google.cloud.metastore.v1alpha.UpdateFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.DeleteServiceRequest} DeleteServiceRequest + * @returns {google.cloud.metastore.v1alpha.UpdateFederationRequest} UpdateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteServiceRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateFederationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteServiceRequest message. + * Verifies an UpdateFederationRequest message. * @function verify - * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @memberof google.cloud.metastore.v1alpha.UpdateFederationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteServiceRequest.verify = function verify(message) { + UpdateFederationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.federation != null && message.hasOwnProperty("federation")) { + var error = $root.google.cloud.metastore.v1alpha.Federation.verify(message.federation); + if (error) + return "federation." + error; + } if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; @@ -18756,99 +29234,107 @@ }; /** - * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFederationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @memberof google.cloud.metastore.v1alpha.UpdateFederationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.DeleteServiceRequest} DeleteServiceRequest + * @returns {google.cloud.metastore.v1alpha.UpdateFederationRequest} UpdateFederationRequest */ - DeleteServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.DeleteServiceRequest) + UpdateFederationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.UpdateFederationRequest) return object; - var message = new $root.google.cloud.metastore.v1alpha.DeleteServiceRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.metastore.v1alpha.UpdateFederationRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.UpdateFederationRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.federation != null) { + if (typeof object.federation !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.UpdateFederationRequest.federation: object expected"); + message.federation = $root.google.cloud.metastore.v1alpha.Federation.fromObject(object.federation); + } if (object.requestId != null) message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateFederationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @memberof google.cloud.metastore.v1alpha.UpdateFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.DeleteServiceRequest} message DeleteServiceRequest + * @param {google.cloud.metastore.v1alpha.UpdateFederationRequest} message UpdateFederationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteServiceRequest.toObject = function toObject(message, options) { + UpdateFederationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; + object.updateMask = null; + object.federation = null; object.requestId = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.federation != null && message.hasOwnProperty("federation")) + object.federation = $root.google.cloud.metastore.v1alpha.Federation.toObject(message.federation, options); if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; return object; }; /** - * Converts this DeleteServiceRequest to JSON. + * Converts this UpdateFederationRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @memberof google.cloud.metastore.v1alpha.UpdateFederationRequest * @instance * @returns {Object.} JSON object */ - DeleteServiceRequest.prototype.toJSON = function toJSON() { + UpdateFederationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteServiceRequest + * Gets the default type url for UpdateFederationRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.DeleteServiceRequest + * @memberof google.cloud.metastore.v1alpha.UpdateFederationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateFederationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.DeleteServiceRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.UpdateFederationRequest"; }; - return DeleteServiceRequest; + return UpdateFederationRequest; })(); - v1alpha.ListMetadataImportsRequest = (function() { + v1alpha.DeleteFederationRequest = (function() { /** - * Properties of a ListMetadataImportsRequest. + * Properties of a DeleteFederationRequest. * @memberof google.cloud.metastore.v1alpha - * @interface IListMetadataImportsRequest - * @property {string|null} [parent] ListMetadataImportsRequest parent - * @property {number|null} [pageSize] ListMetadataImportsRequest pageSize - * @property {string|null} [pageToken] ListMetadataImportsRequest pageToken - * @property {string|null} [filter] ListMetadataImportsRequest filter - * @property {string|null} [orderBy] ListMetadataImportsRequest orderBy + * @interface IDeleteFederationRequest + * @property {string|null} [name] DeleteFederationRequest name + * @property {string|null} [requestId] DeleteFederationRequest requestId */ /** - * Constructs a new ListMetadataImportsRequest. + * Constructs a new DeleteFederationRequest. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a ListMetadataImportsRequest. - * @implements IListMetadataImportsRequest + * @classdesc Represents a DeleteFederationRequest. + * @implements IDeleteFederationRequest * @constructor - * @param {google.cloud.metastore.v1alpha.IListMetadataImportsRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.IDeleteFederationRequest=} [properties] Properties to set */ - function ListMetadataImportsRequest(properties) { + function DeleteFederationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18856,131 +29342,89 @@ } /** - * ListMetadataImportsRequest parent. - * @member {string} parent - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest - * @instance - */ - ListMetadataImportsRequest.prototype.parent = ""; - - /** - * ListMetadataImportsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest - * @instance - */ - ListMetadataImportsRequest.prototype.pageSize = 0; - - /** - * ListMetadataImportsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest - * @instance - */ - ListMetadataImportsRequest.prototype.pageToken = ""; - - /** - * ListMetadataImportsRequest filter. - * @member {string} filter - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * DeleteFederationRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1alpha.DeleteFederationRequest * @instance */ - ListMetadataImportsRequest.prototype.filter = ""; + DeleteFederationRequest.prototype.name = ""; /** - * ListMetadataImportsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * DeleteFederationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1alpha.DeleteFederationRequest * @instance */ - ListMetadataImportsRequest.prototype.orderBy = ""; + DeleteFederationRequest.prototype.requestId = ""; /** - * Creates a new ListMetadataImportsRequest instance using the specified properties. + * Creates a new DeleteFederationRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1alpha.DeleteFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IListMetadataImportsRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsRequest} ListMetadataImportsRequest instance + * @param {google.cloud.metastore.v1alpha.IDeleteFederationRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.DeleteFederationRequest} DeleteFederationRequest instance */ - ListMetadataImportsRequest.create = function create(properties) { - return new ListMetadataImportsRequest(properties); + DeleteFederationRequest.create = function create(properties) { + return new DeleteFederationRequest(properties); }; /** - * Encodes the specified ListMetadataImportsRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsRequest.verify|verify} messages. + * Encodes the specified DeleteFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteFederationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1alpha.DeleteFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IListMetadataImportsRequest} message ListMetadataImportsRequest message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IDeleteFederationRequest} message DeleteFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetadataImportsRequest.encode = function encode(message, writer) { + DeleteFederationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified ListMetadataImportsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsRequest.verify|verify} messages. + * Encodes the specified DeleteFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteFederationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1alpha.DeleteFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.IListMetadataImportsRequest} message ListMetadataImportsRequest message or plain object to encode + * @param {google.cloud.metastore.v1alpha.IDeleteFederationRequest} message DeleteFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetadataImportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteFederationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMetadataImportsRequest message from the specified reader or buffer. + * Decodes a DeleteFederationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1alpha.DeleteFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsRequest} ListMetadataImportsRequest + * @returns {google.cloud.metastore.v1alpha.DeleteFederationRequest} DeleteFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetadataImportsRequest.decode = function decode(reader, length) { + DeleteFederationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ListMetadataImportsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.DeleteFederationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.requestId = reader.string(); break; } default: @@ -18992,649 +29436,694 @@ }; /** - * Decodes a ListMetadataImportsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFederationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1alpha.DeleteFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsRequest} ListMetadataImportsRequest + * @returns {google.cloud.metastore.v1alpha.DeleteFederationRequest} DeleteFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetadataImportsRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteFederationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMetadataImportsRequest message. + * Verifies a DeleteFederationRequest message. * @function verify - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1alpha.DeleteFederationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMetadataImportsRequest.verify = function verify(message) { + DeleteFederationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a ListMetadataImportsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFederationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1alpha.DeleteFederationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsRequest} ListMetadataImportsRequest + * @returns {google.cloud.metastore.v1alpha.DeleteFederationRequest} DeleteFederationRequest */ - ListMetadataImportsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.ListMetadataImportsRequest) + DeleteFederationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.DeleteFederationRequest) return object; - var message = new $root.google.cloud.metastore.v1alpha.ListMetadataImportsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.metastore.v1alpha.DeleteFederationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a ListMetadataImportsRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteFederationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1alpha.DeleteFederationRequest * @static - * @param {google.cloud.metastore.v1alpha.ListMetadataImportsRequest} message ListMetadataImportsRequest + * @param {google.cloud.metastore.v1alpha.DeleteFederationRequest} message DeleteFederationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMetadataImportsRequest.toObject = function toObject(message, options) { + DeleteFederationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + object.name = ""; + object.requestId = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this ListMetadataImportsRequest to JSON. + * Converts this DeleteFederationRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1alpha.DeleteFederationRequest * @instance * @returns {Object.} JSON object */ - ListMetadataImportsRequest.prototype.toJSON = function toJSON() { + DeleteFederationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListMetadataImportsRequest + * Gets the default type url for DeleteFederationRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1alpha.DeleteFederationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListMetadataImportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteFederationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ListMetadataImportsRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.DeleteFederationRequest"; }; - return ListMetadataImportsRequest; + return DeleteFederationRequest; })(); - v1alpha.ListMetadataImportsResponse = (function() { + return v1alpha; + })(); - /** - * Properties of a ListMetadataImportsResponse. - * @memberof google.cloud.metastore.v1alpha - * @interface IListMetadataImportsResponse - * @property {Array.|null} [metadataImports] ListMetadataImportsResponse metadataImports - * @property {string|null} [nextPageToken] ListMetadataImportsResponse nextPageToken - * @property {Array.|null} [unreachable] ListMetadataImportsResponse unreachable - */ + metastore.v1beta = (function() { + + /** + * Namespace v1beta. + * @memberof google.cloud.metastore + * @namespace + */ + var v1beta = {}; + + v1beta.DataprocMetastore = (function() { /** - * Constructs a new ListMetadataImportsResponse. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a ListMetadataImportsResponse. - * @implements IListMetadataImportsResponse + * Constructs a new DataprocMetastore service. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a DataprocMetastore + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.metastore.v1alpha.IListMetadataImportsResponse=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function ListMetadataImportsResponse(properties) { - this.metadataImports = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function DataprocMetastore(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (DataprocMetastore.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataprocMetastore; + /** - * ListMetadataImportsResponse metadataImports. - * @member {Array.} metadataImports - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * Creates new DataprocMetastore service using the specified rpc implementation. + * @function create + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {DataprocMetastore} RPC service. Useful where requests and/or responses are streamed. + */ + DataprocMetastore.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|listServices}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef ListServicesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1beta.ListServicesResponse} [response] ListServicesResponse + */ + + /** + * Calls ListServices. + * @function listServices + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IListServicesRequest} request ListServicesRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.ListServicesCallback} callback Node-style callback called with the error, if any, and ListServicesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastore.prototype.listServices = function listServices(request, callback) { + return this.rpcCall(listServices, $root.google.cloud.metastore.v1beta.ListServicesRequest, $root.google.cloud.metastore.v1beta.ListServicesResponse, request, callback); + }, "name", { value: "ListServices" }); + + /** + * Calls ListServices. + * @function listServices + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IListServicesRequest} request ListServicesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|getService}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef GetServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1beta.Service} [response] Service + */ + + /** + * Calls GetService. + * @function getService + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IGetServiceRequest} request GetServiceRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.GetServiceCallback} callback Node-style callback called with the error, if any, and Service + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastore.prototype.getService = function getService(request, callback) { + return this.rpcCall(getService, $root.google.cloud.metastore.v1beta.GetServiceRequest, $root.google.cloud.metastore.v1beta.Service, request, callback); + }, "name", { value: "GetService" }); + + /** + * Calls GetService. + * @function getService + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IGetServiceRequest} request GetServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|createService}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef CreateServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateService. + * @function createService + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.ICreateServiceRequest} request CreateServiceRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.CreateServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastore.prototype.createService = function createService(request, callback) { + return this.rpcCall(createService, $root.google.cloud.metastore.v1beta.CreateServiceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateService" }); + + /** + * Calls CreateService. + * @function createService + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.ICreateServiceRequest} request CreateServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|updateService}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef UpdateServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateService. + * @function updateService + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IUpdateServiceRequest} request UpdateServiceRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.UpdateServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastore.prototype.updateService = function updateService(request, callback) { + return this.rpcCall(updateService, $root.google.cloud.metastore.v1beta.UpdateServiceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateService" }); + + /** + * Calls UpdateService. + * @function updateService + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IUpdateServiceRequest} request UpdateServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|deleteService}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef DeleteServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteService. + * @function deleteService + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IDeleteServiceRequest} request DeleteServiceRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.DeleteServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastore.prototype.deleteService = function deleteService(request, callback) { + return this.rpcCall(deleteService, $root.google.cloud.metastore.v1beta.DeleteServiceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteService" }); + + /** + * Calls DeleteService. + * @function deleteService + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IDeleteServiceRequest} request DeleteServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|listMetadataImports}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef ListMetadataImportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1beta.ListMetadataImportsResponse} [response] ListMetadataImportsResponse + */ + + /** + * Calls ListMetadataImports. + * @function listMetadataImports + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IListMetadataImportsRequest} request ListMetadataImportsRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImportsCallback} callback Node-style callback called with the error, if any, and ListMetadataImportsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastore.prototype.listMetadataImports = function listMetadataImports(request, callback) { + return this.rpcCall(listMetadataImports, $root.google.cloud.metastore.v1beta.ListMetadataImportsRequest, $root.google.cloud.metastore.v1beta.ListMetadataImportsResponse, request, callback); + }, "name", { value: "ListMetadataImports" }); + + /** + * Calls ListMetadataImports. + * @function listMetadataImports + * @memberof google.cloud.metastore.v1beta.DataprocMetastore * @instance + * @param {google.cloud.metastore.v1beta.IListMetadataImportsRequest} request ListMetadataImportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|getMetadataImport}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef GetMetadataImportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1beta.MetadataImport} [response] MetadataImport */ - ListMetadataImportsResponse.prototype.metadataImports = $util.emptyArray; /** - * ListMetadataImportsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * Calls GetMetadataImport. + * @function getMetadataImport + * @memberof google.cloud.metastore.v1beta.DataprocMetastore * @instance + * @param {google.cloud.metastore.v1beta.IGetMetadataImportRequest} request GetMetadataImportRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.GetMetadataImportCallback} callback Node-style callback called with the error, if any, and MetadataImport + * @returns {undefined} + * @variation 1 */ - ListMetadataImportsResponse.prototype.nextPageToken = ""; + Object.defineProperty(DataprocMetastore.prototype.getMetadataImport = function getMetadataImport(request, callback) { + return this.rpcCall(getMetadataImport, $root.google.cloud.metastore.v1beta.GetMetadataImportRequest, $root.google.cloud.metastore.v1beta.MetadataImport, request, callback); + }, "name", { value: "GetMetadataImport" }); /** - * ListMetadataImportsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * Calls GetMetadataImport. + * @function getMetadataImport + * @memberof google.cloud.metastore.v1beta.DataprocMetastore * @instance + * @param {google.cloud.metastore.v1beta.IGetMetadataImportRequest} request GetMetadataImportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMetadataImportsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new ListMetadataImportsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse - * @static - * @param {google.cloud.metastore.v1alpha.IListMetadataImportsResponse=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsResponse} ListMetadataImportsResponse instance + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|createMetadataImport}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef CreateMetadataImportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListMetadataImportsResponse.create = function create(properties) { - return new ListMetadataImportsResponse(properties); - }; /** - * Encodes the specified ListMetadataImportsResponse message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse - * @static - * @param {google.cloud.metastore.v1alpha.IListMetadataImportsResponse} message ListMetadataImportsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateMetadataImport. + * @function createMetadataImport + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.ICreateMetadataImportRequest} request CreateMetadataImportRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.CreateMetadataImportCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListMetadataImportsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadataImports != null && message.metadataImports.length) - for (var i = 0; i < message.metadataImports.length; ++i) - $root.google.cloud.metastore.v1alpha.MetadataImport.encode(message.metadataImports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; + Object.defineProperty(DataprocMetastore.prototype.createMetadataImport = function createMetadataImport(request, callback) { + return this.rpcCall(createMetadataImport, $root.google.cloud.metastore.v1beta.CreateMetadataImportRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateMetadataImport" }); /** - * Encodes the specified ListMetadataImportsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListMetadataImportsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse - * @static - * @param {google.cloud.metastore.v1alpha.IListMetadataImportsResponse} message ListMetadataImportsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateMetadataImport. + * @function createMetadataImport + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.ICreateMetadataImportRequest} request CreateMetadataImportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMetadataImportsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a ListMetadataImportsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsResponse} ListMetadataImportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|updateMetadataImport}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef UpdateMetadataImportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListMetadataImportsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ListMetadataImportsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.metadataImports && message.metadataImports.length)) - message.metadataImports = []; - message.metadataImports.push($root.google.cloud.metastore.v1alpha.MetadataImport.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListMetadataImportsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsResponse} ListMetadataImportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateMetadataImport. + * @function updateMetadataImport + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IUpdateMetadataImportRequest} request UpdateMetadataImportRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.UpdateMetadataImportCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListMetadataImportsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(DataprocMetastore.prototype.updateMetadataImport = function updateMetadataImport(request, callback) { + return this.rpcCall(updateMetadataImport, $root.google.cloud.metastore.v1beta.UpdateMetadataImportRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateMetadataImport" }); /** - * Verifies a ListMetadataImportsResponse message. - * @function verify - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls UpdateMetadataImport. + * @function updateMetadataImport + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IUpdateMetadataImportRequest} request UpdateMetadataImportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMetadataImportsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadataImports != null && message.hasOwnProperty("metadataImports")) { - if (!Array.isArray(message.metadataImports)) - return "metadataImports: array expected"; - for (var i = 0; i < message.metadataImports.length; ++i) { - var error = $root.google.cloud.metastore.v1alpha.MetadataImport.verify(message.metadataImports[i]); - if (error) - return "metadataImports." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; /** - * Creates a ListMetadataImportsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.ListMetadataImportsResponse} ListMetadataImportsResponse + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|exportMetadata}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef ExportMetadataCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListMetadataImportsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.ListMetadataImportsResponse) - return object; - var message = new $root.google.cloud.metastore.v1alpha.ListMetadataImportsResponse(); - if (object.metadataImports) { - if (!Array.isArray(object.metadataImports)) - throw TypeError(".google.cloud.metastore.v1alpha.ListMetadataImportsResponse.metadataImports: array expected"); - message.metadataImports = []; - for (var i = 0; i < object.metadataImports.length; ++i) { - if (typeof object.metadataImports[i] !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.ListMetadataImportsResponse.metadataImports: object expected"); - message.metadataImports[i] = $root.google.cloud.metastore.v1alpha.MetadataImport.fromObject(object.metadataImports[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.metastore.v1alpha.ListMetadataImportsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; /** - * Creates a plain object from a ListMetadataImportsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse - * @static - * @param {google.cloud.metastore.v1alpha.ListMetadataImportsResponse} message ListMetadataImportsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls ExportMetadata. + * @function exportMetadata + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IExportMetadataRequest} request ExportMetadataRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.ExportMetadataCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListMetadataImportsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.metadataImports = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.metadataImports && message.metadataImports.length) { - object.metadataImports = []; - for (var j = 0; j < message.metadataImports.length; ++j) - object.metadataImports[j] = $root.google.cloud.metastore.v1alpha.MetadataImport.toObject(message.metadataImports[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; + Object.defineProperty(DataprocMetastore.prototype.exportMetadata = function exportMetadata(request, callback) { + return this.rpcCall(exportMetadata, $root.google.cloud.metastore.v1beta.ExportMetadataRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportMetadata" }); /** - * Converts this ListMetadataImportsResponse to JSON. - * @function toJSON - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse + * Calls ExportMetadata. + * @function exportMetadata + * @memberof google.cloud.metastore.v1beta.DataprocMetastore * @instance - * @returns {Object.} JSON object + * @param {google.cloud.metastore.v1beta.IExportMetadataRequest} request ExportMetadataRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMetadataImportsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for ListMetadataImportsResponse - * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.ListMetadataImportsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|restoreService}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef RestoreServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListMetadataImportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ListMetadataImportsResponse"; - }; - - return ListMetadataImportsResponse; - })(); - v1alpha.GetMetadataImportRequest = (function() { + /** + * Calls RestoreService. + * @function restoreService + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IRestoreServiceRequest} request RestoreServiceRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.RestoreServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastore.prototype.restoreService = function restoreService(request, callback) { + return this.rpcCall(restoreService, $root.google.cloud.metastore.v1beta.RestoreServiceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RestoreService" }); /** - * Properties of a GetMetadataImportRequest. - * @memberof google.cloud.metastore.v1alpha - * @interface IGetMetadataImportRequest - * @property {string|null} [name] GetMetadataImportRequest name + * Calls RestoreService. + * @function restoreService + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IRestoreServiceRequest} request RestoreServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new GetMetadataImportRequest. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a GetMetadataImportRequest. - * @implements IGetMetadataImportRequest - * @constructor - * @param {google.cloud.metastore.v1alpha.IGetMetadataImportRequest=} [properties] Properties to set + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|listBackups}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef ListBackupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1beta.ListBackupsResponse} [response] ListBackupsResponse */ - function GetMetadataImportRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * GetMetadataImportRequest name. - * @member {string} name - * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest + * Calls ListBackups. + * @function listBackups + * @memberof google.cloud.metastore.v1beta.DataprocMetastore * @instance + * @param {google.cloud.metastore.v1beta.IListBackupsRequest} request ListBackupsRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.ListBackupsCallback} callback Node-style callback called with the error, if any, and ListBackupsResponse + * @returns {undefined} + * @variation 1 */ - GetMetadataImportRequest.prototype.name = ""; + Object.defineProperty(DataprocMetastore.prototype.listBackups = function listBackups(request, callback) { + return this.rpcCall(listBackups, $root.google.cloud.metastore.v1beta.ListBackupsRequest, $root.google.cloud.metastore.v1beta.ListBackupsResponse, request, callback); + }, "name", { value: "ListBackups" }); /** - * Creates a new GetMetadataImportRequest instance using the specified properties. - * @function create - * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest - * @static - * @param {google.cloud.metastore.v1alpha.IGetMetadataImportRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.GetMetadataImportRequest} GetMetadataImportRequest instance + * Calls ListBackups. + * @function listBackups + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IListBackupsRequest} request ListBackupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMetadataImportRequest.create = function create(properties) { - return new GetMetadataImportRequest(properties); - }; /** - * Encodes the specified GetMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.GetMetadataImportRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest - * @static - * @param {google.cloud.metastore.v1alpha.IGetMetadataImportRequest} message GetMetadataImportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|getBackup}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef GetBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1beta.Backup} [response] Backup */ - GetMetadataImportRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; /** - * Encodes the specified GetMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.GetMetadataImportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest - * @static - * @param {google.cloud.metastore.v1alpha.IGetMetadataImportRequest} message GetMetadataImportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetBackup. + * @function getBackup + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IGetBackupRequest} request GetBackupRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.GetBackupCallback} callback Node-style callback called with the error, if any, and Backup + * @returns {undefined} + * @variation 1 */ - GetMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(DataprocMetastore.prototype.getBackup = function getBackup(request, callback) { + return this.rpcCall(getBackup, $root.google.cloud.metastore.v1beta.GetBackupRequest, $root.google.cloud.metastore.v1beta.Backup, request, callback); + }, "name", { value: "GetBackup" }); /** - * Decodes a GetMetadataImportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.GetMetadataImportRequest} GetMetadataImportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetBackup. + * @function getBackup + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IGetBackupRequest} request GetBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMetadataImportRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.GetMetadataImportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GetMetadataImportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.GetMetadataImportRequest} GetMetadataImportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|createBackup}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef CreateBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - GetMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a GetMetadataImportRequest message. - * @function verify - * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateBackup. + * @function createBackup + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.ICreateBackupRequest} request CreateBackupRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.CreateBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - GetMetadataImportRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + Object.defineProperty(DataprocMetastore.prototype.createBackup = function createBackup(request, callback) { + return this.rpcCall(createBackup, $root.google.cloud.metastore.v1beta.CreateBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackup" }); /** - * Creates a GetMetadataImportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.GetMetadataImportRequest} GetMetadataImportRequest + * Calls CreateBackup. + * @function createBackup + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.ICreateBackupRequest} request CreateBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMetadataImportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.GetMetadataImportRequest) - return object; - var message = new $root.google.cloud.metastore.v1alpha.GetMetadataImportRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; /** - * Creates a plain object from a GetMetadataImportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest - * @static - * @param {google.cloud.metastore.v1alpha.GetMetadataImportRequest} message GetMetadataImportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|deleteBackup}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @typedef DeleteBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - GetMetadataImportRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; /** - * Converts this GetMetadataImportRequest to JSON. - * @function toJSON - * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.cloud.metastore.v1beta.DataprocMetastore * @instance - * @returns {Object.} JSON object + * @param {google.cloud.metastore.v1beta.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastore.DeleteBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - GetMetadataImportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(DataprocMetastore.prototype.deleteBackup = function deleteBackup(request, callback) { + return this.rpcCall(deleteBackup, $root.google.cloud.metastore.v1beta.DeleteBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackup" }); /** - * Gets the default type url for GetMetadataImportRequest - * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.GetMetadataImportRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * @instance + * @param {google.cloud.metastore.v1beta.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.GetMetadataImportRequest"; - }; - return GetMetadataImportRequest; + return DataprocMetastore; })(); - v1alpha.CreateMetadataImportRequest = (function() { + v1beta.Service = (function() { /** - * Properties of a CreateMetadataImportRequest. - * @memberof google.cloud.metastore.v1alpha - * @interface ICreateMetadataImportRequest - * @property {string|null} [parent] CreateMetadataImportRequest parent - * @property {string|null} [metadataImportId] CreateMetadataImportRequest metadataImportId - * @property {google.cloud.metastore.v1alpha.IMetadataImport|null} [metadataImport] CreateMetadataImportRequest metadataImport - * @property {string|null} [requestId] CreateMetadataImportRequest requestId + * Properties of a Service. + * @memberof google.cloud.metastore.v1beta + * @interface IService + * @property {google.cloud.metastore.v1beta.IHiveMetastoreConfig|null} [hiveMetastoreConfig] Service hiveMetastoreConfig + * @property {string|null} [name] Service name + * @property {google.protobuf.ITimestamp|null} [createTime] Service createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Service updateTime + * @property {Object.|null} [labels] Service labels + * @property {string|null} [network] Service network + * @property {string|null} [endpointUri] Service endpointUri + * @property {number|null} [port] Service port + * @property {google.cloud.metastore.v1beta.Service.State|null} [state] Service state + * @property {string|null} [stateMessage] Service stateMessage + * @property {string|null} [artifactGcsUri] Service artifactGcsUri + * @property {google.cloud.metastore.v1beta.Service.Tier|null} [tier] Service tier + * @property {google.cloud.metastore.v1beta.IMetadataIntegration|null} [metadataIntegration] Service metadataIntegration + * @property {google.cloud.metastore.v1beta.IMaintenanceWindow|null} [maintenanceWindow] Service maintenanceWindow + * @property {string|null} [uid] Service uid + * @property {google.cloud.metastore.v1beta.IMetadataManagementActivity|null} [metadataManagementActivity] Service metadataManagementActivity + * @property {google.cloud.metastore.v1beta.Service.ReleaseChannel|null} [releaseChannel] Service releaseChannel + * @property {google.cloud.metastore.v1beta.IEncryptionConfig|null} [encryptionConfig] Service encryptionConfig + * @property {google.cloud.metastore.v1beta.INetworkConfig|null} [networkConfig] Service networkConfig + * @property {google.cloud.metastore.v1beta.Service.DatabaseType|null} [databaseType] Service databaseType + * @property {google.cloud.metastore.v1beta.ITelemetryConfig|null} [telemetryConfig] Service telemetryConfig */ /** - * Constructs a new CreateMetadataImportRequest. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a CreateMetadataImportRequest. - * @implements ICreateMetadataImportRequest + * Constructs a new Service. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a Service. + * @implements IService * @constructor - * @param {google.cloud.metastore.v1alpha.ICreateMetadataImportRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IService=} [properties] Properties to set */ - function CreateMetadataImportRequest(properties) { + function Service(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19642,380 +30131,389 @@ } /** - * CreateMetadataImportRequest parent. - * @member {string} parent - * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * Service hiveMetastoreConfig. + * @member {google.cloud.metastore.v1beta.IHiveMetastoreConfig|null|undefined} hiveMetastoreConfig + * @memberof google.cloud.metastore.v1beta.Service * @instance */ - CreateMetadataImportRequest.prototype.parent = ""; + Service.prototype.hiveMetastoreConfig = null; /** - * CreateMetadataImportRequest metadataImportId. - * @member {string} metadataImportId - * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * Service name. + * @member {string} name + * @memberof google.cloud.metastore.v1beta.Service * @instance */ - CreateMetadataImportRequest.prototype.metadataImportId = ""; + Service.prototype.name = ""; /** - * CreateMetadataImportRequest metadataImport. - * @member {google.cloud.metastore.v1alpha.IMetadataImport|null|undefined} metadataImport - * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * Service createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.metastore.v1beta.Service * @instance */ - CreateMetadataImportRequest.prototype.metadataImport = null; + Service.prototype.createTime = null; /** - * CreateMetadataImportRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * Service updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.metastore.v1beta.Service * @instance */ - CreateMetadataImportRequest.prototype.requestId = ""; + Service.prototype.updateTime = null; /** - * Creates a new CreateMetadataImportRequest instance using the specified properties. - * @function create - * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest - * @static - * @param {google.cloud.metastore.v1alpha.ICreateMetadataImportRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.CreateMetadataImportRequest} CreateMetadataImportRequest instance + * Service labels. + * @member {Object.} labels + * @memberof google.cloud.metastore.v1beta.Service + * @instance */ - CreateMetadataImportRequest.create = function create(properties) { - return new CreateMetadataImportRequest(properties); - }; + Service.prototype.labels = $util.emptyObject; /** - * Encodes the specified CreateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateMetadataImportRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest - * @static - * @param {google.cloud.metastore.v1alpha.ICreateMetadataImportRequest} message CreateMetadataImportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Service network. + * @member {string} network + * @memberof google.cloud.metastore.v1beta.Service + * @instance */ - CreateMetadataImportRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.metadataImportId != null && Object.hasOwnProperty.call(message, "metadataImportId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataImportId); - if (message.metadataImport != null && Object.hasOwnProperty.call(message, "metadataImport")) - $root.google.cloud.metastore.v1alpha.MetadataImport.encode(message.metadataImport, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - return writer; - }; + Service.prototype.network = ""; /** - * Encodes the specified CreateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateMetadataImportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest - * @static - * @param {google.cloud.metastore.v1alpha.ICreateMetadataImportRequest} message CreateMetadataImportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Service endpointUri. + * @member {string} endpointUri + * @memberof google.cloud.metastore.v1beta.Service + * @instance */ - CreateMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Service.prototype.endpointUri = ""; /** - * Decodes a CreateMetadataImportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.CreateMetadataImportRequest} CreateMetadataImportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Service port. + * @member {number} port + * @memberof google.cloud.metastore.v1beta.Service + * @instance */ - CreateMetadataImportRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.CreateMetadataImportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.metadataImportId = reader.string(); - break; - } - case 3: { - message.metadataImport = $root.google.cloud.metastore.v1alpha.MetadataImport.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Service.prototype.port = 0; /** - * Decodes a CreateMetadataImportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.CreateMetadataImportRequest} CreateMetadataImportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Service state. + * @member {google.cloud.metastore.v1beta.Service.State} state + * @memberof google.cloud.metastore.v1beta.Service + * @instance */ - CreateMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Service.prototype.state = 0; /** - * Verifies a CreateMetadataImportRequest message. - * @function verify - * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Service stateMessage. + * @member {string} stateMessage + * @memberof google.cloud.metastore.v1beta.Service + * @instance */ - CreateMetadataImportRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.metadataImportId != null && message.hasOwnProperty("metadataImportId")) - if (!$util.isString(message.metadataImportId)) - return "metadataImportId: string expected"; - if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) { - var error = $root.google.cloud.metastore.v1alpha.MetadataImport.verify(message.metadataImport); - if (error) - return "metadataImport." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; + Service.prototype.stateMessage = ""; /** - * Creates a CreateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.CreateMetadataImportRequest} CreateMetadataImportRequest + * Service artifactGcsUri. + * @member {string} artifactGcsUri + * @memberof google.cloud.metastore.v1beta.Service + * @instance */ - CreateMetadataImportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.CreateMetadataImportRequest) - return object; - var message = new $root.google.cloud.metastore.v1alpha.CreateMetadataImportRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.metadataImportId != null) - message.metadataImportId = String(object.metadataImportId); - if (object.metadataImport != null) { - if (typeof object.metadataImport !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.CreateMetadataImportRequest.metadataImport: object expected"); - message.metadataImport = $root.google.cloud.metastore.v1alpha.MetadataImport.fromObject(object.metadataImport); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; + Service.prototype.artifactGcsUri = ""; /** - * Creates a plain object from a CreateMetadataImportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest - * @static - * @param {google.cloud.metastore.v1alpha.CreateMetadataImportRequest} message CreateMetadataImportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Service tier. + * @member {google.cloud.metastore.v1beta.Service.Tier} tier + * @memberof google.cloud.metastore.v1beta.Service + * @instance */ - CreateMetadataImportRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.metadataImportId = ""; - object.metadataImport = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.metadataImportId != null && message.hasOwnProperty("metadataImportId")) - object.metadataImportId = message.metadataImportId; - if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) - object.metadataImport = $root.google.cloud.metastore.v1alpha.MetadataImport.toObject(message.metadataImport, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; + Service.prototype.tier = 0; /** - * Converts this CreateMetadataImportRequest to JSON. - * @function toJSON - * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest + * Service metadataIntegration. + * @member {google.cloud.metastore.v1beta.IMetadataIntegration|null|undefined} metadataIntegration + * @memberof google.cloud.metastore.v1beta.Service * @instance - * @returns {Object.} JSON object */ - CreateMetadataImportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Service.prototype.metadataIntegration = null; /** - * Gets the default type url for CreateMetadataImportRequest - * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.CreateMetadataImportRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Service maintenanceWindow. + * @member {google.cloud.metastore.v1beta.IMaintenanceWindow|null|undefined} maintenanceWindow + * @memberof google.cloud.metastore.v1beta.Service + * @instance */ - CreateMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.CreateMetadataImportRequest"; - }; + Service.prototype.maintenanceWindow = null; - return CreateMetadataImportRequest; - })(); + /** + * Service uid. + * @member {string} uid + * @memberof google.cloud.metastore.v1beta.Service + * @instance + */ + Service.prototype.uid = ""; - v1alpha.UpdateMetadataImportRequest = (function() { + /** + * Service metadataManagementActivity. + * @member {google.cloud.metastore.v1beta.IMetadataManagementActivity|null|undefined} metadataManagementActivity + * @memberof google.cloud.metastore.v1beta.Service + * @instance + */ + Service.prototype.metadataManagementActivity = null; /** - * Properties of an UpdateMetadataImportRequest. - * @memberof google.cloud.metastore.v1alpha - * @interface IUpdateMetadataImportRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMetadataImportRequest updateMask - * @property {google.cloud.metastore.v1alpha.IMetadataImport|null} [metadataImport] UpdateMetadataImportRequest metadataImport - * @property {string|null} [requestId] UpdateMetadataImportRequest requestId + * Service releaseChannel. + * @member {google.cloud.metastore.v1beta.Service.ReleaseChannel} releaseChannel + * @memberof google.cloud.metastore.v1beta.Service + * @instance */ + Service.prototype.releaseChannel = 0; /** - * Constructs a new UpdateMetadataImportRequest. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents an UpdateMetadataImportRequest. - * @implements IUpdateMetadataImportRequest - * @constructor - * @param {google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest=} [properties] Properties to set + * Service encryptionConfig. + * @member {google.cloud.metastore.v1beta.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.cloud.metastore.v1beta.Service + * @instance */ - function UpdateMetadataImportRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Service.prototype.encryptionConfig = null; /** - * UpdateMetadataImportRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * Service networkConfig. + * @member {google.cloud.metastore.v1beta.INetworkConfig|null|undefined} networkConfig + * @memberof google.cloud.metastore.v1beta.Service * @instance */ - UpdateMetadataImportRequest.prototype.updateMask = null; + Service.prototype.networkConfig = null; /** - * UpdateMetadataImportRequest metadataImport. - * @member {google.cloud.metastore.v1alpha.IMetadataImport|null|undefined} metadataImport - * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * Service databaseType. + * @member {google.cloud.metastore.v1beta.Service.DatabaseType} databaseType + * @memberof google.cloud.metastore.v1beta.Service * @instance */ - UpdateMetadataImportRequest.prototype.metadataImport = null; + Service.prototype.databaseType = 0; /** - * UpdateMetadataImportRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * Service telemetryConfig. + * @member {google.cloud.metastore.v1beta.ITelemetryConfig|null|undefined} telemetryConfig + * @memberof google.cloud.metastore.v1beta.Service * @instance */ - UpdateMetadataImportRequest.prototype.requestId = ""; + Service.prototype.telemetryConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new UpdateMetadataImportRequest instance using the specified properties. + * Service metastoreConfig. + * @member {"hiveMetastoreConfig"|undefined} metastoreConfig + * @memberof google.cloud.metastore.v1beta.Service + * @instance + */ + Object.defineProperty(Service.prototype, "metastoreConfig", { + get: $util.oneOfGetter($oneOfFields = ["hiveMetastoreConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Service instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.Service * @static - * @param {google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.UpdateMetadataImportRequest} UpdateMetadataImportRequest instance + * @param {google.cloud.metastore.v1beta.IService=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.Service} Service instance */ - UpdateMetadataImportRequest.create = function create(properties) { - return new UpdateMetadataImportRequest(properties); + Service.create = function create(properties) { + return new Service(properties); }; /** - * Encodes the specified UpdateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.verify|verify} messages. + * Encodes the specified Service message. Does not implicitly {@link google.cloud.metastore.v1beta.Service.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.Service * @static - * @param {google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest} message UpdateMetadataImportRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IService} message Service message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateMetadataImportRequest.encode = function encode(message, writer) { + Service.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metadataImport != null && Object.hasOwnProperty.call(message, "metadataImport")) - $root.google.cloud.metastore.v1alpha.MetadataImport.encode(message.metadataImport, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.hiveMetastoreConfig != null && Object.hasOwnProperty.call(message, "hiveMetastoreConfig")) + $root.google.cloud.metastore.v1beta.HiveMetastoreConfig.encode(message.hiveMetastoreConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.network); + if (message.endpointUri != null && Object.hasOwnProperty.call(message, "endpointUri")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.endpointUri); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.port); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); + if (message.stateMessage != null && Object.hasOwnProperty.call(message, "stateMessage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.stateMessage); + if (message.artifactGcsUri != null && Object.hasOwnProperty.call(message, "artifactGcsUri")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.artifactGcsUri); + if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.tier); + if (message.metadataIntegration != null && Object.hasOwnProperty.call(message, "metadataIntegration")) + $root.google.cloud.metastore.v1beta.MetadataIntegration.encode(message.metadataIntegration, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.maintenanceWindow != null && Object.hasOwnProperty.call(message, "maintenanceWindow")) + $root.google.cloud.metastore.v1beta.MaintenanceWindow.encode(message.maintenanceWindow, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.uid); + if (message.metadataManagementActivity != null && Object.hasOwnProperty.call(message, "metadataManagementActivity")) + $root.google.cloud.metastore.v1beta.MetadataManagementActivity.encode(message.metadataManagementActivity, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.releaseChannel); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + $root.google.cloud.metastore.v1beta.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) + $root.google.cloud.metastore.v1beta.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.databaseType != null && Object.hasOwnProperty.call(message, "databaseType")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.databaseType); + if (message.telemetryConfig != null && Object.hasOwnProperty.call(message, "telemetryConfig")) + $root.google.cloud.metastore.v1beta.TelemetryConfig.encode(message.telemetryConfig, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.verify|verify} messages. + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Service.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.Service * @static - * @param {google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest} message UpdateMetadataImportRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IService} message Service message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { + Service.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer. + * Decodes a Service message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.Service * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.UpdateMetadataImportRequest} UpdateMetadataImportRequest + * @returns {google.cloud.metastore.v1beta.Service} Service * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateMetadataImportRequest.decode = function decode(reader, length) { + Service.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.Service(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 5: { + message.hiveMetastoreConfig = $root.google.cloud.metastore.v1beta.HiveMetastoreConfig.decode(reader, reader.uint32()); + break; + } case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.metadataImport = $root.google.cloud.metastore.v1alpha.MetadataImport.decode(reader, reader.uint32()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.requestId = reader.string(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 7: { + message.network = reader.string(); + break; + } + case 8: { + message.endpointUri = reader.string(); + break; + } + case 9: { + message.port = reader.int32(); + break; + } + case 10: { + message.state = reader.int32(); + break; + } + case 11: { + message.stateMessage = reader.string(); + break; + } + case 12: { + message.artifactGcsUri = reader.string(); + break; + } + case 13: { + message.tier = reader.int32(); + break; + } + case 14: { + message.metadataIntegration = $root.google.cloud.metastore.v1beta.MetadataIntegration.decode(reader, reader.uint32()); + break; + } + case 15: { + message.maintenanceWindow = $root.google.cloud.metastore.v1beta.MaintenanceWindow.decode(reader, reader.uint32()); + break; + } + case 16: { + message.uid = reader.string(); + break; + } + case 17: { + message.metadataManagementActivity = $root.google.cloud.metastore.v1beta.MetadataManagementActivity.decode(reader, reader.uint32()); + break; + } + case 19: { + message.releaseChannel = reader.int32(); + break; + } + case 20: { + message.encryptionConfig = $root.google.cloud.metastore.v1beta.EncryptionConfig.decode(reader, reader.uint32()); + break; + } + case 21: { + message.networkConfig = $root.google.cloud.metastore.v1beta.NetworkConfig.decode(reader, reader.uint32()); + break; + } + case 22: { + message.databaseType = reader.int32(); + break; + } + case 23: { + message.telemetryConfig = $root.google.cloud.metastore.v1beta.TelemetryConfig.decode(reader, reader.uint32()); break; } default: @@ -20027,285 +30525,635 @@ }; /** - * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer, length delimited. + * Decodes a Service message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.Service * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.UpdateMetadataImportRequest} UpdateMetadataImportRequest + * @returns {google.cloud.metastore.v1beta.Service} Service * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { + Service.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateMetadataImportRequest message. + * Verifies a Service message. * @function verify - * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.Service * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateMetadataImportRequest.verify = function verify(message) { + Service.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + var properties = {}; + if (message.hiveMetastoreConfig != null && message.hasOwnProperty("hiveMetastoreConfig")) { + properties.metastoreConfig = 1; + { + var error = $root.google.cloud.metastore.v1beta.HiveMetastoreConfig.verify(message.hiveMetastoreConfig); + if (error) + return "hiveMetastoreConfig." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "updateMask." + error; + return "createTime." + error; } - if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) { - var error = $root.google.cloud.metastore.v1alpha.MetadataImport.verify(message.metadataImport); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "metadataImport." + error; + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + if (!$util.isString(message.endpointUri)) + return "endpointUri: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) + if (!$util.isString(message.stateMessage)) + return "stateMessage: string expected"; + if (message.artifactGcsUri != null && message.hasOwnProperty("artifactGcsUri")) + if (!$util.isString(message.artifactGcsUri)) + return "artifactGcsUri: string expected"; + if (message.tier != null && message.hasOwnProperty("tier")) + switch (message.tier) { + default: + return "tier: enum value expected"; + case 0: + case 1: + case 3: + break; + } + if (message.metadataIntegration != null && message.hasOwnProperty("metadataIntegration")) { + var error = $root.google.cloud.metastore.v1beta.MetadataIntegration.verify(message.metadataIntegration); + if (error) + return "metadataIntegration." + error; + } + if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) { + var error = $root.google.cloud.metastore.v1beta.MaintenanceWindow.verify(message.maintenanceWindow); + if (error) + return "maintenanceWindow." + error; + } + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.metadataManagementActivity != null && message.hasOwnProperty("metadataManagementActivity")) { + var error = $root.google.cloud.metastore.v1beta.MetadataManagementActivity.verify(message.metadataManagementActivity); + if (error) + return "metadataManagementActivity." + error; + } + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) + switch (message.releaseChannel) { + default: + return "releaseChannel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + var error = $root.google.cloud.metastore.v1beta.EncryptionConfig.verify(message.encryptionConfig); + if (error) + return "encryptionConfig." + error; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { + var error = $root.google.cloud.metastore.v1beta.NetworkConfig.verify(message.networkConfig); + if (error) + return "networkConfig." + error; + } + if (message.databaseType != null && message.hasOwnProperty("databaseType")) + switch (message.databaseType) { + default: + return "databaseType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.telemetryConfig != null && message.hasOwnProperty("telemetryConfig")) { + var error = $root.google.cloud.metastore.v1beta.TelemetryConfig.verify(message.telemetryConfig); + if (error) + return "telemetryConfig." + error; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates an UpdateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Service message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.Service * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.UpdateMetadataImportRequest} UpdateMetadataImportRequest + * @returns {google.cloud.metastore.v1beta.Service} Service */ - UpdateMetadataImportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) + Service.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.Service) return object; - var message = new $root.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.metastore.v1beta.Service(); + if (object.hiveMetastoreConfig != null) { + if (typeof object.hiveMetastoreConfig !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Service.hiveMetastoreConfig: object expected"); + message.hiveMetastoreConfig = $root.google.cloud.metastore.v1beta.HiveMetastoreConfig.fromObject(object.hiveMetastoreConfig); } - if (object.metadataImport != null) { - if (typeof object.metadataImport !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.metadataImport: object expected"); - message.metadataImport = $root.google.cloud.metastore.v1alpha.MetadataImport.fromObject(object.metadataImport); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Service.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Service.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Service.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.network != null) + message.network = String(object.network); + if (object.endpointUri != null) + message.endpointUri = String(object.endpointUri); + if (object.port != null) + message.port = object.port | 0; + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "SUSPENDING": + case 3: + message.state = 3; + break; + case "SUSPENDED": + case 4: + message.state = 4; + break; + case "UPDATING": + case 5: + message.state = 5; + break; + case "DELETING": + case 6: + message.state = 6; + break; + case "ERROR": + case 7: + message.state = 7; + break; + } + if (object.stateMessage != null) + message.stateMessage = String(object.stateMessage); + if (object.artifactGcsUri != null) + message.artifactGcsUri = String(object.artifactGcsUri); + switch (object.tier) { + default: + if (typeof object.tier === "number") { + message.tier = object.tier; + break; + } + break; + case "TIER_UNSPECIFIED": + case 0: + message.tier = 0; + break; + case "DEVELOPER": + case 1: + message.tier = 1; + break; + case "ENTERPRISE": + case 3: + message.tier = 3; + break; + } + if (object.metadataIntegration != null) { + if (typeof object.metadataIntegration !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Service.metadataIntegration: object expected"); + message.metadataIntegration = $root.google.cloud.metastore.v1beta.MetadataIntegration.fromObject(object.metadataIntegration); + } + if (object.maintenanceWindow != null) { + if (typeof object.maintenanceWindow !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Service.maintenanceWindow: object expected"); + message.maintenanceWindow = $root.google.cloud.metastore.v1beta.MaintenanceWindow.fromObject(object.maintenanceWindow); + } + if (object.uid != null) + message.uid = String(object.uid); + if (object.metadataManagementActivity != null) { + if (typeof object.metadataManagementActivity !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Service.metadataManagementActivity: object expected"); + message.metadataManagementActivity = $root.google.cloud.metastore.v1beta.MetadataManagementActivity.fromObject(object.metadataManagementActivity); + } + switch (object.releaseChannel) { + default: + if (typeof object.releaseChannel === "number") { + message.releaseChannel = object.releaseChannel; + break; + } + break; + case "RELEASE_CHANNEL_UNSPECIFIED": + case 0: + message.releaseChannel = 0; + break; + case "CANARY": + case 1: + message.releaseChannel = 1; + break; + case "STABLE": + case 2: + message.releaseChannel = 2; + break; + } + if (object.encryptionConfig != null) { + if (typeof object.encryptionConfig !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Service.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.cloud.metastore.v1beta.EncryptionConfig.fromObject(object.encryptionConfig); + } + if (object.networkConfig != null) { + if (typeof object.networkConfig !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Service.networkConfig: object expected"); + message.networkConfig = $root.google.cloud.metastore.v1beta.NetworkConfig.fromObject(object.networkConfig); + } + switch (object.databaseType) { + default: + if (typeof object.databaseType === "number") { + message.databaseType = object.databaseType; + break; + } + break; + case "DATABASE_TYPE_UNSPECIFIED": + case 0: + message.databaseType = 0; + break; + case "MYSQL": + case 1: + message.databaseType = 1; + break; + case "SPANNER": + case 2: + message.databaseType = 2; + break; + } + if (object.telemetryConfig != null) { + if (typeof object.telemetryConfig !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Service.telemetryConfig: object expected"); + message.telemetryConfig = $root.google.cloud.metastore.v1beta.TelemetryConfig.fromObject(object.telemetryConfig); } - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from an UpdateMetadataImportRequest message. Also converts values to other types if specified. + * Creates a plain object from a Service message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.Service * @static - * @param {google.cloud.metastore.v1alpha.UpdateMetadataImportRequest} message UpdateMetadataImportRequest + * @param {google.cloud.metastore.v1beta.Service} message Service * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateMetadataImportRequest.toObject = function toObject(message, options) { + Service.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.updateMask = null; - object.metadataImport = null; - object.requestId = ""; + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.network = ""; + object.endpointUri = ""; + object.port = 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateMessage = ""; + object.artifactGcsUri = ""; + object.tier = options.enums === String ? "TIER_UNSPECIFIED" : 0; + object.metadataIntegration = null; + object.maintenanceWindow = null; + object.uid = ""; + object.metadataManagementActivity = null; + object.releaseChannel = options.enums === String ? "RELEASE_CHANNEL_UNSPECIFIED" : 0; + object.encryptionConfig = null; + object.networkConfig = null; + object.databaseType = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; + object.telemetryConfig = null; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) - object.metadataImport = $root.google.cloud.metastore.v1alpha.MetadataImport.toObject(message.metadataImport, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.hiveMetastoreConfig != null && message.hasOwnProperty("hiveMetastoreConfig")) { + object.hiveMetastoreConfig = $root.google.cloud.metastore.v1beta.HiveMetastoreConfig.toObject(message.hiveMetastoreConfig, options); + if (options.oneofs) + object.metastoreConfig = "hiveMetastoreConfig"; + } + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + object.endpointUri = message.endpointUri; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1beta.Service.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1beta.Service.State[message.state] : message.state; + if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) + object.stateMessage = message.stateMessage; + if (message.artifactGcsUri != null && message.hasOwnProperty("artifactGcsUri")) + object.artifactGcsUri = message.artifactGcsUri; + if (message.tier != null && message.hasOwnProperty("tier")) + object.tier = options.enums === String ? $root.google.cloud.metastore.v1beta.Service.Tier[message.tier] === undefined ? message.tier : $root.google.cloud.metastore.v1beta.Service.Tier[message.tier] : message.tier; + if (message.metadataIntegration != null && message.hasOwnProperty("metadataIntegration")) + object.metadataIntegration = $root.google.cloud.metastore.v1beta.MetadataIntegration.toObject(message.metadataIntegration, options); + if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) + object.maintenanceWindow = $root.google.cloud.metastore.v1beta.MaintenanceWindow.toObject(message.maintenanceWindow, options); + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.metadataManagementActivity != null && message.hasOwnProperty("metadataManagementActivity")) + object.metadataManagementActivity = $root.google.cloud.metastore.v1beta.MetadataManagementActivity.toObject(message.metadataManagementActivity, options); + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) + object.releaseChannel = options.enums === String ? $root.google.cloud.metastore.v1beta.Service.ReleaseChannel[message.releaseChannel] === undefined ? message.releaseChannel : $root.google.cloud.metastore.v1beta.Service.ReleaseChannel[message.releaseChannel] : message.releaseChannel; + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) + object.encryptionConfig = $root.google.cloud.metastore.v1beta.EncryptionConfig.toObject(message.encryptionConfig, options); + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) + object.networkConfig = $root.google.cloud.metastore.v1beta.NetworkConfig.toObject(message.networkConfig, options); + if (message.databaseType != null && message.hasOwnProperty("databaseType")) + object.databaseType = options.enums === String ? $root.google.cloud.metastore.v1beta.Service.DatabaseType[message.databaseType] === undefined ? message.databaseType : $root.google.cloud.metastore.v1beta.Service.DatabaseType[message.databaseType] : message.databaseType; + if (message.telemetryConfig != null && message.hasOwnProperty("telemetryConfig")) + object.telemetryConfig = $root.google.cloud.metastore.v1beta.TelemetryConfig.toObject(message.telemetryConfig, options); return object; }; /** - * Converts this UpdateMetadataImportRequest to JSON. + * Converts this Service to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.Service * @instance * @returns {Object.} JSON object */ - UpdateMetadataImportRequest.prototype.toJSON = function toJSON() { + Service.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateMetadataImportRequest + * Gets the default type url for Service * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.Service * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Service.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.UpdateMetadataImportRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.Service"; }; - return UpdateMetadataImportRequest; - })(); - - v1alpha.ListBackupsRequest = (function() { + /** + * State enum. + * @name google.cloud.metastore.v1beta.Service.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} SUSPENDING=3 SUSPENDING value + * @property {number} SUSPENDED=4 SUSPENDED value + * @property {number} UPDATING=5 UPDATING value + * @property {number} DELETING=6 DELETING value + * @property {number} ERROR=7 ERROR value + */ + Service.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "SUSPENDING"] = 3; + values[valuesById[4] = "SUSPENDED"] = 4; + values[valuesById[5] = "UPDATING"] = 5; + values[valuesById[6] = "DELETING"] = 6; + values[valuesById[7] = "ERROR"] = 7; + return values; + })(); /** - * Properties of a ListBackupsRequest. - * @memberof google.cloud.metastore.v1alpha - * @interface IListBackupsRequest - * @property {string|null} [parent] ListBackupsRequest parent - * @property {number|null} [pageSize] ListBackupsRequest pageSize - * @property {string|null} [pageToken] ListBackupsRequest pageToken - * @property {string|null} [filter] ListBackupsRequest filter - * @property {string|null} [orderBy] ListBackupsRequest orderBy + * Tier enum. + * @name google.cloud.metastore.v1beta.Service.Tier + * @enum {number} + * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value + * @property {number} DEVELOPER=1 DEVELOPER value + * @property {number} ENTERPRISE=3 ENTERPRISE value */ + Service.Tier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEVELOPER"] = 1; + values[valuesById[3] = "ENTERPRISE"] = 3; + return values; + })(); /** - * Constructs a new ListBackupsRequest. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a ListBackupsRequest. - * @implements IListBackupsRequest - * @constructor - * @param {google.cloud.metastore.v1alpha.IListBackupsRequest=} [properties] Properties to set + * ReleaseChannel enum. + * @name google.cloud.metastore.v1beta.Service.ReleaseChannel + * @enum {number} + * @property {number} RELEASE_CHANNEL_UNSPECIFIED=0 RELEASE_CHANNEL_UNSPECIFIED value + * @property {number} CANARY=1 CANARY value + * @property {number} STABLE=2 STABLE value */ - function ListBackupsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Service.ReleaseChannel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RELEASE_CHANNEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "CANARY"] = 1; + values[valuesById[2] = "STABLE"] = 2; + return values; + })(); /** - * ListBackupsRequest parent. - * @member {string} parent - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest - * @instance + * DatabaseType enum. + * @name google.cloud.metastore.v1beta.Service.DatabaseType + * @enum {number} + * @property {number} DATABASE_TYPE_UNSPECIFIED=0 DATABASE_TYPE_UNSPECIFIED value + * @property {number} MYSQL=1 MYSQL value + * @property {number} SPANNER=2 SPANNER value */ - ListBackupsRequest.prototype.parent = ""; + Service.DatabaseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MYSQL"] = 1; + values[valuesById[2] = "SPANNER"] = 2; + return values; + })(); + + return Service; + })(); + + v1beta.MetadataIntegration = (function() { /** - * ListBackupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest - * @instance + * Properties of a MetadataIntegration. + * @memberof google.cloud.metastore.v1beta + * @interface IMetadataIntegration + * @property {google.cloud.metastore.v1beta.IDataCatalogConfig|null} [dataCatalogConfig] MetadataIntegration dataCatalogConfig + * @property {google.cloud.metastore.v1beta.IDataplexConfig|null} [dataplexConfig] MetadataIntegration dataplexConfig */ - ListBackupsRequest.prototype.pageSize = 0; /** - * ListBackupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest - * @instance + * Constructs a new MetadataIntegration. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a MetadataIntegration. + * @implements IMetadataIntegration + * @constructor + * @param {google.cloud.metastore.v1beta.IMetadataIntegration=} [properties] Properties to set */ - ListBackupsRequest.prototype.pageToken = ""; + function MetadataIntegration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * ListBackupsRequest filter. - * @member {string} filter - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * MetadataIntegration dataCatalogConfig. + * @member {google.cloud.metastore.v1beta.IDataCatalogConfig|null|undefined} dataCatalogConfig + * @memberof google.cloud.metastore.v1beta.MetadataIntegration * @instance */ - ListBackupsRequest.prototype.filter = ""; + MetadataIntegration.prototype.dataCatalogConfig = null; /** - * ListBackupsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * MetadataIntegration dataplexConfig. + * @member {google.cloud.metastore.v1beta.IDataplexConfig|null|undefined} dataplexConfig + * @memberof google.cloud.metastore.v1beta.MetadataIntegration * @instance */ - ListBackupsRequest.prototype.orderBy = ""; + MetadataIntegration.prototype.dataplexConfig = null; /** - * Creates a new ListBackupsRequest instance using the specified properties. + * Creates a new MetadataIntegration instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.MetadataIntegration * @static - * @param {google.cloud.metastore.v1alpha.IListBackupsRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.ListBackupsRequest} ListBackupsRequest instance + * @param {google.cloud.metastore.v1beta.IMetadataIntegration=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.MetadataIntegration} MetadataIntegration instance */ - ListBackupsRequest.create = function create(properties) { - return new ListBackupsRequest(properties); + MetadataIntegration.create = function create(properties) { + return new MetadataIntegration(properties); }; /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsRequest.verify|verify} messages. + * Encodes the specified MetadataIntegration message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataIntegration.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.MetadataIntegration * @static - * @param {google.cloud.metastore.v1alpha.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IMetadataIntegration} message MetadataIntegration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsRequest.encode = function encode(message, writer) { + MetadataIntegration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.dataCatalogConfig != null && Object.hasOwnProperty.call(message, "dataCatalogConfig")) + $root.google.cloud.metastore.v1beta.DataCatalogConfig.encode(message.dataCatalogConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dataplexConfig != null && Object.hasOwnProperty.call(message, "dataplexConfig")) + $root.google.cloud.metastore.v1beta.DataplexConfig.encode(message.dataplexConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsRequest.verify|verify} messages. + * Encodes the specified MetadataIntegration message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataIntegration.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.MetadataIntegration * @static - * @param {google.cloud.metastore.v1alpha.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IMetadataIntegration} message MetadataIntegration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + MetadataIntegration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. + * Decodes a MetadataIntegration message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.MetadataIntegration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.metastore.v1beta.MetadataIntegration} MetadataIntegration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsRequest.decode = function decode(reader, length) { + MetadataIntegration.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ListBackupsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.MetadataIntegration(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.dataCatalogConfig = $root.google.cloud.metastore.v1beta.DataCatalogConfig.decode(reader, reader.uint32()); break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.dataplexConfig = $root.google.cloud.metastore.v1beta.DataplexConfig.decode(reader, reader.uint32()); break; } default: @@ -20317,159 +31165,141 @@ }; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * Decodes a MetadataIntegration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.MetadataIntegration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.metastore.v1beta.MetadataIntegration} MetadataIntegration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { + MetadataIntegration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBackupsRequest message. + * Verifies a MetadataIntegration message. * @function verify - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.MetadataIntegration * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBackupsRequest.verify = function verify(message) { + MetadataIntegration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.dataCatalogConfig != null && message.hasOwnProperty("dataCatalogConfig")) { + var error = $root.google.cloud.metastore.v1beta.DataCatalogConfig.verify(message.dataCatalogConfig); + if (error) + return "dataCatalogConfig." + error; + } + if (message.dataplexConfig != null && message.hasOwnProperty("dataplexConfig")) { + var error = $root.google.cloud.metastore.v1beta.DataplexConfig.verify(message.dataplexConfig); + if (error) + return "dataplexConfig." + error; + } return null; }; /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MetadataIntegration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.MetadataIntegration * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.metastore.v1beta.MetadataIntegration} MetadataIntegration */ - ListBackupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.ListBackupsRequest) + MetadataIntegration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.MetadataIntegration) return object; - var message = new $root.google.cloud.metastore.v1alpha.ListBackupsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.metastore.v1beta.MetadataIntegration(); + if (object.dataCatalogConfig != null) { + if (typeof object.dataCatalogConfig !== "object") + throw TypeError(".google.cloud.metastore.v1beta.MetadataIntegration.dataCatalogConfig: object expected"); + message.dataCatalogConfig = $root.google.cloud.metastore.v1beta.DataCatalogConfig.fromObject(object.dataCatalogConfig); + } + if (object.dataplexConfig != null) { + if (typeof object.dataplexConfig !== "object") + throw TypeError(".google.cloud.metastore.v1beta.MetadataIntegration.dataplexConfig: object expected"); + message.dataplexConfig = $root.google.cloud.metastore.v1beta.DataplexConfig.fromObject(object.dataplexConfig); + } return message; }; /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * Creates a plain object from a MetadataIntegration message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.MetadataIntegration * @static - * @param {google.cloud.metastore.v1alpha.ListBackupsRequest} message ListBackupsRequest + * @param {google.cloud.metastore.v1beta.MetadataIntegration} message MetadataIntegration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBackupsRequest.toObject = function toObject(message, options) { + MetadataIntegration.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + object.dataCatalogConfig = null; + object.dataplexConfig = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (message.dataCatalogConfig != null && message.hasOwnProperty("dataCatalogConfig")) + object.dataCatalogConfig = $root.google.cloud.metastore.v1beta.DataCatalogConfig.toObject(message.dataCatalogConfig, options); + if (message.dataplexConfig != null && message.hasOwnProperty("dataplexConfig")) + object.dataplexConfig = $root.google.cloud.metastore.v1beta.DataplexConfig.toObject(message.dataplexConfig, options); return object; }; /** - * Converts this ListBackupsRequest to JSON. + * Converts this MetadataIntegration to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.MetadataIntegration * @instance * @returns {Object.} JSON object */ - ListBackupsRequest.prototype.toJSON = function toJSON() { + MetadataIntegration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBackupsRequest + * Gets the default type url for MetadataIntegration * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.MetadataIntegration * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MetadataIntegration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ListBackupsRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.MetadataIntegration"; }; - return ListBackupsRequest; + return MetadataIntegration; })(); - v1alpha.ListBackupsResponse = (function() { + v1beta.DataCatalogConfig = (function() { /** - * Properties of a ListBackupsResponse. - * @memberof google.cloud.metastore.v1alpha - * @interface IListBackupsResponse - * @property {Array.|null} [backups] ListBackupsResponse backups - * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupsResponse unreachable + * Properties of a DataCatalogConfig. + * @memberof google.cloud.metastore.v1beta + * @interface IDataCatalogConfig + * @property {boolean|null} [enabled] DataCatalogConfig enabled */ /** - * Constructs a new ListBackupsResponse. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a ListBackupsResponse. - * @implements IListBackupsResponse + * Constructs a new DataCatalogConfig. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a DataCatalogConfig. + * @implements IDataCatalogConfig * @constructor - * @param {google.cloud.metastore.v1alpha.IListBackupsResponse=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IDataCatalogConfig=} [properties] Properties to set */ - function ListBackupsResponse(properties) { - this.backups = []; - this.unreachable = []; + function DataCatalogConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20477,109 +31307,75 @@ } /** - * ListBackupsResponse backups. - * @member {Array.} backups - * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.backups = $util.emptyArray; - - /** - * ListBackupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.nextPageToken = ""; - - /** - * ListBackupsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * DataCatalogConfig enabled. + * @member {boolean} enabled + * @memberof google.cloud.metastore.v1beta.DataCatalogConfig * @instance */ - ListBackupsResponse.prototype.unreachable = $util.emptyArray; + DataCatalogConfig.prototype.enabled = false; /** - * Creates a new ListBackupsResponse instance using the specified properties. + * Creates a new DataCatalogConfig instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DataCatalogConfig * @static - * @param {google.cloud.metastore.v1alpha.IListBackupsResponse=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.ListBackupsResponse} ListBackupsResponse instance + * @param {google.cloud.metastore.v1beta.IDataCatalogConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.DataCatalogConfig} DataCatalogConfig instance */ - ListBackupsResponse.create = function create(properties) { - return new ListBackupsResponse(properties); + DataCatalogConfig.create = function create(properties) { + return new DataCatalogConfig(properties); }; /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsResponse.verify|verify} messages. + * Encodes the specified DataCatalogConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.DataCatalogConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DataCatalogConfig * @static - * @param {google.cloud.metastore.v1alpha.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {google.cloud.metastore.v1beta.IDataCatalogConfig} message DataCatalogConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsResponse.encode = function encode(message, writer) { + DataCatalogConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.backups != null && message.backups.length) - for (var i = 0; i < message.backups.length; ++i) - $root.google.cloud.metastore.v1alpha.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); return writer; }; /** - * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ListBackupsResponse.verify|verify} messages. + * Encodes the specified DataCatalogConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DataCatalogConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DataCatalogConfig * @static - * @param {google.cloud.metastore.v1alpha.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {google.cloud.metastore.v1beta.IDataCatalogConfig} message DataCatalogConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + DataCatalogConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. + * Decodes a DataCatalogConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DataCatalogConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.ListBackupsResponse} ListBackupsResponse + * @returns {google.cloud.metastore.v1beta.DataCatalogConfig} DataCatalogConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsResponse.decode = function decode(reader, length) { + DataCatalogConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ListBackupsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.DataCatalogConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (!(message.backups && message.backups.length)) - message.backups = []; - message.backups.push($root.google.cloud.metastore.v1alpha.Backup.decode(reader, reader.uint32())); - break; - } case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.enabled = reader.bool(); break; } default: @@ -20591,169 +31387,123 @@ }; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * Decodes a DataCatalogConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DataCatalogConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.ListBackupsResponse} ListBackupsResponse + * @returns {google.cloud.metastore.v1beta.DataCatalogConfig} DataCatalogConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { + DataCatalogConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBackupsResponse message. + * Verifies a DataCatalogConfig message. * @function verify - * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DataCatalogConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBackupsResponse.verify = function verify(message) { + DataCatalogConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.backups != null && message.hasOwnProperty("backups")) { - if (!Array.isArray(message.backups)) - return "backups: array expected"; - for (var i = 0; i < message.backups.length; ++i) { - var error = $root.google.cloud.metastore.v1alpha.Backup.verify(message.backups[i]); - if (error) - return "backups." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; return null; }; /** - * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DataCatalogConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DataCatalogConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.ListBackupsResponse} ListBackupsResponse - */ - ListBackupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.ListBackupsResponse) - return object; - var message = new $root.google.cloud.metastore.v1alpha.ListBackupsResponse(); - if (object.backups) { - if (!Array.isArray(object.backups)) - throw TypeError(".google.cloud.metastore.v1alpha.ListBackupsResponse.backups: array expected"); - message.backups = []; - for (var i = 0; i < object.backups.length; ++i) { - if (typeof object.backups[i] !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.ListBackupsResponse.backups: object expected"); - message.backups[i] = $root.google.cloud.metastore.v1alpha.Backup.fromObject(object.backups[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.metastore.v1alpha.ListBackupsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + * @returns {google.cloud.metastore.v1beta.DataCatalogConfig} DataCatalogConfig + */ + DataCatalogConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.DataCatalogConfig) + return object; + var message = new $root.google.cloud.metastore.v1beta.DataCatalogConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); return message; }; /** - * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * Creates a plain object from a DataCatalogConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DataCatalogConfig * @static - * @param {google.cloud.metastore.v1alpha.ListBackupsResponse} message ListBackupsResponse + * @param {google.cloud.metastore.v1beta.DataCatalogConfig} message DataCatalogConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBackupsResponse.toObject = function toObject(message, options) { + DataCatalogConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.backups = []; - object.unreachable = []; - } if (options.defaults) - object.nextPageToken = ""; - if (message.backups && message.backups.length) { - object.backups = []; - for (var j = 0; j < message.backups.length; ++j) - object.backups[j] = $root.google.cloud.metastore.v1alpha.Backup.toObject(message.backups[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; return object; }; /** - * Converts this ListBackupsResponse to JSON. + * Converts this DataCatalogConfig to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DataCatalogConfig * @instance * @returns {Object.} JSON object */ - ListBackupsResponse.prototype.toJSON = function toJSON() { + DataCatalogConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBackupsResponse + * Gets the default type url for DataCatalogConfig * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DataCatalogConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataCatalogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ListBackupsResponse"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.DataCatalogConfig"; }; - return ListBackupsResponse; + return DataCatalogConfig; })(); - v1alpha.GetBackupRequest = (function() { + v1beta.DataplexConfig = (function() { /** - * Properties of a GetBackupRequest. - * @memberof google.cloud.metastore.v1alpha - * @interface IGetBackupRequest - * @property {string|null} [name] GetBackupRequest name + * Properties of a DataplexConfig. + * @memberof google.cloud.metastore.v1beta + * @interface IDataplexConfig + * @property {Object.|null} [lakeResources] DataplexConfig lakeResources */ /** - * Constructs a new GetBackupRequest. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a GetBackupRequest. - * @implements IGetBackupRequest + * Constructs a new DataplexConfig. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a DataplexConfig. + * @implements IDataplexConfig * @constructor - * @param {google.cloud.metastore.v1alpha.IGetBackupRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IDataplexConfig=} [properties] Properties to set */ - function GetBackupRequest(properties) { + function DataplexConfig(properties) { + this.lakeResources = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20761,75 +31511,97 @@ } /** - * GetBackupRequest name. - * @member {string} name - * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * DataplexConfig lakeResources. + * @member {Object.} lakeResources + * @memberof google.cloud.metastore.v1beta.DataplexConfig * @instance */ - GetBackupRequest.prototype.name = ""; + DataplexConfig.prototype.lakeResources = $util.emptyObject; /** - * Creates a new GetBackupRequest instance using the specified properties. + * Creates a new DataplexConfig instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.DataplexConfig * @static - * @param {google.cloud.metastore.v1alpha.IGetBackupRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.GetBackupRequest} GetBackupRequest instance + * @param {google.cloud.metastore.v1beta.IDataplexConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.DataplexConfig} DataplexConfig instance */ - GetBackupRequest.create = function create(properties) { - return new GetBackupRequest(properties); + DataplexConfig.create = function create(properties) { + return new DataplexConfig(properties); }; /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.GetBackupRequest.verify|verify} messages. + * Encodes the specified DataplexConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.DataplexConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.DataplexConfig * @static - * @param {google.cloud.metastore.v1alpha.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IDataplexConfig} message DataplexConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupRequest.encode = function encode(message, writer) { + DataplexConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.lakeResources != null && Object.hasOwnProperty.call(message, "lakeResources")) + for (var keys = Object.keys(message.lakeResources), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.metastore.v1beta.Lake.encode(message.lakeResources[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.GetBackupRequest.verify|verify} messages. + * Encodes the specified DataplexConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DataplexConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.DataplexConfig * @static - * @param {google.cloud.metastore.v1alpha.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IDataplexConfig} message DataplexConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + DataplexConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBackupRequest message from the specified reader or buffer. + * Decodes a DataplexConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.DataplexConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.GetBackupRequest} GetBackupRequest + * @returns {google.cloud.metastore.v1beta.DataplexConfig} DataplexConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupRequest.decode = function decode(reader, length) { + DataplexConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.GetBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.DataplexConfig(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (message.lakeResources === $util.emptyObject) + message.lakeResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.metastore.v1beta.Lake.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.lakeResources[key] = value; break; } default: @@ -20841,125 +31613,141 @@ }; /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a DataplexConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.DataplexConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.GetBackupRequest} GetBackupRequest + * @returns {google.cloud.metastore.v1beta.DataplexConfig} DataplexConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { + DataplexConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBackupRequest message. + * Verifies a DataplexConfig message. * @function verify - * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.DataplexConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBackupRequest.verify = function verify(message) { + DataplexConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.lakeResources != null && message.hasOwnProperty("lakeResources")) { + if (!$util.isObject(message.lakeResources)) + return "lakeResources: object expected"; + var key = Object.keys(message.lakeResources); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.metastore.v1beta.Lake.verify(message.lakeResources[key[i]]); + if (error) + return "lakeResources." + error; + } + } return null; }; /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DataplexConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.DataplexConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.GetBackupRequest} GetBackupRequest + * @returns {google.cloud.metastore.v1beta.DataplexConfig} DataplexConfig */ - GetBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.GetBackupRequest) + DataplexConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.DataplexConfig) return object; - var message = new $root.google.cloud.metastore.v1alpha.GetBackupRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.metastore.v1beta.DataplexConfig(); + if (object.lakeResources) { + if (typeof object.lakeResources !== "object") + throw TypeError(".google.cloud.metastore.v1beta.DataplexConfig.lakeResources: object expected"); + message.lakeResources = {}; + for (var keys = Object.keys(object.lakeResources), i = 0; i < keys.length; ++i) { + if (typeof object.lakeResources[keys[i]] !== "object") + throw TypeError(".google.cloud.metastore.v1beta.DataplexConfig.lakeResources: object expected"); + message.lakeResources[keys[i]] = $root.google.cloud.metastore.v1beta.Lake.fromObject(object.lakeResources[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a DataplexConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.DataplexConfig * @static - * @param {google.cloud.metastore.v1alpha.GetBackupRequest} message GetBackupRequest + * @param {google.cloud.metastore.v1beta.DataplexConfig} message DataplexConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBackupRequest.toObject = function toObject(message, options) { + DataplexConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.objects || options.defaults) + object.lakeResources = {}; + var keys2; + if (message.lakeResources && (keys2 = Object.keys(message.lakeResources)).length) { + object.lakeResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.lakeResources[keys2[j]] = $root.google.cloud.metastore.v1beta.Lake.toObject(message.lakeResources[keys2[j]], options); + } return object; }; /** - * Converts this GetBackupRequest to JSON. + * Converts this DataplexConfig to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.DataplexConfig * @instance * @returns {Object.} JSON object */ - GetBackupRequest.prototype.toJSON = function toJSON() { + DataplexConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetBackupRequest + * Gets the default type url for DataplexConfig * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.DataplexConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataplexConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.GetBackupRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.DataplexConfig"; }; - return GetBackupRequest; + return DataplexConfig; })(); - v1alpha.CreateBackupRequest = (function() { + v1beta.Lake = (function() { /** - * Properties of a CreateBackupRequest. - * @memberof google.cloud.metastore.v1alpha - * @interface ICreateBackupRequest - * @property {string|null} [parent] CreateBackupRequest parent - * @property {string|null} [backupId] CreateBackupRequest backupId - * @property {google.cloud.metastore.v1alpha.IBackup|null} [backup] CreateBackupRequest backup - * @property {string|null} [requestId] CreateBackupRequest requestId + * Properties of a Lake. + * @memberof google.cloud.metastore.v1beta + * @interface ILake + * @property {string|null} [name] Lake name */ /** - * Constructs a new CreateBackupRequest. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a CreateBackupRequest. - * @implements ICreateBackupRequest + * Constructs a new Lake. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a Lake. + * @implements ILake * @constructor - * @param {google.cloud.metastore.v1alpha.ICreateBackupRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.ILake=} [properties] Properties to set */ - function CreateBackupRequest(properties) { + function Lake(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20967,117 +31755,75 @@ } /** - * CreateBackupRequest parent. - * @member {string} parent - * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest - * @instance - */ - CreateBackupRequest.prototype.parent = ""; - - /** - * CreateBackupRequest backupId. - * @member {string} backupId - * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest - * @instance - */ - CreateBackupRequest.prototype.backupId = ""; - - /** - * CreateBackupRequest backup. - * @member {google.cloud.metastore.v1alpha.IBackup|null|undefined} backup - * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest - * @instance - */ - CreateBackupRequest.prototype.backup = null; - - /** - * CreateBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * Lake name. + * @member {string} name + * @memberof google.cloud.metastore.v1beta.Lake * @instance */ - CreateBackupRequest.prototype.requestId = ""; + Lake.prototype.name = ""; /** - * Creates a new CreateBackupRequest instance using the specified properties. + * Creates a new Lake instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.Lake * @static - * @param {google.cloud.metastore.v1alpha.ICreateBackupRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.CreateBackupRequest} CreateBackupRequest instance + * @param {google.cloud.metastore.v1beta.ILake=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.Lake} Lake instance */ - CreateBackupRequest.create = function create(properties) { - return new CreateBackupRequest(properties); + Lake.create = function create(properties) { + return new Lake(properties); }; /** - * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateBackupRequest.verify|verify} messages. + * Encodes the specified Lake message. Does not implicitly {@link google.cloud.metastore.v1beta.Lake.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.Lake * @static - * @param {google.cloud.metastore.v1alpha.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.ILake} message Lake message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBackupRequest.encode = function encode(message, writer) { + Lake.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupId); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - $root.google.cloud.metastore.v1alpha.Backup.encode(message.backup, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.CreateBackupRequest.verify|verify} messages. + * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Lake.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.Lake * @static - * @param {google.cloud.metastore.v1alpha.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.ILake} message Lake message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + Lake.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateBackupRequest message from the specified reader or buffer. + * Decodes a Lake message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.Lake * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.CreateBackupRequest} CreateBackupRequest + * @returns {google.cloud.metastore.v1beta.Lake} Lake * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBackupRequest.decode = function decode(reader, length) { + Lake.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.CreateBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.Lake(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.backupId = reader.string(); - break; - } - case 3: { - message.backup = $root.google.cloud.metastore.v1alpha.Backup.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); + message.name = reader.string(); break; } default: @@ -21089,153 +31835,123 @@ }; /** - * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a Lake message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.Lake * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.CreateBackupRequest} CreateBackupRequest + * @returns {google.cloud.metastore.v1beta.Lake} Lake * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + Lake.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateBackupRequest message. + * Verifies a Lake message. * @function verify - * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.Lake * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateBackupRequest.verify = function verify(message) { + Lake.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.backupId != null && message.hasOwnProperty("backupId")) - if (!$util.isString(message.backupId)) - return "backupId: string expected"; - if (message.backup != null && message.hasOwnProperty("backup")) { - var error = $root.google.cloud.metastore.v1alpha.Backup.verify(message.backup); - if (error) - return "backup." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Lake message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.Lake * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.CreateBackupRequest} CreateBackupRequest + * @returns {google.cloud.metastore.v1beta.Lake} Lake */ - CreateBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.CreateBackupRequest) + Lake.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.Lake) return object; - var message = new $root.google.cloud.metastore.v1alpha.CreateBackupRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.backupId != null) - message.backupId = String(object.backupId); - if (object.backup != null) { - if (typeof object.backup !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.CreateBackupRequest.backup: object expected"); - message.backup = $root.google.cloud.metastore.v1alpha.Backup.fromObject(object.backup); - } - if (object.requestId != null) - message.requestId = String(object.requestId); + var message = new $root.google.cloud.metastore.v1beta.Lake(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a Lake message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.Lake * @static - * @param {google.cloud.metastore.v1alpha.CreateBackupRequest} message CreateBackupRequest + * @param {google.cloud.metastore.v1beta.Lake} message Lake * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateBackupRequest.toObject = function toObject(message, options) { + Lake.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupId = ""; - object.backup = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupId != null && message.hasOwnProperty("backupId")) - object.backupId = message.backupId; - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = $root.google.cloud.metastore.v1alpha.Backup.toObject(message.backup, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateBackupRequest to JSON. + * Converts this Lake to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.Lake * @instance * @returns {Object.} JSON object */ - CreateBackupRequest.prototype.toJSON = function toJSON() { + Lake.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateBackupRequest + * Gets the default type url for Lake * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.Lake * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Lake.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.CreateBackupRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.Lake"; }; - return CreateBackupRequest; + return Lake; })(); - v1alpha.DeleteBackupRequest = (function() { + v1beta.MaintenanceWindow = (function() { /** - * Properties of a DeleteBackupRequest. - * @memberof google.cloud.metastore.v1alpha - * @interface IDeleteBackupRequest - * @property {string|null} [name] DeleteBackupRequest name - * @property {string|null} [requestId] DeleteBackupRequest requestId + * Properties of a MaintenanceWindow. + * @memberof google.cloud.metastore.v1beta + * @interface IMaintenanceWindow + * @property {google.protobuf.IInt32Value|null} [hourOfDay] MaintenanceWindow hourOfDay + * @property {google.type.DayOfWeek|null} [dayOfWeek] MaintenanceWindow dayOfWeek */ /** - * Constructs a new DeleteBackupRequest. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a DeleteBackupRequest. - * @implements IDeleteBackupRequest + * Constructs a new MaintenanceWindow. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a MaintenanceWindow. + * @implements IMaintenanceWindow * @constructor - * @param {google.cloud.metastore.v1alpha.IDeleteBackupRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IMaintenanceWindow=} [properties] Properties to set */ - function DeleteBackupRequest(properties) { + function MaintenanceWindow(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21243,89 +31959,89 @@ } /** - * DeleteBackupRequest name. - * @member {string} name - * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * MaintenanceWindow hourOfDay. + * @member {google.protobuf.IInt32Value|null|undefined} hourOfDay + * @memberof google.cloud.metastore.v1beta.MaintenanceWindow * @instance */ - DeleteBackupRequest.prototype.name = ""; + MaintenanceWindow.prototype.hourOfDay = null; /** - * DeleteBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * MaintenanceWindow dayOfWeek. + * @member {google.type.DayOfWeek} dayOfWeek + * @memberof google.cloud.metastore.v1beta.MaintenanceWindow * @instance */ - DeleteBackupRequest.prototype.requestId = ""; + MaintenanceWindow.prototype.dayOfWeek = 0; /** - * Creates a new DeleteBackupRequest instance using the specified properties. + * Creates a new MaintenanceWindow instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.MaintenanceWindow * @static - * @param {google.cloud.metastore.v1alpha.IDeleteBackupRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.DeleteBackupRequest} DeleteBackupRequest instance + * @param {google.cloud.metastore.v1beta.IMaintenanceWindow=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.MaintenanceWindow} MaintenanceWindow instance */ - DeleteBackupRequest.create = function create(properties) { - return new DeleteBackupRequest(properties); + MaintenanceWindow.create = function create(properties) { + return new MaintenanceWindow(properties); }; /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteBackupRequest.verify|verify} messages. + * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.metastore.v1beta.MaintenanceWindow.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.MaintenanceWindow * @static - * @param {google.cloud.metastore.v1alpha.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBackupRequest.encode = function encode(message, writer) { + MaintenanceWindow.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.hourOfDay != null && Object.hasOwnProperty.call(message, "hourOfDay")) + $root.google.protobuf.Int32Value.encode(message.hourOfDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); return writer; }; /** - * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DeleteBackupRequest.verify|verify} messages. + * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MaintenanceWindow.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.MaintenanceWindow * @static - * @param {google.cloud.metastore.v1alpha.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + MaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * Decodes a MaintenanceWindow message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.MaintenanceWindow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.DeleteBackupRequest} DeleteBackupRequest + * @returns {google.cloud.metastore.v1beta.MaintenanceWindow} MaintenanceWindow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBackupRequest.decode = function decode(reader, length) { + MaintenanceWindow.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.DeleteBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.MaintenanceWindow(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.hourOfDay = $root.google.protobuf.Int32Value.decode(reader, reader.uint32()); break; } case 2: { - message.requestId = reader.string(); + message.dayOfWeek = reader.int32(); break; } default: @@ -21337,134 +32053,191 @@ }; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.MaintenanceWindow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.DeleteBackupRequest} DeleteBackupRequest + * @returns {google.cloud.metastore.v1beta.MaintenanceWindow} MaintenanceWindow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { + MaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteBackupRequest message. + * Verifies a MaintenanceWindow message. * @function verify - * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.MaintenanceWindow * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteBackupRequest.verify = function verify(message) { + MaintenanceWindow.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.hourOfDay != null && message.hasOwnProperty("hourOfDay")) { + var error = $root.google.protobuf.Int32Value.verify(message.hourOfDay); + if (error) + return "hourOfDay." + error; + } + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + switch (message.dayOfWeek) { + default: + return "dayOfWeek: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } return null; }; /** - * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.MaintenanceWindow * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.DeleteBackupRequest} DeleteBackupRequest + * @returns {google.cloud.metastore.v1beta.MaintenanceWindow} MaintenanceWindow */ - DeleteBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.DeleteBackupRequest) + MaintenanceWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.MaintenanceWindow) return object; - var message = new $root.google.cloud.metastore.v1alpha.DeleteBackupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); + var message = new $root.google.cloud.metastore.v1beta.MaintenanceWindow(); + if (object.hourOfDay != null) { + if (typeof object.hourOfDay !== "object") + throw TypeError(".google.cloud.metastore.v1beta.MaintenanceWindow.hourOfDay: object expected"); + message.hourOfDay = $root.google.protobuf.Int32Value.fromObject(object.hourOfDay); + } + switch (object.dayOfWeek) { + default: + if (typeof object.dayOfWeek === "number") { + message.dayOfWeek = object.dayOfWeek; + break; + } + break; + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.dayOfWeek = 0; + break; + case "MONDAY": + case 1: + message.dayOfWeek = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeek = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeek = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeek = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeek = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeek = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeek = 7; + break; + } return message; }; /** - * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.MaintenanceWindow * @static - * @param {google.cloud.metastore.v1alpha.DeleteBackupRequest} message DeleteBackupRequest + * @param {google.cloud.metastore.v1beta.MaintenanceWindow} message MaintenanceWindow * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteBackupRequest.toObject = function toObject(message, options) { + MaintenanceWindow.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.requestId = ""; + object.hourOfDay = null; + object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.hourOfDay != null && message.hasOwnProperty("hourOfDay")) + object.hourOfDay = $root.google.protobuf.Int32Value.toObject(message.hourOfDay, options); + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; return object; }; /** - * Converts this DeleteBackupRequest to JSON. + * Converts this MaintenanceWindow to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.MaintenanceWindow * @instance * @returns {Object.} JSON object */ - DeleteBackupRequest.prototype.toJSON = function toJSON() { + MaintenanceWindow.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteBackupRequest + * Gets the default type url for MaintenanceWindow * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.MaintenanceWindow * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.DeleteBackupRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.MaintenanceWindow"; }; - return DeleteBackupRequest; + return MaintenanceWindow; })(); - v1alpha.ExportMetadataRequest = (function() { + v1beta.HiveMetastoreConfig = (function() { /** - * Properties of an ExportMetadataRequest. - * @memberof google.cloud.metastore.v1alpha - * @interface IExportMetadataRequest - * @property {string|null} [destinationGcsFolder] ExportMetadataRequest destinationGcsFolder - * @property {string|null} [service] ExportMetadataRequest service - * @property {string|null} [requestId] ExportMetadataRequest requestId - * @property {google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type|null} [databaseDumpType] ExportMetadataRequest databaseDumpType + * Properties of a HiveMetastoreConfig. + * @memberof google.cloud.metastore.v1beta + * @interface IHiveMetastoreConfig + * @property {string|null} [version] HiveMetastoreConfig version + * @property {Object.|null} [configOverrides] HiveMetastoreConfig configOverrides + * @property {google.cloud.metastore.v1beta.IKerberosConfig|null} [kerberosConfig] HiveMetastoreConfig kerberosConfig + * @property {google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol|null} [endpointProtocol] HiveMetastoreConfig endpointProtocol + * @property {Object.|null} [auxiliaryVersions] HiveMetastoreConfig auxiliaryVersions */ /** - * Constructs a new ExportMetadataRequest. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents an ExportMetadataRequest. - * @implements IExportMetadataRequest + * Constructs a new HiveMetastoreConfig. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a HiveMetastoreConfig. + * @implements IHiveMetastoreConfig * @constructor - * @param {google.cloud.metastore.v1alpha.IExportMetadataRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IHiveMetastoreConfig=} [properties] Properties to set */ - function ExportMetadataRequest(properties) { + function HiveMetastoreConfig(properties) { + this.configOverrides = {}; + this.auxiliaryVersions = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21472,131 +32245,173 @@ } /** - * ExportMetadataRequest destinationGcsFolder. - * @member {string|null|undefined} destinationGcsFolder - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * HiveMetastoreConfig version. + * @member {string} version + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @instance */ - ExportMetadataRequest.prototype.destinationGcsFolder = null; + HiveMetastoreConfig.prototype.version = ""; /** - * ExportMetadataRequest service. - * @member {string} service - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * HiveMetastoreConfig configOverrides. + * @member {Object.} configOverrides + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @instance */ - ExportMetadataRequest.prototype.service = ""; + HiveMetastoreConfig.prototype.configOverrides = $util.emptyObject; /** - * ExportMetadataRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * HiveMetastoreConfig kerberosConfig. + * @member {google.cloud.metastore.v1beta.IKerberosConfig|null|undefined} kerberosConfig + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @instance */ - ExportMetadataRequest.prototype.requestId = ""; + HiveMetastoreConfig.prototype.kerberosConfig = null; /** - * ExportMetadataRequest databaseDumpType. - * @member {google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type} databaseDumpType - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * HiveMetastoreConfig endpointProtocol. + * @member {google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol} endpointProtocol + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @instance */ - ExportMetadataRequest.prototype.databaseDumpType = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + HiveMetastoreConfig.prototype.endpointProtocol = 0; /** - * ExportMetadataRequest destination. - * @member {"destinationGcsFolder"|undefined} destination - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * HiveMetastoreConfig auxiliaryVersions. + * @member {Object.} auxiliaryVersions + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @instance */ - Object.defineProperty(ExportMetadataRequest.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["destinationGcsFolder"]), - set: $util.oneOfSetter($oneOfFields) - }); + HiveMetastoreConfig.prototype.auxiliaryVersions = $util.emptyObject; /** - * Creates a new ExportMetadataRequest instance using the specified properties. + * Creates a new HiveMetastoreConfig instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @static - * @param {google.cloud.metastore.v1alpha.IExportMetadataRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.ExportMetadataRequest} ExportMetadataRequest instance + * @param {google.cloud.metastore.v1beta.IHiveMetastoreConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.HiveMetastoreConfig} HiveMetastoreConfig instance */ - ExportMetadataRequest.create = function create(properties) { - return new ExportMetadataRequest(properties); + HiveMetastoreConfig.create = function create(properties) { + return new HiveMetastoreConfig(properties); }; /** - * Encodes the specified ExportMetadataRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.ExportMetadataRequest.verify|verify} messages. + * Encodes the specified HiveMetastoreConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.HiveMetastoreConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @static - * @param {google.cloud.metastore.v1alpha.IExportMetadataRequest} message ExportMetadataRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IHiveMetastoreConfig} message HiveMetastoreConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportMetadataRequest.encode = function encode(message, writer) { + HiveMetastoreConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - if (message.destinationGcsFolder != null && Object.hasOwnProperty.call(message, "destinationGcsFolder")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationGcsFolder); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - if (message.databaseDumpType != null && Object.hasOwnProperty.call(message, "databaseDumpType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.databaseDumpType); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.configOverrides != null && Object.hasOwnProperty.call(message, "configOverrides")) + for (var keys = Object.keys(message.configOverrides), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.configOverrides[keys[i]]).ldelim(); + if (message.kerberosConfig != null && Object.hasOwnProperty.call(message, "kerberosConfig")) + $root.google.cloud.metastore.v1beta.KerberosConfig.encode(message.kerberosConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endpointProtocol != null && Object.hasOwnProperty.call(message, "endpointProtocol")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.endpointProtocol); + if (message.auxiliaryVersions != null && Object.hasOwnProperty.call(message, "auxiliaryVersions")) + for (var keys = Object.keys(message.auxiliaryVersions), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.encode(message.auxiliaryVersions[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified ExportMetadataRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ExportMetadataRequest.verify|verify} messages. + * Encodes the specified HiveMetastoreConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.HiveMetastoreConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @static - * @param {google.cloud.metastore.v1alpha.IExportMetadataRequest} message ExportMetadataRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IHiveMetastoreConfig} message HiveMetastoreConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { + HiveMetastoreConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportMetadataRequest message from the specified reader or buffer. + * Decodes a HiveMetastoreConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.ExportMetadataRequest} ExportMetadataRequest + * @returns {google.cloud.metastore.v1beta.HiveMetastoreConfig} HiveMetastoreConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportMetadataRequest.decode = function decode(reader, length) { + HiveMetastoreConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ExportMetadataRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.HiveMetastoreConfig(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.destinationGcsFolder = reader.string(); + case 1: { + message.version = reader.string(); break; } - case 1: { - message.service = reader.string(); + case 2: { + if (message.configOverrides === $util.emptyObject) + message.configOverrides = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.configOverrides[key] = value; break; } case 3: { - message.requestId = reader.string(); + message.kerberosConfig = $root.google.cloud.metastore.v1beta.KerberosConfig.decode(reader, reader.uint32()); break; } case 4: { - message.databaseDumpType = reader.int32(); + message.endpointProtocol = reader.int32(); + break; + } + case 5: { + if (message.auxiliaryVersions === $util.emptyObject) + message.auxiliaryVersions = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.auxiliaryVersions[key] = value; break; } default: @@ -21608,297 +32423,340 @@ }; /** - * Decodes an ExportMetadataRequest message from the specified reader or buffer, length delimited. + * Decodes a HiveMetastoreConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.ExportMetadataRequest} ExportMetadataRequest + * @returns {google.cloud.metastore.v1beta.HiveMetastoreConfig} HiveMetastoreConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportMetadataRequest.decodeDelimited = function decodeDelimited(reader) { + HiveMetastoreConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportMetadataRequest message. + * Verifies a HiveMetastoreConfig message. * @function verify - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportMetadataRequest.verify = function verify(message) { + HiveMetastoreConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.destinationGcsFolder != null && message.hasOwnProperty("destinationGcsFolder")) { - properties.destination = 1; - if (!$util.isString(message.destinationGcsFolder)) - return "destinationGcsFolder: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.configOverrides != null && message.hasOwnProperty("configOverrides")) { + if (!$util.isObject(message.configOverrides)) + return "configOverrides: object expected"; + var key = Object.keys(message.configOverrides); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.configOverrides[key[i]])) + return "configOverrides: string{k:string} expected"; } - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) - switch (message.databaseDumpType) { + if (message.kerberosConfig != null && message.hasOwnProperty("kerberosConfig")) { + var error = $root.google.cloud.metastore.v1beta.KerberosConfig.verify(message.kerberosConfig); + if (error) + return "kerberosConfig." + error; + } + if (message.endpointProtocol != null && message.hasOwnProperty("endpointProtocol")) + switch (message.endpointProtocol) { default: - return "databaseDumpType: enum value expected"; + return "endpointProtocol: enum value expected"; case 0: case 1: case 2: break; } + if (message.auxiliaryVersions != null && message.hasOwnProperty("auxiliaryVersions")) { + if (!$util.isObject(message.auxiliaryVersions)) + return "auxiliaryVersions: object expected"; + var key = Object.keys(message.auxiliaryVersions); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.verify(message.auxiliaryVersions[key[i]]); + if (error) + return "auxiliaryVersions." + error; + } + } return null; }; /** - * Creates an ExportMetadataRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HiveMetastoreConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.ExportMetadataRequest} ExportMetadataRequest + * @returns {google.cloud.metastore.v1beta.HiveMetastoreConfig} HiveMetastoreConfig */ - ExportMetadataRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.ExportMetadataRequest) + HiveMetastoreConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.HiveMetastoreConfig) return object; - var message = new $root.google.cloud.metastore.v1alpha.ExportMetadataRequest(); - if (object.destinationGcsFolder != null) - message.destinationGcsFolder = String(object.destinationGcsFolder); - if (object.service != null) - message.service = String(object.service); - if (object.requestId != null) - message.requestId = String(object.requestId); - switch (object.databaseDumpType) { + var message = new $root.google.cloud.metastore.v1beta.HiveMetastoreConfig(); + if (object.version != null) + message.version = String(object.version); + if (object.configOverrides) { + if (typeof object.configOverrides !== "object") + throw TypeError(".google.cloud.metastore.v1beta.HiveMetastoreConfig.configOverrides: object expected"); + message.configOverrides = {}; + for (var keys = Object.keys(object.configOverrides), i = 0; i < keys.length; ++i) + message.configOverrides[keys[i]] = String(object.configOverrides[keys[i]]); + } + if (object.kerberosConfig != null) { + if (typeof object.kerberosConfig !== "object") + throw TypeError(".google.cloud.metastore.v1beta.HiveMetastoreConfig.kerberosConfig: object expected"); + message.kerberosConfig = $root.google.cloud.metastore.v1beta.KerberosConfig.fromObject(object.kerberosConfig); + } + switch (object.endpointProtocol) { default: - if (typeof object.databaseDumpType === "number") { - message.databaseDumpType = object.databaseDumpType; + if (typeof object.endpointProtocol === "number") { + message.endpointProtocol = object.endpointProtocol; break; } break; - case "TYPE_UNSPECIFIED": + case "ENDPOINT_PROTOCOL_UNSPECIFIED": case 0: - message.databaseDumpType = 0; + message.endpointProtocol = 0; break; - case "MYSQL": + case "THRIFT": case 1: - message.databaseDumpType = 1; + message.endpointProtocol = 1; break; - case "AVRO": + case "GRPC": case 2: - message.databaseDumpType = 2; + message.endpointProtocol = 2; break; } + if (object.auxiliaryVersions) { + if (typeof object.auxiliaryVersions !== "object") + throw TypeError(".google.cloud.metastore.v1beta.HiveMetastoreConfig.auxiliaryVersions: object expected"); + message.auxiliaryVersions = {}; + for (var keys = Object.keys(object.auxiliaryVersions), i = 0; i < keys.length; ++i) { + if (typeof object.auxiliaryVersions[keys[i]] !== "object") + throw TypeError(".google.cloud.metastore.v1beta.HiveMetastoreConfig.auxiliaryVersions: object expected"); + message.auxiliaryVersions[keys[i]] = $root.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.fromObject(object.auxiliaryVersions[keys[i]]); + } + } return message; }; /** - * Creates a plain object from an ExportMetadataRequest message. Also converts values to other types if specified. + * Creates a plain object from a HiveMetastoreConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @static - * @param {google.cloud.metastore.v1alpha.ExportMetadataRequest} message ExportMetadataRequest + * @param {google.cloud.metastore.v1beta.HiveMetastoreConfig} message HiveMetastoreConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportMetadataRequest.toObject = function toObject(message, options) { + HiveMetastoreConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) { + object.configOverrides = {}; + object.auxiliaryVersions = {}; + } if (options.defaults) { - object.service = ""; - object.requestId = ""; - object.databaseDumpType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.version = ""; + object.kerberosConfig = null; + object.endpointProtocol = options.enums === String ? "ENDPOINT_PROTOCOL_UNSPECIFIED" : 0; } - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.destinationGcsFolder != null && message.hasOwnProperty("destinationGcsFolder")) { - object.destinationGcsFolder = message.destinationGcsFolder; - if (options.oneofs) - object.destination = "destinationGcsFolder"; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + var keys2; + if (message.configOverrides && (keys2 = Object.keys(message.configOverrides)).length) { + object.configOverrides = {}; + for (var j = 0; j < keys2.length; ++j) + object.configOverrides[keys2[j]] = message.configOverrides[keys2[j]]; + } + if (message.kerberosConfig != null && message.hasOwnProperty("kerberosConfig")) + object.kerberosConfig = $root.google.cloud.metastore.v1beta.KerberosConfig.toObject(message.kerberosConfig, options); + if (message.endpointProtocol != null && message.hasOwnProperty("endpointProtocol")) + object.endpointProtocol = options.enums === String ? $root.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol[message.endpointProtocol] === undefined ? message.endpointProtocol : $root.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol[message.endpointProtocol] : message.endpointProtocol; + if (message.auxiliaryVersions && (keys2 = Object.keys(message.auxiliaryVersions)).length) { + object.auxiliaryVersions = {}; + for (var j = 0; j < keys2.length; ++j) + object.auxiliaryVersions[keys2[j]] = $root.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.toObject(message.auxiliaryVersions[keys2[j]], options); } - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) - object.databaseDumpType = options.enums === String ? $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type[message.databaseDumpType] === undefined ? message.databaseDumpType : $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type[message.databaseDumpType] : message.databaseDumpType; return object; }; /** - * Converts this ExportMetadataRequest to JSON. + * Converts this HiveMetastoreConfig to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @instance * @returns {Object.} JSON object */ - ExportMetadataRequest.prototype.toJSON = function toJSON() { + HiveMetastoreConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportMetadataRequest + * Gets the default type url for HiveMetastoreConfig * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportMetadataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + HiveMetastoreConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ExportMetadataRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.HiveMetastoreConfig"; }; - return ExportMetadataRequest; + /** + * EndpointProtocol enum. + * @name google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol + * @enum {number} + * @property {number} ENDPOINT_PROTOCOL_UNSPECIFIED=0 ENDPOINT_PROTOCOL_UNSPECIFIED value + * @property {number} THRIFT=1 THRIFT value + * @property {number} GRPC=2 GRPC value + */ + HiveMetastoreConfig.EndpointProtocol = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENDPOINT_PROTOCOL_UNSPECIFIED"] = 0; + values[valuesById[1] = "THRIFT"] = 1; + values[valuesById[2] = "GRPC"] = 2; + return values; + })(); + + return HiveMetastoreConfig; })(); - v1alpha.RestoreServiceRequest = (function() { + v1beta.KerberosConfig = (function() { /** - * Properties of a RestoreServiceRequest. - * @memberof google.cloud.metastore.v1alpha - * @interface IRestoreServiceRequest - * @property {string|null} [service] RestoreServiceRequest service - * @property {string|null} [backup] RestoreServiceRequest backup - * @property {google.cloud.metastore.v1alpha.Restore.RestoreType|null} [restoreType] RestoreServiceRequest restoreType - * @property {string|null} [requestId] RestoreServiceRequest requestId + * Properties of a KerberosConfig. + * @memberof google.cloud.metastore.v1beta + * @interface IKerberosConfig + * @property {google.cloud.metastore.v1beta.ISecret|null} [keytab] KerberosConfig keytab + * @property {string|null} [principal] KerberosConfig principal + * @property {string|null} [krb5ConfigGcsUri] KerberosConfig krb5ConfigGcsUri */ /** - * Constructs a new RestoreServiceRequest. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a RestoreServiceRequest. - * @implements IRestoreServiceRequest + * Constructs a new KerberosConfig. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a KerberosConfig. + * @implements IKerberosConfig * @constructor - * @param {google.cloud.metastore.v1alpha.IRestoreServiceRequest=} [properties] Properties to set - */ - function RestoreServiceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RestoreServiceRequest service. - * @member {string} service - * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest - * @instance + * @param {google.cloud.metastore.v1beta.IKerberosConfig=} [properties] Properties to set */ - RestoreServiceRequest.prototype.service = ""; + function KerberosConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * RestoreServiceRequest backup. - * @member {string} backup - * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * KerberosConfig keytab. + * @member {google.cloud.metastore.v1beta.ISecret|null|undefined} keytab + * @memberof google.cloud.metastore.v1beta.KerberosConfig * @instance */ - RestoreServiceRequest.prototype.backup = ""; + KerberosConfig.prototype.keytab = null; /** - * RestoreServiceRequest restoreType. - * @member {google.cloud.metastore.v1alpha.Restore.RestoreType} restoreType - * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * KerberosConfig principal. + * @member {string} principal + * @memberof google.cloud.metastore.v1beta.KerberosConfig * @instance */ - RestoreServiceRequest.prototype.restoreType = 0; + KerberosConfig.prototype.principal = ""; /** - * RestoreServiceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * KerberosConfig krb5ConfigGcsUri. + * @member {string} krb5ConfigGcsUri + * @memberof google.cloud.metastore.v1beta.KerberosConfig * @instance */ - RestoreServiceRequest.prototype.requestId = ""; + KerberosConfig.prototype.krb5ConfigGcsUri = ""; /** - * Creates a new RestoreServiceRequest instance using the specified properties. + * Creates a new KerberosConfig instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.KerberosConfig * @static - * @param {google.cloud.metastore.v1alpha.IRestoreServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.RestoreServiceRequest} RestoreServiceRequest instance + * @param {google.cloud.metastore.v1beta.IKerberosConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.KerberosConfig} KerberosConfig instance */ - RestoreServiceRequest.create = function create(properties) { - return new RestoreServiceRequest(properties); + KerberosConfig.create = function create(properties) { + return new KerberosConfig(properties); }; /** - * Encodes the specified RestoreServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1alpha.RestoreServiceRequest.verify|verify} messages. + * Encodes the specified KerberosConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.KerberosConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.KerberosConfig * @static - * @param {google.cloud.metastore.v1alpha.IRestoreServiceRequest} message RestoreServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IKerberosConfig} message KerberosConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreServiceRequest.encode = function encode(message, writer) { + KerberosConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backup); - if (message.restoreType != null && Object.hasOwnProperty.call(message, "restoreType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.restoreType); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.keytab != null && Object.hasOwnProperty.call(message, "keytab")) + $root.google.cloud.metastore.v1beta.Secret.encode(message.keytab, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.principal != null && Object.hasOwnProperty.call(message, "principal")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.principal); + if (message.krb5ConfigGcsUri != null && Object.hasOwnProperty.call(message, "krb5ConfigGcsUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.krb5ConfigGcsUri); return writer; }; /** - * Encodes the specified RestoreServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.RestoreServiceRequest.verify|verify} messages. + * Encodes the specified KerberosConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.KerberosConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.KerberosConfig * @static - * @param {google.cloud.metastore.v1alpha.IRestoreServiceRequest} message RestoreServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IKerberosConfig} message KerberosConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + KerberosConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RestoreServiceRequest message from the specified reader or buffer. + * Decodes a KerberosConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.KerberosConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.RestoreServiceRequest} RestoreServiceRequest + * @returns {google.cloud.metastore.v1beta.KerberosConfig} KerberosConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreServiceRequest.decode = function decode(reader, length) { + KerberosConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.RestoreServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.KerberosConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.service = reader.string(); + message.keytab = $root.google.cloud.metastore.v1beta.Secret.decode(reader, reader.uint32()); break; } case 2: { - message.backup = reader.string(); + message.principal = reader.string(); break; } case 3: { - message.restoreType = reader.int32(); - break; - } - case 4: { - message.requestId = reader.string(); + message.krb5ConfigGcsUri = reader.string(); break; } default: @@ -21910,177 +32768,144 @@ }; /** - * Decodes a RestoreServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a KerberosConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.KerberosConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.RestoreServiceRequest} RestoreServiceRequest + * @returns {google.cloud.metastore.v1beta.KerberosConfig} KerberosConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreServiceRequest.decodeDelimited = function decodeDelimited(reader) { + KerberosConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RestoreServiceRequest message. + * Verifies a KerberosConfig message. * @function verify - * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.KerberosConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RestoreServiceRequest.verify = function verify(message) { + KerberosConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.backup != null && message.hasOwnProperty("backup")) - if (!$util.isString(message.backup)) - return "backup: string expected"; - if (message.restoreType != null && message.hasOwnProperty("restoreType")) - switch (message.restoreType) { - default: - return "restoreType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.keytab != null && message.hasOwnProperty("keytab")) { + var error = $root.google.cloud.metastore.v1beta.Secret.verify(message.keytab); + if (error) + return "keytab." + error; + } + if (message.principal != null && message.hasOwnProperty("principal")) + if (!$util.isString(message.principal)) + return "principal: string expected"; + if (message.krb5ConfigGcsUri != null && message.hasOwnProperty("krb5ConfigGcsUri")) + if (!$util.isString(message.krb5ConfigGcsUri)) + return "krb5ConfigGcsUri: string expected"; return null; }; /** - * Creates a RestoreServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a KerberosConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.KerberosConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.RestoreServiceRequest} RestoreServiceRequest + * @returns {google.cloud.metastore.v1beta.KerberosConfig} KerberosConfig */ - RestoreServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.RestoreServiceRequest) + KerberosConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.KerberosConfig) return object; - var message = new $root.google.cloud.metastore.v1alpha.RestoreServiceRequest(); - if (object.service != null) - message.service = String(object.service); - if (object.backup != null) - message.backup = String(object.backup); - switch (object.restoreType) { - default: - if (typeof object.restoreType === "number") { - message.restoreType = object.restoreType; - break; - } - break; - case "RESTORE_TYPE_UNSPECIFIED": - case 0: - message.restoreType = 0; - break; - case "FULL": - case 1: - message.restoreType = 1; - break; - case "METADATA_ONLY": - case 2: - message.restoreType = 2; - break; + var message = new $root.google.cloud.metastore.v1beta.KerberosConfig(); + if (object.keytab != null) { + if (typeof object.keytab !== "object") + throw TypeError(".google.cloud.metastore.v1beta.KerberosConfig.keytab: object expected"); + message.keytab = $root.google.cloud.metastore.v1beta.Secret.fromObject(object.keytab); } - if (object.requestId != null) - message.requestId = String(object.requestId); + if (object.principal != null) + message.principal = String(object.principal); + if (object.krb5ConfigGcsUri != null) + message.krb5ConfigGcsUri = String(object.krb5ConfigGcsUri); return message; }; /** - * Creates a plain object from a RestoreServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a KerberosConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.KerberosConfig * @static - * @param {google.cloud.metastore.v1alpha.RestoreServiceRequest} message RestoreServiceRequest + * @param {google.cloud.metastore.v1beta.KerberosConfig} message KerberosConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestoreServiceRequest.toObject = function toObject(message, options) { + KerberosConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.service = ""; - object.backup = ""; - object.restoreType = options.enums === String ? "RESTORE_TYPE_UNSPECIFIED" : 0; - object.requestId = ""; + object.keytab = null; + object.principal = ""; + object.krb5ConfigGcsUri = ""; } - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = message.backup; - if (message.restoreType != null && message.hasOwnProperty("restoreType")) - object.restoreType = options.enums === String ? $root.google.cloud.metastore.v1alpha.Restore.RestoreType[message.restoreType] === undefined ? message.restoreType : $root.google.cloud.metastore.v1alpha.Restore.RestoreType[message.restoreType] : message.restoreType; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.keytab != null && message.hasOwnProperty("keytab")) + object.keytab = $root.google.cloud.metastore.v1beta.Secret.toObject(message.keytab, options); + if (message.principal != null && message.hasOwnProperty("principal")) + object.principal = message.principal; + if (message.krb5ConfigGcsUri != null && message.hasOwnProperty("krb5ConfigGcsUri")) + object.krb5ConfigGcsUri = message.krb5ConfigGcsUri; return object; }; /** - * Converts this RestoreServiceRequest to JSON. + * Converts this KerberosConfig to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.KerberosConfig * @instance * @returns {Object.} JSON object */ - RestoreServiceRequest.prototype.toJSON = function toJSON() { + KerberosConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RestoreServiceRequest + * Gets the default type url for KerberosConfig * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.KerberosConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RestoreServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + KerberosConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.RestoreServiceRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.KerberosConfig"; }; - return RestoreServiceRequest; + return KerberosConfig; })(); - v1alpha.OperationMetadata = (function() { + v1beta.Secret = (function() { /** - * Properties of an OperationMetadata. - * @memberof google.cloud.metastore.v1alpha - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion + * Properties of a Secret. + * @memberof google.cloud.metastore.v1beta + * @interface ISecret + * @property {string|null} [cloudSecret] Secret cloudSecret */ /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata + * Constructs a new Secret. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a Secret. + * @implements ISecret * @constructor - * @param {google.cloud.metastore.v1alpha.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.ISecret=} [properties] Properties to set */ - function OperationMetadata(properties) { + function Secret(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22088,159 +32913,89 @@ } /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.metastore.v1alpha.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.metastore.v1alpha.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.metastore.v1alpha.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.metastore.v1alpha.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * Secret cloudSecret. + * @member {string|null|undefined} cloudSecret + * @memberof google.cloud.metastore.v1beta.Secret * @instance */ - OperationMetadata.prototype.statusMessage = ""; + Secret.prototype.cloudSecret = null; - /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.metastore.v1alpha.OperationMetadata - * @instance - */ - OperationMetadata.prototype.requestedCancellation = false; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * Secret value. + * @member {"cloudSecret"|undefined} value + * @memberof google.cloud.metastore.v1beta.Secret * @instance */ - OperationMetadata.prototype.apiVersion = ""; + Object.defineProperty(Secret.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["cloudSecret"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new Secret instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @memberof google.cloud.metastore.v1beta.Secret * @static - * @param {google.cloud.metastore.v1alpha.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.OperationMetadata} OperationMetadata instance + * @param {google.cloud.metastore.v1beta.ISecret=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.Secret} Secret instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + Secret.create = function create(properties) { + return new Secret(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.metastore.v1alpha.OperationMetadata.verify|verify} messages. + * Encodes the specified Secret message. Does not implicitly {@link google.cloud.metastore.v1beta.Secret.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @memberof google.cloud.metastore.v1beta.Secret * @static - * @param {google.cloud.metastore.v1alpha.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.metastore.v1beta.ISecret} message Secret message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + Secret.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + if (message.cloudSecret != null && Object.hasOwnProperty.call(message, "cloudSecret")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cloudSecret); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.OperationMetadata.verify|verify} messages. + * Encodes the specified Secret message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Secret.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @memberof google.cloud.metastore.v1beta.Secret * @static - * @param {google.cloud.metastore.v1alpha.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.metastore.v1beta.ISecret} message Secret message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + Secret.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a Secret message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @memberof google.cloud.metastore.v1beta.Secret * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.OperationMetadata} OperationMetadata + * @returns {google.cloud.metastore.v1beta.Secret} Secret * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decode = function decode(reader, length) { + Secret.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.Secret(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.target = reader.string(); - break; - } - case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.statusMessage = reader.string(); - break; - } - case 6: { - message.requestedCancellation = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); + message.cloudSecret = reader.string(); break; } default: @@ -22252,182 +33007,126 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a Secret message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @memberof google.cloud.metastore.v1beta.Secret * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.OperationMetadata} OperationMetadata + * @returns {google.cloud.metastore.v1beta.Secret} Secret * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + Secret.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies a Secret message. * @function verify - * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @memberof google.cloud.metastore.v1beta.Secret * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationMetadata.verify = function verify(message) { + Secret.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; + var properties = {}; + if (message.cloudSecret != null && message.hasOwnProperty("cloudSecret")) { + properties.value = 1; + if (!$util.isString(message.cloudSecret)) + return "cloudSecret: string expected"; } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a Secret message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @memberof google.cloud.metastore.v1beta.Secret * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.OperationMetadata} OperationMetadata + * @returns {google.cloud.metastore.v1beta.Secret} Secret */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.OperationMetadata) + Secret.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.Secret) return object; - var message = new $root.google.cloud.metastore.v1alpha.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); + var message = new $root.google.cloud.metastore.v1beta.Secret(); + if (object.cloudSecret != null) + message.cloudSecret = String(object.cloudSecret); return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a Secret message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @memberof google.cloud.metastore.v1beta.Secret * @static - * @param {google.cloud.metastore.v1alpha.OperationMetadata} message OperationMetadata + * @param {google.cloud.metastore.v1beta.Secret} message Secret * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options) { + Secret.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; + if (message.cloudSecret != null && message.hasOwnProperty("cloudSecret")) { + object.cloudSecret = message.cloudSecret; + if (options.oneofs) + object.value = "cloudSecret"; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this Secret to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @memberof google.cloud.metastore.v1beta.Secret * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + Secret.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for Secret * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.OperationMetadata + * @memberof google.cloud.metastore.v1beta.Secret * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Secret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.OperationMetadata"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.Secret"; }; - return OperationMetadata; + return Secret; })(); - v1alpha.LocationMetadata = (function() { + v1beta.EncryptionConfig = (function() { /** - * Properties of a LocationMetadata. - * @memberof google.cloud.metastore.v1alpha - * @interface ILocationMetadata - * @property {Array.|null} [supportedHiveMetastoreVersions] LocationMetadata supportedHiveMetastoreVersions + * Properties of an EncryptionConfig. + * @memberof google.cloud.metastore.v1beta + * @interface IEncryptionConfig + * @property {string|null} [kmsKey] EncryptionConfig kmsKey */ /** - * Constructs a new LocationMetadata. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a LocationMetadata. - * @implements ILocationMetadata + * Constructs a new EncryptionConfig. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents an EncryptionConfig. + * @implements IEncryptionConfig * @constructor - * @param {google.cloud.metastore.v1alpha.ILocationMetadata=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IEncryptionConfig=} [properties] Properties to set */ - function LocationMetadata(properties) { - this.supportedHiveMetastoreVersions = []; + function EncryptionConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22435,78 +33134,75 @@ } /** - * LocationMetadata supportedHiveMetastoreVersions. - * @member {Array.} supportedHiveMetastoreVersions - * @memberof google.cloud.metastore.v1alpha.LocationMetadata + * EncryptionConfig kmsKey. + * @member {string} kmsKey + * @memberof google.cloud.metastore.v1beta.EncryptionConfig * @instance */ - LocationMetadata.prototype.supportedHiveMetastoreVersions = $util.emptyArray; + EncryptionConfig.prototype.kmsKey = ""; /** - * Creates a new LocationMetadata instance using the specified properties. + * Creates a new EncryptionConfig instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.LocationMetadata + * @memberof google.cloud.metastore.v1beta.EncryptionConfig * @static - * @param {google.cloud.metastore.v1alpha.ILocationMetadata=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.LocationMetadata} LocationMetadata instance + * @param {google.cloud.metastore.v1beta.IEncryptionConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.EncryptionConfig} EncryptionConfig instance */ - LocationMetadata.create = function create(properties) { - return new LocationMetadata(properties); + EncryptionConfig.create = function create(properties) { + return new EncryptionConfig(properties); }; /** - * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.verify|verify} messages. + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.EncryptionConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.LocationMetadata + * @memberof google.cloud.metastore.v1beta.EncryptionConfig * @static - * @param {google.cloud.metastore.v1alpha.ILocationMetadata} message LocationMetadata message or plain object to encode + * @param {google.cloud.metastore.v1beta.IEncryptionConfig} message EncryptionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LocationMetadata.encode = function encode(message, writer) { + EncryptionConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.supportedHiveMetastoreVersions != null && message.supportedHiveMetastoreVersions.length) - for (var i = 0; i < message.supportedHiveMetastoreVersions.length; ++i) - $root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.encode(message.supportedHiveMetastoreVersions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKey); return writer; }; /** - * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.verify|verify} messages. + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.EncryptionConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.LocationMetadata + * @memberof google.cloud.metastore.v1beta.EncryptionConfig * @static - * @param {google.cloud.metastore.v1alpha.ILocationMetadata} message LocationMetadata message or plain object to encode + * @param {google.cloud.metastore.v1beta.IEncryptionConfig} message EncryptionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LocationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LocationMetadata message from the specified reader or buffer. + * Decodes an EncryptionConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.LocationMetadata + * @memberof google.cloud.metastore.v1beta.EncryptionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.LocationMetadata} LocationMetadata + * @returns {google.cloud.metastore.v1beta.EncryptionConfig} EncryptionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LocationMetadata.decode = function decode(reader, length) { + EncryptionConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.LocationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.EncryptionConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.supportedHiveMetastoreVersions && message.supportedHiveMetastoreVersions.length)) - message.supportedHiveMetastoreVersions = []; - message.supportedHiveMetastoreVersions.push($root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.decode(reader, reader.uint32())); + message.kmsKey = reader.string(); break; } default: @@ -22518,365 +33214,414 @@ }; /** - * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.LocationMetadata + * @memberof google.cloud.metastore.v1beta.EncryptionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.LocationMetadata} LocationMetadata + * @returns {google.cloud.metastore.v1beta.EncryptionConfig} EncryptionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LocationMetadata.decodeDelimited = function decodeDelimited(reader) { + EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LocationMetadata message. + * Verifies an EncryptionConfig message. * @function verify - * @memberof google.cloud.metastore.v1alpha.LocationMetadata + * @memberof google.cloud.metastore.v1beta.EncryptionConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LocationMetadata.verify = function verify(message) { + EncryptionConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.supportedHiveMetastoreVersions != null && message.hasOwnProperty("supportedHiveMetastoreVersions")) { - if (!Array.isArray(message.supportedHiveMetastoreVersions)) - return "supportedHiveMetastoreVersions: array expected"; - for (var i = 0; i < message.supportedHiveMetastoreVersions.length; ++i) { - var error = $root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.verify(message.supportedHiveMetastoreVersions[i]); - if (error) - return "supportedHiveMetastoreVersions." + error; - } - } + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + if (!$util.isString(message.kmsKey)) + return "kmsKey: string expected"; return null; }; /** - * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.LocationMetadata + * @memberof google.cloud.metastore.v1beta.EncryptionConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.LocationMetadata} LocationMetadata + * @returns {google.cloud.metastore.v1beta.EncryptionConfig} EncryptionConfig */ - LocationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.LocationMetadata) + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.EncryptionConfig) return object; - var message = new $root.google.cloud.metastore.v1alpha.LocationMetadata(); - if (object.supportedHiveMetastoreVersions) { - if (!Array.isArray(object.supportedHiveMetastoreVersions)) - throw TypeError(".google.cloud.metastore.v1alpha.LocationMetadata.supportedHiveMetastoreVersions: array expected"); - message.supportedHiveMetastoreVersions = []; - for (var i = 0; i < object.supportedHiveMetastoreVersions.length; ++i) { - if (typeof object.supportedHiveMetastoreVersions[i] !== "object") - throw TypeError(".google.cloud.metastore.v1alpha.LocationMetadata.supportedHiveMetastoreVersions: object expected"); - message.supportedHiveMetastoreVersions[i] = $root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.fromObject(object.supportedHiveMetastoreVersions[i]); - } - } + var message = new $root.google.cloud.metastore.v1beta.EncryptionConfig(); + if (object.kmsKey != null) + message.kmsKey = String(object.kmsKey); return message; }; /** - * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.LocationMetadata + * @memberof google.cloud.metastore.v1beta.EncryptionConfig * @static - * @param {google.cloud.metastore.v1alpha.LocationMetadata} message LocationMetadata + * @param {google.cloud.metastore.v1beta.EncryptionConfig} message EncryptionConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LocationMetadata.toObject = function toObject(message, options) { + EncryptionConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.supportedHiveMetastoreVersions = []; - if (message.supportedHiveMetastoreVersions && message.supportedHiveMetastoreVersions.length) { - object.supportedHiveMetastoreVersions = []; - for (var j = 0; j < message.supportedHiveMetastoreVersions.length; ++j) - object.supportedHiveMetastoreVersions[j] = $root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.toObject(message.supportedHiveMetastoreVersions[j], options); - } + if (options.defaults) + object.kmsKey = ""; + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + object.kmsKey = message.kmsKey; return object; }; /** - * Converts this LocationMetadata to JSON. + * Converts this EncryptionConfig to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.LocationMetadata + * @memberof google.cloud.metastore.v1beta.EncryptionConfig * @instance * @returns {Object.} JSON object */ - LocationMetadata.prototype.toJSON = function toJSON() { + EncryptionConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LocationMetadata + * Gets the default type url for EncryptionConfig * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.LocationMetadata + * @memberof google.cloud.metastore.v1beta.EncryptionConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LocationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.LocationMetadata"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.EncryptionConfig"; }; - LocationMetadata.HiveMetastoreVersion = (function() { + return EncryptionConfig; + })(); - /** - * Properties of a HiveMetastoreVersion. - * @memberof google.cloud.metastore.v1alpha.LocationMetadata - * @interface IHiveMetastoreVersion - * @property {string|null} [version] HiveMetastoreVersion version - * @property {boolean|null} [isDefault] HiveMetastoreVersion isDefault - */ + v1beta.AuxiliaryVersionConfig = (function() { - /** - * Constructs a new HiveMetastoreVersion. - * @memberof google.cloud.metastore.v1alpha.LocationMetadata - * @classdesc Represents a HiveMetastoreVersion. - * @implements IHiveMetastoreVersion - * @constructor - * @param {google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion=} [properties] Properties to set - */ - function HiveMetastoreVersion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an AuxiliaryVersionConfig. + * @memberof google.cloud.metastore.v1beta + * @interface IAuxiliaryVersionConfig + * @property {string|null} [version] AuxiliaryVersionConfig version + * @property {Object.|null} [configOverrides] AuxiliaryVersionConfig configOverrides + * @property {google.cloud.metastore.v1beta.INetworkConfig|null} [networkConfig] AuxiliaryVersionConfig networkConfig + */ - /** - * HiveMetastoreVersion version. - * @member {string} version - * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - * @instance - */ - HiveMetastoreVersion.prototype.version = ""; + /** + * Constructs a new AuxiliaryVersionConfig. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents an AuxiliaryVersionConfig. + * @implements IAuxiliaryVersionConfig + * @constructor + * @param {google.cloud.metastore.v1beta.IAuxiliaryVersionConfig=} [properties] Properties to set + */ + function AuxiliaryVersionConfig(properties) { + this.configOverrides = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * HiveMetastoreVersion isDefault. - * @member {boolean} isDefault - * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - * @instance - */ - HiveMetastoreVersion.prototype.isDefault = false; + /** + * AuxiliaryVersionConfig version. + * @member {string} version + * @memberof google.cloud.metastore.v1beta.AuxiliaryVersionConfig + * @instance + */ + AuxiliaryVersionConfig.prototype.version = ""; - /** - * Creates a new HiveMetastoreVersion instance using the specified properties. - * @function create - * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - * @static - * @param {google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion instance - */ - HiveMetastoreVersion.create = function create(properties) { - return new HiveMetastoreVersion(properties); - }; + /** + * AuxiliaryVersionConfig configOverrides. + * @member {Object.} configOverrides + * @memberof google.cloud.metastore.v1beta.AuxiliaryVersionConfig + * @instance + */ + AuxiliaryVersionConfig.prototype.configOverrides = $util.emptyObject; - /** - * Encodes the specified HiveMetastoreVersion message. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. - * @function encode - * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - * @static - * @param {google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion} message HiveMetastoreVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HiveMetastoreVersion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDefault); - return writer; - }; + /** + * AuxiliaryVersionConfig networkConfig. + * @member {google.cloud.metastore.v1beta.INetworkConfig|null|undefined} networkConfig + * @memberof google.cloud.metastore.v1beta.AuxiliaryVersionConfig + * @instance + */ + AuxiliaryVersionConfig.prototype.networkConfig = null; - /** - * Encodes the specified HiveMetastoreVersion message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - * @static - * @param {google.cloud.metastore.v1alpha.LocationMetadata.IHiveMetastoreVersion} message HiveMetastoreVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HiveMetastoreVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new AuxiliaryVersionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1beta.AuxiliaryVersionConfig + * @static + * @param {google.cloud.metastore.v1beta.IAuxiliaryVersionConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.AuxiliaryVersionConfig} AuxiliaryVersionConfig instance + */ + AuxiliaryVersionConfig.create = function create(properties) { + return new AuxiliaryVersionConfig(properties); + }; - /** - * Decodes a HiveMetastoreVersion message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HiveMetastoreVersion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.isDefault = reader.bool(); - break; + /** + * Encodes the specified AuxiliaryVersionConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.AuxiliaryVersionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1beta.AuxiliaryVersionConfig + * @static + * @param {google.cloud.metastore.v1beta.IAuxiliaryVersionConfig} message AuxiliaryVersionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuxiliaryVersionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.configOverrides != null && Object.hasOwnProperty.call(message, "configOverrides")) + for (var keys = Object.keys(message.configOverrides), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.configOverrides[keys[i]]).ldelim(); + if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) + $root.google.cloud.metastore.v1beta.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuxiliaryVersionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.AuxiliaryVersionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1beta.AuxiliaryVersionConfig + * @static + * @param {google.cloud.metastore.v1beta.IAuxiliaryVersionConfig} message AuxiliaryVersionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuxiliaryVersionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1beta.AuxiliaryVersionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1beta.AuxiliaryVersionConfig} AuxiliaryVersionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuxiliaryVersionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.AuxiliaryVersionConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + if (message.configOverrides === $util.emptyObject) + message.configOverrides = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } - default: - reader.skipType(tag & 7); + message.configOverrides[key] = value; + break; + } + case 3: { + message.networkConfig = $root.google.cloud.metastore.v1beta.NetworkConfig.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a HiveMetastoreVersion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HiveMetastoreVersion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a HiveMetastoreVersion message. - * @function verify - * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HiveMetastoreVersion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.isDefault != null && message.hasOwnProperty("isDefault")) - if (typeof message.isDefault !== "boolean") - return "isDefault: boolean expected"; - return null; - }; + /** + * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1beta.AuxiliaryVersionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1beta.AuxiliaryVersionConfig} AuxiliaryVersionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuxiliaryVersionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a HiveMetastoreVersion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion - */ - HiveMetastoreVersion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) - return object; - var message = new $root.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion(); - if (object.version != null) - message.version = String(object.version); - if (object.isDefault != null) - message.isDefault = Boolean(object.isDefault); - return message; - }; + /** + * Verifies an AuxiliaryVersionConfig message. + * @function verify + * @memberof google.cloud.metastore.v1beta.AuxiliaryVersionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuxiliaryVersionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.configOverrides != null && message.hasOwnProperty("configOverrides")) { + if (!$util.isObject(message.configOverrides)) + return "configOverrides: object expected"; + var key = Object.keys(message.configOverrides); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.configOverrides[key[i]])) + return "configOverrides: string{k:string} expected"; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { + var error = $root.google.cloud.metastore.v1beta.NetworkConfig.verify(message.networkConfig); + if (error) + return "networkConfig." + error; + } + return null; + }; - /** - * Creates a plain object from a HiveMetastoreVersion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - * @static - * @param {google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion} message HiveMetastoreVersion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HiveMetastoreVersion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.isDefault = false; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.isDefault != null && message.hasOwnProperty("isDefault")) - object.isDefault = message.isDefault; + /** + * Creates an AuxiliaryVersionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1beta.AuxiliaryVersionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1beta.AuxiliaryVersionConfig} AuxiliaryVersionConfig + */ + AuxiliaryVersionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.AuxiliaryVersionConfig) return object; - }; - - /** - * Converts this HiveMetastoreVersion to JSON. - * @function toJSON - * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - * @instance - * @returns {Object.} JSON object - */ - HiveMetastoreVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + var message = new $root.google.cloud.metastore.v1beta.AuxiliaryVersionConfig(); + if (object.version != null) + message.version = String(object.version); + if (object.configOverrides) { + if (typeof object.configOverrides !== "object") + throw TypeError(".google.cloud.metastore.v1beta.AuxiliaryVersionConfig.configOverrides: object expected"); + message.configOverrides = {}; + for (var keys = Object.keys(object.configOverrides), i = 0; i < keys.length; ++i) + message.configOverrides[keys[i]] = String(object.configOverrides[keys[i]]); + } + if (object.networkConfig != null) { + if (typeof object.networkConfig !== "object") + throw TypeError(".google.cloud.metastore.v1beta.AuxiliaryVersionConfig.networkConfig: object expected"); + message.networkConfig = $root.google.cloud.metastore.v1beta.NetworkConfig.fromObject(object.networkConfig); + } + return message; + }; - /** - * Gets the default type url for HiveMetastoreVersion - * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HiveMetastoreVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion"; - }; + /** + * Creates a plain object from an AuxiliaryVersionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1beta.AuxiliaryVersionConfig + * @static + * @param {google.cloud.metastore.v1beta.AuxiliaryVersionConfig} message AuxiliaryVersionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuxiliaryVersionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.configOverrides = {}; + if (options.defaults) { + object.version = ""; + object.networkConfig = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + var keys2; + if (message.configOverrides && (keys2 = Object.keys(message.configOverrides)).length) { + object.configOverrides = {}; + for (var j = 0; j < keys2.length; ++j) + object.configOverrides[keys2[j]] = message.configOverrides[keys2[j]]; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) + object.networkConfig = $root.google.cloud.metastore.v1beta.NetworkConfig.toObject(message.networkConfig, options); + return object; + }; - return HiveMetastoreVersion; - })(); + /** + * Converts this AuxiliaryVersionConfig to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1beta.AuxiliaryVersionConfig + * @instance + * @returns {Object.} JSON object + */ + AuxiliaryVersionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return LocationMetadata; + /** + * Gets the default type url for AuxiliaryVersionConfig + * @function getTypeUrl + * @memberof google.cloud.metastore.v1beta.AuxiliaryVersionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuxiliaryVersionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1beta.AuxiliaryVersionConfig"; + }; + + return AuxiliaryVersionConfig; })(); - v1alpha.DatabaseDumpSpec = (function() { + v1beta.NetworkConfig = (function() { /** - * Properties of a DatabaseDumpSpec. - * @memberof google.cloud.metastore.v1alpha - * @interface IDatabaseDumpSpec + * Properties of a NetworkConfig. + * @memberof google.cloud.metastore.v1beta + * @interface INetworkConfig + * @property {Array.|null} [consumers] NetworkConfig consumers */ /** - * Constructs a new DatabaseDumpSpec. - * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a DatabaseDumpSpec. - * @implements IDatabaseDumpSpec + * Constructs a new NetworkConfig. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a NetworkConfig. + * @implements INetworkConfig * @constructor - * @param {google.cloud.metastore.v1alpha.IDatabaseDumpSpec=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.INetworkConfig=} [properties] Properties to set */ - function DatabaseDumpSpec(properties) { + function NetworkConfig(properties) { + this.consumers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22884,63 +33629,80 @@ } /** - * Creates a new DatabaseDumpSpec instance using the specified properties. + * NetworkConfig consumers. + * @member {Array.} consumers + * @memberof google.cloud.metastore.v1beta.NetworkConfig + * @instance + */ + NetworkConfig.prototype.consumers = $util.emptyArray; + + /** + * Creates a new NetworkConfig instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.NetworkConfig * @static - * @param {google.cloud.metastore.v1alpha.IDatabaseDumpSpec=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.DatabaseDumpSpec} DatabaseDumpSpec instance + * @param {google.cloud.metastore.v1beta.INetworkConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.NetworkConfig} NetworkConfig instance */ - DatabaseDumpSpec.create = function create(properties) { - return new DatabaseDumpSpec(properties); + NetworkConfig.create = function create(properties) { + return new NetworkConfig(properties); }; /** - * Encodes the specified DatabaseDumpSpec message. Does not implicitly {@link google.cloud.metastore.v1alpha.DatabaseDumpSpec.verify|verify} messages. + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.NetworkConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.NetworkConfig * @static - * @param {google.cloud.metastore.v1alpha.IDatabaseDumpSpec} message DatabaseDumpSpec message or plain object to encode + * @param {google.cloud.metastore.v1beta.INetworkConfig} message NetworkConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseDumpSpec.encode = function encode(message, writer) { + NetworkConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.consumers != null && message.consumers.length) + for (var i = 0; i < message.consumers.length; ++i) + $root.google.cloud.metastore.v1beta.NetworkConfig.Consumer.encode(message.consumers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified DatabaseDumpSpec message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.DatabaseDumpSpec.verify|verify} messages. + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.NetworkConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.NetworkConfig * @static - * @param {google.cloud.metastore.v1alpha.IDatabaseDumpSpec} message DatabaseDumpSpec message or plain object to encode + * @param {google.cloud.metastore.v1beta.INetworkConfig} message NetworkConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseDumpSpec.encodeDelimited = function encodeDelimited(message, writer) { + NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DatabaseDumpSpec message from the specified reader or buffer. + * Decodes a NetworkConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.NetworkConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1alpha.DatabaseDumpSpec} DatabaseDumpSpec + * @returns {google.cloud.metastore.v1beta.NetworkConfig} NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseDumpSpec.decode = function decode(reader, length) { + NetworkConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.NetworkConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + if (!(message.consumers && message.consumers.length)) + message.consumers = []; + message.consumers.push($root.google.cloud.metastore.v1beta.NetworkConfig.Consumer.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -22950,684 +33712,630 @@ }; /** - * Decodes a DatabaseDumpSpec message from the specified reader or buffer, length delimited. + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.NetworkConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.DatabaseDumpSpec} DatabaseDumpSpec + * @returns {google.cloud.metastore.v1beta.NetworkConfig} NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseDumpSpec.decodeDelimited = function decodeDelimited(reader) { + NetworkConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DatabaseDumpSpec message. + * Verifies a NetworkConfig message. * @function verify - * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.NetworkConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DatabaseDumpSpec.verify = function verify(message) { + NetworkConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.consumers != null && message.hasOwnProperty("consumers")) { + if (!Array.isArray(message.consumers)) + return "consumers: array expected"; + for (var i = 0; i < message.consumers.length; ++i) { + var error = $root.google.cloud.metastore.v1beta.NetworkConfig.Consumer.verify(message.consumers[i]); + if (error) + return "consumers." + error; + } + } return null; }; /** - * Creates a DatabaseDumpSpec message from a plain object. Also converts values to their respective internal types. + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.NetworkConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.DatabaseDumpSpec} DatabaseDumpSpec + * @returns {google.cloud.metastore.v1beta.NetworkConfig} NetworkConfig */ - DatabaseDumpSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec) + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.NetworkConfig) return object; - return new $root.google.cloud.metastore.v1alpha.DatabaseDumpSpec(); + var message = new $root.google.cloud.metastore.v1beta.NetworkConfig(); + if (object.consumers) { + if (!Array.isArray(object.consumers)) + throw TypeError(".google.cloud.metastore.v1beta.NetworkConfig.consumers: array expected"); + message.consumers = []; + for (var i = 0; i < object.consumers.length; ++i) { + if (typeof object.consumers[i] !== "object") + throw TypeError(".google.cloud.metastore.v1beta.NetworkConfig.consumers: object expected"); + message.consumers[i] = $root.google.cloud.metastore.v1beta.NetworkConfig.Consumer.fromObject(object.consumers[i]); + } + } + return message; }; /** - * Creates a plain object from a DatabaseDumpSpec message. Also converts values to other types if specified. + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.NetworkConfig * @static - * @param {google.cloud.metastore.v1alpha.DatabaseDumpSpec} message DatabaseDumpSpec + * @param {google.cloud.metastore.v1beta.NetworkConfig} message NetworkConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DatabaseDumpSpec.toObject = function toObject() { - return {}; + NetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.consumers = []; + if (message.consumers && message.consumers.length) { + object.consumers = []; + for (var j = 0; j < message.consumers.length; ++j) + object.consumers[j] = $root.google.cloud.metastore.v1beta.NetworkConfig.Consumer.toObject(message.consumers[j], options); + } + return object; }; /** - * Converts this DatabaseDumpSpec to JSON. + * Converts this NetworkConfig to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.NetworkConfig * @instance * @returns {Object.} JSON object */ - DatabaseDumpSpec.prototype.toJSON = function toJSON() { + NetworkConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DatabaseDumpSpec + * Gets the default type url for NetworkConfig * @function getTypeUrl - * @memberof google.cloud.metastore.v1alpha.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.NetworkConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DatabaseDumpSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1alpha.DatabaseDumpSpec"; - }; - - /** - * Type enum. - * @name google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} MYSQL=1 MYSQL value - * @property {number} AVRO=2 AVRO value - */ - DatabaseDumpSpec.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MYSQL"] = 1; - values[valuesById[2] = "AVRO"] = 2; - return values; - })(); - - return DatabaseDumpSpec; - })(); - - return v1alpha; - })(); - - metastore.v1beta = (function() { - - /** - * Namespace v1beta. - * @memberof google.cloud.metastore - * @namespace - */ - var v1beta = {}; - - v1beta.DataprocMetastore = (function() { - - /** - * Constructs a new DataprocMetastore service. - * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a DataprocMetastore - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function DataprocMetastore(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (DataprocMetastore.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataprocMetastore; - - /** - * Creates new DataprocMetastore service using the specified rpc implementation. - * @function create - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {DataprocMetastore} RPC service. Useful where requests and/or responses are streamed. - */ - DataprocMetastore.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + return typeUrlPrefix + "/google.cloud.metastore.v1beta.NetworkConfig"; }; - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|listServices}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef ListServicesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.metastore.v1beta.ListServicesResponse} [response] ListServicesResponse - */ - - /** - * Calls ListServices. - * @function listServices - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IListServicesRequest} request ListServicesRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.ListServicesCallback} callback Node-style callback called with the error, if any, and ListServicesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataprocMetastore.prototype.listServices = function listServices(request, callback) { - return this.rpcCall(listServices, $root.google.cloud.metastore.v1beta.ListServicesRequest, $root.google.cloud.metastore.v1beta.ListServicesResponse, request, callback); - }, "name", { value: "ListServices" }); - - /** - * Calls ListServices. - * @function listServices - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IListServicesRequest} request ListServicesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|getService}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef GetServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.metastore.v1beta.Service} [response] Service - */ - - /** - * Calls GetService. - * @function getService - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IGetServiceRequest} request GetServiceRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.GetServiceCallback} callback Node-style callback called with the error, if any, and Service - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataprocMetastore.prototype.getService = function getService(request, callback) { - return this.rpcCall(getService, $root.google.cloud.metastore.v1beta.GetServiceRequest, $root.google.cloud.metastore.v1beta.Service, request, callback); - }, "name", { value: "GetService" }); - - /** - * Calls GetService. - * @function getService - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IGetServiceRequest} request GetServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|createService}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef CreateServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateService. - * @function createService - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.ICreateServiceRequest} request CreateServiceRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.CreateServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataprocMetastore.prototype.createService = function createService(request, callback) { - return this.rpcCall(createService, $root.google.cloud.metastore.v1beta.CreateServiceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateService" }); - - /** - * Calls CreateService. - * @function createService - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.ICreateServiceRequest} request CreateServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|updateService}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef UpdateServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateService. - * @function updateService - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IUpdateServiceRequest} request UpdateServiceRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.UpdateServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataprocMetastore.prototype.updateService = function updateService(request, callback) { - return this.rpcCall(updateService, $root.google.cloud.metastore.v1beta.UpdateServiceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateService" }); + NetworkConfig.Consumer = (function() { - /** - * Calls UpdateService. - * @function updateService - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IUpdateServiceRequest} request UpdateServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Properties of a Consumer. + * @memberof google.cloud.metastore.v1beta.NetworkConfig + * @interface IConsumer + * @property {string|null} [subnetwork] Consumer subnetwork + * @property {string|null} [endpointUri] Consumer endpointUri + */ - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|deleteService}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef DeleteServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * Constructs a new Consumer. + * @memberof google.cloud.metastore.v1beta.NetworkConfig + * @classdesc Represents a Consumer. + * @implements IConsumer + * @constructor + * @param {google.cloud.metastore.v1beta.NetworkConfig.IConsumer=} [properties] Properties to set + */ + function Consumer(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Calls DeleteService. - * @function deleteService - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IDeleteServiceRequest} request DeleteServiceRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.DeleteServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataprocMetastore.prototype.deleteService = function deleteService(request, callback) { - return this.rpcCall(deleteService, $root.google.cloud.metastore.v1beta.DeleteServiceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteService" }); + /** + * Consumer subnetwork. + * @member {string|null|undefined} subnetwork + * @memberof google.cloud.metastore.v1beta.NetworkConfig.Consumer + * @instance + */ + Consumer.prototype.subnetwork = null; - /** - * Calls DeleteService. - * @function deleteService - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IDeleteServiceRequest} request DeleteServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Consumer endpointUri. + * @member {string} endpointUri + * @memberof google.cloud.metastore.v1beta.NetworkConfig.Consumer + * @instance + */ + Consumer.prototype.endpointUri = ""; - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|listMetadataImports}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef ListMetadataImportsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.metastore.v1beta.ListMetadataImportsResponse} [response] ListMetadataImportsResponse - */ + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Calls ListMetadataImports. - * @function listMetadataImports - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IListMetadataImportsRequest} request ListMetadataImportsRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImportsCallback} callback Node-style callback called with the error, if any, and ListMetadataImportsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataprocMetastore.prototype.listMetadataImports = function listMetadataImports(request, callback) { - return this.rpcCall(listMetadataImports, $root.google.cloud.metastore.v1beta.ListMetadataImportsRequest, $root.google.cloud.metastore.v1beta.ListMetadataImportsResponse, request, callback); - }, "name", { value: "ListMetadataImports" }); + /** + * Consumer vpcResource. + * @member {"subnetwork"|undefined} vpcResource + * @memberof google.cloud.metastore.v1beta.NetworkConfig.Consumer + * @instance + */ + Object.defineProperty(Consumer.prototype, "vpcResource", { + get: $util.oneOfGetter($oneOfFields = ["subnetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Calls ListMetadataImports. - * @function listMetadataImports - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IListMetadataImportsRequest} request ListMetadataImportsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a new Consumer instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1beta.NetworkConfig.Consumer + * @static + * @param {google.cloud.metastore.v1beta.NetworkConfig.IConsumer=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.NetworkConfig.Consumer} Consumer instance + */ + Consumer.create = function create(properties) { + return new Consumer(properties); + }; - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|getMetadataImport}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef GetMetadataImportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.metastore.v1beta.MetadataImport} [response] MetadataImport - */ + /** + * Encodes the specified Consumer message. Does not implicitly {@link google.cloud.metastore.v1beta.NetworkConfig.Consumer.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1beta.NetworkConfig.Consumer + * @static + * @param {google.cloud.metastore.v1beta.NetworkConfig.IConsumer} message Consumer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Consumer.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetwork); + if (message.endpointUri != null && Object.hasOwnProperty.call(message, "endpointUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.endpointUri); + return writer; + }; - /** - * Calls GetMetadataImport. - * @function getMetadataImport - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IGetMetadataImportRequest} request GetMetadataImportRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.GetMetadataImportCallback} callback Node-style callback called with the error, if any, and MetadataImport - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataprocMetastore.prototype.getMetadataImport = function getMetadataImport(request, callback) { - return this.rpcCall(getMetadataImport, $root.google.cloud.metastore.v1beta.GetMetadataImportRequest, $root.google.cloud.metastore.v1beta.MetadataImport, request, callback); - }, "name", { value: "GetMetadataImport" }); + /** + * Encodes the specified Consumer message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.NetworkConfig.Consumer.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1beta.NetworkConfig.Consumer + * @static + * @param {google.cloud.metastore.v1beta.NetworkConfig.IConsumer} message Consumer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Consumer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Calls GetMetadataImport. - * @function getMetadataImport - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IGetMetadataImportRequest} request GetMetadataImportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes a Consumer message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1beta.NetworkConfig.Consumer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1beta.NetworkConfig.Consumer} Consumer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Consumer.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.NetworkConfig.Consumer(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.subnetwork = reader.string(); + break; + } + case 3: { + message.endpointUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|createMetadataImport}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef CreateMetadataImportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * Decodes a Consumer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1beta.NetworkConfig.Consumer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1beta.NetworkConfig.Consumer} Consumer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Consumer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Calls CreateMetadataImport. - * @function createMetadataImport - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.ICreateMetadataImportRequest} request CreateMetadataImportRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.CreateMetadataImportCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataprocMetastore.prototype.createMetadataImport = function createMetadataImport(request, callback) { - return this.rpcCall(createMetadataImport, $root.google.cloud.metastore.v1beta.CreateMetadataImportRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateMetadataImport" }); + /** + * Verifies a Consumer message. + * @function verify + * @memberof google.cloud.metastore.v1beta.NetworkConfig.Consumer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Consumer.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + properties.vpcResource = 1; + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + } + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + if (!$util.isString(message.endpointUri)) + return "endpointUri: string expected"; + return null; + }; - /** - * Calls CreateMetadataImport. - * @function createMetadataImport - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.ICreateMetadataImportRequest} request CreateMetadataImportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a Consumer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1beta.NetworkConfig.Consumer + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1beta.NetworkConfig.Consumer} Consumer + */ + Consumer.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.NetworkConfig.Consumer) + return object; + var message = new $root.google.cloud.metastore.v1beta.NetworkConfig.Consumer(); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.endpointUri != null) + message.endpointUri = String(object.endpointUri); + return message; + }; - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|updateMetadataImport}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef UpdateMetadataImportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * Creates a plain object from a Consumer message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1beta.NetworkConfig.Consumer + * @static + * @param {google.cloud.metastore.v1beta.NetworkConfig.Consumer} message Consumer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Consumer.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.endpointUri = ""; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + object.subnetwork = message.subnetwork; + if (options.oneofs) + object.vpcResource = "subnetwork"; + } + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + object.endpointUri = message.endpointUri; + return object; + }; - /** - * Calls UpdateMetadataImport. - * @function updateMetadataImport - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IUpdateMetadataImportRequest} request UpdateMetadataImportRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.UpdateMetadataImportCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataprocMetastore.prototype.updateMetadataImport = function updateMetadataImport(request, callback) { - return this.rpcCall(updateMetadataImport, $root.google.cloud.metastore.v1beta.UpdateMetadataImportRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateMetadataImport" }); + /** + * Converts this Consumer to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1beta.NetworkConfig.Consumer + * @instance + * @returns {Object.} JSON object + */ + Consumer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls UpdateMetadataImport. - * @function updateMetadataImport - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IUpdateMetadataImportRequest} request UpdateMetadataImportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Gets the default type url for Consumer + * @function getTypeUrl + * @memberof google.cloud.metastore.v1beta.NetworkConfig.Consumer + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Consumer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1beta.NetworkConfig.Consumer"; + }; - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|exportMetadata}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef ExportMetadataCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + return Consumer; + })(); - /** - * Calls ExportMetadata. - * @function exportMetadata - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IExportMetadataRequest} request ExportMetadataRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.ExportMetadataCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataprocMetastore.prototype.exportMetadata = function exportMetadata(request, callback) { - return this.rpcCall(exportMetadata, $root.google.cloud.metastore.v1beta.ExportMetadataRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportMetadata" }); + return NetworkConfig; + })(); - /** - * Calls ExportMetadata. - * @function exportMetadata - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IExportMetadataRequest} request ExportMetadataRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + v1beta.TelemetryConfig = (function() { /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|restoreService}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef RestoreServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Properties of a TelemetryConfig. + * @memberof google.cloud.metastore.v1beta + * @interface ITelemetryConfig + * @property {google.cloud.metastore.v1beta.TelemetryConfig.LogFormat|null} [logFormat] TelemetryConfig logFormat */ /** - * Calls RestoreService. - * @function restoreService - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IRestoreServiceRequest} request RestoreServiceRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.RestoreServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Constructs a new TelemetryConfig. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a TelemetryConfig. + * @implements ITelemetryConfig + * @constructor + * @param {google.cloud.metastore.v1beta.ITelemetryConfig=} [properties] Properties to set */ - Object.defineProperty(DataprocMetastore.prototype.restoreService = function restoreService(request, callback) { - return this.rpcCall(restoreService, $root.google.cloud.metastore.v1beta.RestoreServiceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RestoreService" }); + function TelemetryConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls RestoreService. - * @function restoreService - * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * TelemetryConfig logFormat. + * @member {google.cloud.metastore.v1beta.TelemetryConfig.LogFormat} logFormat + * @memberof google.cloud.metastore.v1beta.TelemetryConfig * @instance - * @param {google.cloud.metastore.v1beta.IRestoreServiceRequest} request RestoreServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + TelemetryConfig.prototype.logFormat = 0; /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|listBackups}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef ListBackupsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.metastore.v1beta.ListBackupsResponse} [response] ListBackupsResponse + * Creates a new TelemetryConfig instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1beta.TelemetryConfig + * @static + * @param {google.cloud.metastore.v1beta.ITelemetryConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.TelemetryConfig} TelemetryConfig instance */ + TelemetryConfig.create = function create(properties) { + return new TelemetryConfig(properties); + }; /** - * Calls ListBackups. - * @function listBackups - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IListBackupsRequest} request ListBackupsRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.ListBackupsCallback} callback Node-style callback called with the error, if any, and ListBackupsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified TelemetryConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.TelemetryConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1beta.TelemetryConfig + * @static + * @param {google.cloud.metastore.v1beta.ITelemetryConfig} message TelemetryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataprocMetastore.prototype.listBackups = function listBackups(request, callback) { - return this.rpcCall(listBackups, $root.google.cloud.metastore.v1beta.ListBackupsRequest, $root.google.cloud.metastore.v1beta.ListBackupsResponse, request, callback); - }, "name", { value: "ListBackups" }); + TelemetryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logFormat != null && Object.hasOwnProperty.call(message, "logFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logFormat); + return writer; + }; /** - * Calls ListBackups. - * @function listBackups - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IListBackupsRequest} request ListBackupsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified TelemetryConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.TelemetryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1beta.TelemetryConfig + * @static + * @param {google.cloud.metastore.v1beta.ITelemetryConfig} message TelemetryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + TelemetryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|getBackup}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef GetBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.metastore.v1beta.Backup} [response] Backup + * Decodes a TelemetryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1beta.TelemetryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1beta.TelemetryConfig} TelemetryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + TelemetryConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.TelemetryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.logFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls GetBackup. - * @function getBackup - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IGetBackupRequest} request GetBackupRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.GetBackupCallback} callback Node-style callback called with the error, if any, and Backup - * @returns {undefined} - * @variation 1 + * Decodes a TelemetryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1beta.TelemetryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1beta.TelemetryConfig} TelemetryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DataprocMetastore.prototype.getBackup = function getBackup(request, callback) { - return this.rpcCall(getBackup, $root.google.cloud.metastore.v1beta.GetBackupRequest, $root.google.cloud.metastore.v1beta.Backup, request, callback); - }, "name", { value: "GetBackup" }); + TelemetryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetBackup. - * @function getBackup - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IGetBackupRequest} request GetBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a TelemetryConfig message. + * @function verify + * @memberof google.cloud.metastore.v1beta.TelemetryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + TelemetryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logFormat != null && message.hasOwnProperty("logFormat")) + switch (message.logFormat) { + default: + return "logFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|createBackup}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef CreateBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a TelemetryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1beta.TelemetryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1beta.TelemetryConfig} TelemetryConfig */ + TelemetryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.TelemetryConfig) + return object; + var message = new $root.google.cloud.metastore.v1beta.TelemetryConfig(); + switch (object.logFormat) { + default: + if (typeof object.logFormat === "number") { + message.logFormat = object.logFormat; + break; + } + break; + case "LOG_FORMAT_UNSPECIFIED": + case 0: + message.logFormat = 0; + break; + case "LEGACY": + case 1: + message.logFormat = 1; + break; + case "JSON": + case 2: + message.logFormat = 2; + break; + } + return message; + }; /** - * Calls CreateBackup. - * @function createBackup - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.ICreateBackupRequest} request CreateBackupRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.CreateBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Creates a plain object from a TelemetryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1beta.TelemetryConfig + * @static + * @param {google.cloud.metastore.v1beta.TelemetryConfig} message TelemetryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DataprocMetastore.prototype.createBackup = function createBackup(request, callback) { - return this.rpcCall(createBackup, $root.google.cloud.metastore.v1beta.CreateBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateBackup" }); + TelemetryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.logFormat = options.enums === String ? "LOG_FORMAT_UNSPECIFIED" : 0; + if (message.logFormat != null && message.hasOwnProperty("logFormat")) + object.logFormat = options.enums === String ? $root.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat[message.logFormat] === undefined ? message.logFormat : $root.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat[message.logFormat] : message.logFormat; + return object; + }; /** - * Calls CreateBackup. - * @function createBackup - * @memberof google.cloud.metastore.v1beta.DataprocMetastore + * Converts this TelemetryConfig to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1beta.TelemetryConfig * @instance - * @param {google.cloud.metastore.v1beta.ICreateBackupRequest} request CreateBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastore|deleteBackup}. - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @typedef DeleteBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * @returns {Object.} JSON object */ + TelemetryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls DeleteBackup. - * @function deleteBackup - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IDeleteBackupRequest} request DeleteBackupRequest message or plain object - * @param {google.cloud.metastore.v1beta.DataprocMetastore.DeleteBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Gets the default type url for TelemetryConfig + * @function getTypeUrl + * @memberof google.cloud.metastore.v1beta.TelemetryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Object.defineProperty(DataprocMetastore.prototype.deleteBackup = function deleteBackup(request, callback) { - return this.rpcCall(deleteBackup, $root.google.cloud.metastore.v1beta.DeleteBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackup" }); + TelemetryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1beta.TelemetryConfig"; + }; /** - * Calls DeleteBackup. - * @function deleteBackup - * @memberof google.cloud.metastore.v1beta.DataprocMetastore - * @instance - * @param {google.cloud.metastore.v1beta.IDeleteBackupRequest} request DeleteBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * LogFormat enum. + * @name google.cloud.metastore.v1beta.TelemetryConfig.LogFormat + * @enum {number} + * @property {number} LOG_FORMAT_UNSPECIFIED=0 LOG_FORMAT_UNSPECIFIED value + * @property {number} LEGACY=1 LEGACY value + * @property {number} JSON=2 JSON value */ + TelemetryConfig.LogFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "LEGACY"] = 1; + values[valuesById[2] = "JSON"] = 2; + return values; + })(); - return DataprocMetastore; + return TelemetryConfig; })(); - v1beta.Service = (function() { + v1beta.MetadataManagementActivity = (function() { - /** - * Properties of a Service. - * @memberof google.cloud.metastore.v1beta - * @interface IService - * @property {google.cloud.metastore.v1beta.IHiveMetastoreConfig|null} [hiveMetastoreConfig] Service hiveMetastoreConfig - * @property {string|null} [name] Service name - * @property {google.protobuf.ITimestamp|null} [createTime] Service createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Service updateTime - * @property {Object.|null} [labels] Service labels - * @property {string|null} [network] Service network - * @property {string|null} [endpointUri] Service endpointUri - * @property {number|null} [port] Service port - * @property {google.cloud.metastore.v1beta.Service.State|null} [state] Service state - * @property {string|null} [stateMessage] Service stateMessage - * @property {string|null} [artifactGcsUri] Service artifactGcsUri - * @property {google.cloud.metastore.v1beta.Service.Tier|null} [tier] Service tier - * @property {google.cloud.metastore.v1beta.IMetadataIntegration|null} [metadataIntegration] Service metadataIntegration - * @property {google.cloud.metastore.v1beta.IMaintenanceWindow|null} [maintenanceWindow] Service maintenanceWindow - * @property {string|null} [uid] Service uid - * @property {google.cloud.metastore.v1beta.IMetadataManagementActivity|null} [metadataManagementActivity] Service metadataManagementActivity - * @property {google.cloud.metastore.v1beta.Service.ReleaseChannel|null} [releaseChannel] Service releaseChannel + /** + * Properties of a MetadataManagementActivity. + * @memberof google.cloud.metastore.v1beta + * @interface IMetadataManagementActivity + * @property {Array.|null} [metadataExports] MetadataManagementActivity metadataExports + * @property {Array.|null} [restores] MetadataManagementActivity restores */ /** - * Constructs a new Service. + * Constructs a new MetadataManagementActivity. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a Service. - * @implements IService + * @classdesc Represents a MetadataManagementActivity. + * @implements IMetadataManagementActivity * @constructor - * @param {google.cloud.metastore.v1beta.IService=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IMetadataManagementActivity=} [properties] Properties to set */ - function Service(properties) { - this.labels = {}; + function MetadataManagementActivity(properties) { + this.metadataExports = []; + this.restores = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23635,333 +34343,445 @@ } /** - * Service hiveMetastoreConfig. - * @member {google.cloud.metastore.v1beta.IHiveMetastoreConfig|null|undefined} hiveMetastoreConfig - * @memberof google.cloud.metastore.v1beta.Service + * MetadataManagementActivity metadataExports. + * @member {Array.} metadataExports + * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity * @instance */ - Service.prototype.hiveMetastoreConfig = null; + MetadataManagementActivity.prototype.metadataExports = $util.emptyArray; /** - * Service name. - * @member {string} name - * @memberof google.cloud.metastore.v1beta.Service + * MetadataManagementActivity restores. + * @member {Array.} restores + * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity * @instance */ - Service.prototype.name = ""; + MetadataManagementActivity.prototype.restores = $util.emptyArray; /** - * Service createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.metastore.v1beta.Service - * @instance + * Creates a new MetadataManagementActivity instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @static + * @param {google.cloud.metastore.v1beta.IMetadataManagementActivity=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.MetadataManagementActivity} MetadataManagementActivity instance */ - Service.prototype.createTime = null; + MetadataManagementActivity.create = function create(properties) { + return new MetadataManagementActivity(properties); + }; /** - * Service updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.metastore.v1beta.Service - * @instance + * Encodes the specified MetadataManagementActivity message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataManagementActivity.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @static + * @param {google.cloud.metastore.v1beta.IMetadataManagementActivity} message MetadataManagementActivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Service.prototype.updateTime = null; + MetadataManagementActivity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadataExports != null && message.metadataExports.length) + for (var i = 0; i < message.metadataExports.length; ++i) + $root.google.cloud.metastore.v1beta.MetadataExport.encode(message.metadataExports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.restores != null && message.restores.length) + for (var i = 0; i < message.restores.length; ++i) + $root.google.cloud.metastore.v1beta.Restore.encode(message.restores[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * Service labels. - * @member {Object.} labels - * @memberof google.cloud.metastore.v1beta.Service - * @instance + * Encodes the specified MetadataManagementActivity message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataManagementActivity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @static + * @param {google.cloud.metastore.v1beta.IMetadataManagementActivity} message MetadataManagementActivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Service.prototype.labels = $util.emptyObject; + MetadataManagementActivity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Service network. - * @member {string} network - * @memberof google.cloud.metastore.v1beta.Service - * @instance + * Decodes a MetadataManagementActivity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1beta.MetadataManagementActivity} MetadataManagementActivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Service.prototype.network = ""; + MetadataManagementActivity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.MetadataManagementActivity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.metadataExports && message.metadataExports.length)) + message.metadataExports = []; + message.metadataExports.push($root.google.cloud.metastore.v1beta.MetadataExport.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.restores && message.restores.length)) + message.restores = []; + message.restores.push($root.google.cloud.metastore.v1beta.Restore.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Service endpointUri. - * @member {string} endpointUri - * @memberof google.cloud.metastore.v1beta.Service - * @instance + * Decodes a MetadataManagementActivity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1beta.MetadataManagementActivity} MetadataManagementActivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Service.prototype.endpointUri = ""; + MetadataManagementActivity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Service port. - * @member {number} port - * @memberof google.cloud.metastore.v1beta.Service - * @instance + * Verifies a MetadataManagementActivity message. + * @function verify + * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Service.prototype.port = 0; + MetadataManagementActivity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadataExports != null && message.hasOwnProperty("metadataExports")) { + if (!Array.isArray(message.metadataExports)) + return "metadataExports: array expected"; + for (var i = 0; i < message.metadataExports.length; ++i) { + var error = $root.google.cloud.metastore.v1beta.MetadataExport.verify(message.metadataExports[i]); + if (error) + return "metadataExports." + error; + } + } + if (message.restores != null && message.hasOwnProperty("restores")) { + if (!Array.isArray(message.restores)) + return "restores: array expected"; + for (var i = 0; i < message.restores.length; ++i) { + var error = $root.google.cloud.metastore.v1beta.Restore.verify(message.restores[i]); + if (error) + return "restores." + error; + } + } + return null; + }; /** - * Service state. - * @member {google.cloud.metastore.v1beta.Service.State} state - * @memberof google.cloud.metastore.v1beta.Service - * @instance + * Creates a MetadataManagementActivity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1beta.MetadataManagementActivity} MetadataManagementActivity */ - Service.prototype.state = 0; + MetadataManagementActivity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.MetadataManagementActivity) + return object; + var message = new $root.google.cloud.metastore.v1beta.MetadataManagementActivity(); + if (object.metadataExports) { + if (!Array.isArray(object.metadataExports)) + throw TypeError(".google.cloud.metastore.v1beta.MetadataManagementActivity.metadataExports: array expected"); + message.metadataExports = []; + for (var i = 0; i < object.metadataExports.length; ++i) { + if (typeof object.metadataExports[i] !== "object") + throw TypeError(".google.cloud.metastore.v1beta.MetadataManagementActivity.metadataExports: object expected"); + message.metadataExports[i] = $root.google.cloud.metastore.v1beta.MetadataExport.fromObject(object.metadataExports[i]); + } + } + if (object.restores) { + if (!Array.isArray(object.restores)) + throw TypeError(".google.cloud.metastore.v1beta.MetadataManagementActivity.restores: array expected"); + message.restores = []; + for (var i = 0; i < object.restores.length; ++i) { + if (typeof object.restores[i] !== "object") + throw TypeError(".google.cloud.metastore.v1beta.MetadataManagementActivity.restores: object expected"); + message.restores[i] = $root.google.cloud.metastore.v1beta.Restore.fromObject(object.restores[i]); + } + } + return message; + }; /** - * Service stateMessage. - * @member {string} stateMessage - * @memberof google.cloud.metastore.v1beta.Service + * Creates a plain object from a MetadataManagementActivity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @static + * @param {google.cloud.metastore.v1beta.MetadataManagementActivity} message MetadataManagementActivity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetadataManagementActivity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.metadataExports = []; + object.restores = []; + } + if (message.metadataExports && message.metadataExports.length) { + object.metadataExports = []; + for (var j = 0; j < message.metadataExports.length; ++j) + object.metadataExports[j] = $root.google.cloud.metastore.v1beta.MetadataExport.toObject(message.metadataExports[j], options); + } + if (message.restores && message.restores.length) { + object.restores = []; + for (var j = 0; j < message.restores.length; ++j) + object.restores[j] = $root.google.cloud.metastore.v1beta.Restore.toObject(message.restores[j], options); + } + return object; + }; + + /** + * Converts this MetadataManagementActivity to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity * @instance + * @returns {Object.} JSON object */ - Service.prototype.stateMessage = ""; + MetadataManagementActivity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Service artifactGcsUri. - * @member {string} artifactGcsUri - * @memberof google.cloud.metastore.v1beta.Service + * Gets the default type url for MetadataManagementActivity + * @function getTypeUrl + * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetadataManagementActivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1beta.MetadataManagementActivity"; + }; + + return MetadataManagementActivity; + })(); + + v1beta.MetadataImport = (function() { + + /** + * Properties of a MetadataImport. + * @memberof google.cloud.metastore.v1beta + * @interface IMetadataImport + * @property {google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump|null} [databaseDump] MetadataImport databaseDump + * @property {string|null} [name] MetadataImport name + * @property {string|null} [description] MetadataImport description + * @property {google.protobuf.ITimestamp|null} [createTime] MetadataImport createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] MetadataImport updateTime + * @property {google.protobuf.ITimestamp|null} [endTime] MetadataImport endTime + * @property {google.cloud.metastore.v1beta.MetadataImport.State|null} [state] MetadataImport state + */ + + /** + * Constructs a new MetadataImport. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a MetadataImport. + * @implements IMetadataImport + * @constructor + * @param {google.cloud.metastore.v1beta.IMetadataImport=} [properties] Properties to set + */ + function MetadataImport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetadataImport databaseDump. + * @member {google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump|null|undefined} databaseDump + * @memberof google.cloud.metastore.v1beta.MetadataImport * @instance */ - Service.prototype.artifactGcsUri = ""; + MetadataImport.prototype.databaseDump = null; /** - * Service tier. - * @member {google.cloud.metastore.v1beta.Service.Tier} tier - * @memberof google.cloud.metastore.v1beta.Service + * MetadataImport name. + * @member {string} name + * @memberof google.cloud.metastore.v1beta.MetadataImport * @instance */ - Service.prototype.tier = 0; + MetadataImport.prototype.name = ""; /** - * Service metadataIntegration. - * @member {google.cloud.metastore.v1beta.IMetadataIntegration|null|undefined} metadataIntegration - * @memberof google.cloud.metastore.v1beta.Service + * MetadataImport description. + * @member {string} description + * @memberof google.cloud.metastore.v1beta.MetadataImport * @instance */ - Service.prototype.metadataIntegration = null; + MetadataImport.prototype.description = ""; /** - * Service maintenanceWindow. - * @member {google.cloud.metastore.v1beta.IMaintenanceWindow|null|undefined} maintenanceWindow - * @memberof google.cloud.metastore.v1beta.Service + * MetadataImport createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.metastore.v1beta.MetadataImport * @instance */ - Service.prototype.maintenanceWindow = null; + MetadataImport.prototype.createTime = null; /** - * Service uid. - * @member {string} uid - * @memberof google.cloud.metastore.v1beta.Service + * MetadataImport updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.metastore.v1beta.MetadataImport * @instance */ - Service.prototype.uid = ""; + MetadataImport.prototype.updateTime = null; /** - * Service metadataManagementActivity. - * @member {google.cloud.metastore.v1beta.IMetadataManagementActivity|null|undefined} metadataManagementActivity - * @memberof google.cloud.metastore.v1beta.Service + * MetadataImport endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1beta.MetadataImport * @instance */ - Service.prototype.metadataManagementActivity = null; + MetadataImport.prototype.endTime = null; /** - * Service releaseChannel. - * @member {google.cloud.metastore.v1beta.Service.ReleaseChannel} releaseChannel - * @memberof google.cloud.metastore.v1beta.Service + * MetadataImport state. + * @member {google.cloud.metastore.v1beta.MetadataImport.State} state + * @memberof google.cloud.metastore.v1beta.MetadataImport * @instance */ - Service.prototype.releaseChannel = 0; + MetadataImport.prototype.state = 0; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * Service metastoreConfig. - * @member {"hiveMetastoreConfig"|undefined} metastoreConfig - * @memberof google.cloud.metastore.v1beta.Service + * MetadataImport metadata. + * @member {"databaseDump"|undefined} metadata + * @memberof google.cloud.metastore.v1beta.MetadataImport * @instance */ - Object.defineProperty(Service.prototype, "metastoreConfig", { - get: $util.oneOfGetter($oneOfFields = ["hiveMetastoreConfig"]), + Object.defineProperty(MetadataImport.prototype, "metadata", { + get: $util.oneOfGetter($oneOfFields = ["databaseDump"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Service instance using the specified properties. + * Creates a new MetadataImport instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.Service + * @memberof google.cloud.metastore.v1beta.MetadataImport * @static - * @param {google.cloud.metastore.v1beta.IService=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.Service} Service instance + * @param {google.cloud.metastore.v1beta.IMetadataImport=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.MetadataImport} MetadataImport instance */ - Service.create = function create(properties) { - return new Service(properties); + MetadataImport.create = function create(properties) { + return new MetadataImport(properties); }; /** - * Encodes the specified Service message. Does not implicitly {@link google.cloud.metastore.v1beta.Service.verify|verify} messages. + * Encodes the specified MetadataImport message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.Service + * @memberof google.cloud.metastore.v1beta.MetadataImport * @static - * @param {google.cloud.metastore.v1beta.IService} message Service message or plain object to encode + * @param {google.cloud.metastore.v1beta.IMetadataImport} message MetadataImport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Service.encode = function encode(message, writer) { + MetadataImport.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.hiveMetastoreConfig != null && Object.hasOwnProperty.call(message, "hiveMetastoreConfig")) - $root.google.cloud.metastore.v1beta.HiveMetastoreConfig.encode(message.hiveMetastoreConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.network); - if (message.endpointUri != null && Object.hasOwnProperty.call(message, "endpointUri")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.endpointUri); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.port); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); - if (message.stateMessage != null && Object.hasOwnProperty.call(message, "stateMessage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.stateMessage); - if (message.artifactGcsUri != null && Object.hasOwnProperty.call(message, "artifactGcsUri")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.artifactGcsUri); - if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.tier); - if (message.metadataIntegration != null && Object.hasOwnProperty.call(message, "metadataIntegration")) - $root.google.cloud.metastore.v1beta.MetadataIntegration.encode(message.metadataIntegration, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.maintenanceWindow != null && Object.hasOwnProperty.call(message, "maintenanceWindow")) - $root.google.cloud.metastore.v1beta.MaintenanceWindow.encode(message.maintenanceWindow, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.uid); - if (message.metadataManagementActivity != null && Object.hasOwnProperty.call(message, "metadataManagementActivity")) - $root.google.cloud.metastore.v1beta.MetadataManagementActivity.encode(message.metadataManagementActivity, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.releaseChannel); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.databaseDump != null && Object.hasOwnProperty.call(message, "databaseDump")) + $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.encode(message.databaseDump, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Service.verify|verify} messages. + * Encodes the specified MetadataImport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.Service + * @memberof google.cloud.metastore.v1beta.MetadataImport * @static - * @param {google.cloud.metastore.v1beta.IService} message Service message or plain object to encode + * @param {google.cloud.metastore.v1beta.IMetadataImport} message MetadataImport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Service.encodeDelimited = function encodeDelimited(message, writer) { + MetadataImport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Service message from the specified reader or buffer. + * Decodes a MetadataImport message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.Service + * @memberof google.cloud.metastore.v1beta.MetadataImport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.Service} Service + * @returns {google.cloud.metastore.v1beta.MetadataImport} MetadataImport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Service.decode = function decode(reader, length) { + MetadataImport.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.Service(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.MetadataImport(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: { - message.hiveMetastoreConfig = $root.google.cloud.metastore.v1beta.HiveMetastoreConfig.decode(reader, reader.uint32()); + case 6: { + message.databaseDump = $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.decode(reader, reader.uint32()); break; } case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 7: { - message.network = reader.string(); - break; - } - case 8: { - message.endpointUri = reader.string(); - break; - } - case 9: { - message.port = reader.int32(); - break; - } - case 10: { - message.state = reader.int32(); - break; - } - case 11: { - message.stateMessage = reader.string(); - break; - } - case 12: { - message.artifactGcsUri = reader.string(); - break; - } - case 13: { - message.tier = reader.int32(); + message.name = reader.string(); break; } - case 14: { - message.metadataIntegration = $root.google.cloud.metastore.v1beta.MetadataIntegration.decode(reader, reader.uint32()); + case 2: { + message.description = reader.string(); break; } - case 15: { - message.maintenanceWindow = $root.google.cloud.metastore.v1beta.MaintenanceWindow.decode(reader, reader.uint32()); + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 16: { - message.uid = reader.string(); + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 17: { - message.metadataManagementActivity = $root.google.cloud.metastore.v1beta.MetadataManagementActivity.decode(reader, reader.uint32()); + case 7: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 19: { - message.releaseChannel = reader.int32(); + case 5: { + message.state = reader.int32(); break; } default: @@ -23973,44 +34793,47 @@ }; /** - * Decodes a Service message from the specified reader or buffer, length delimited. + * Decodes a MetadataImport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.Service + * @memberof google.cloud.metastore.v1beta.MetadataImport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.Service} Service + * @returns {google.cloud.metastore.v1beta.MetadataImport} MetadataImport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Service.decodeDelimited = function decodeDelimited(reader) { + MetadataImport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Service message. + * Verifies a MetadataImport message. * @function verify - * @memberof google.cloud.metastore.v1beta.Service + * @memberof google.cloud.metastore.v1beta.MetadataImport * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Service.verify = function verify(message) { + MetadataImport.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.hiveMetastoreConfig != null && message.hasOwnProperty("hiveMetastoreConfig")) { - properties.metastoreConfig = 1; + if (message.databaseDump != null && message.hasOwnProperty("databaseDump")) { + properties.metadata = 1; { - var error = $root.google.cloud.metastore.v1beta.HiveMetastoreConfig.verify(message.hiveMetastoreConfig); + var error = $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.verify(message.databaseDump); if (error) - return "hiveMetastoreConfig." + error; + return "databaseDump." + error; } } if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) @@ -24021,23 +34844,11 @@ if (error) return "updateTime." + error; } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; } - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) - if (!$util.isString(message.endpointUri)) - return "endpointUri: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: @@ -24047,98 +34858,47 @@ case 2: case 3: case 4: - case 5: - case 6: - case 7: - break; - } - if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) - if (!$util.isString(message.stateMessage)) - return "stateMessage: string expected"; - if (message.artifactGcsUri != null && message.hasOwnProperty("artifactGcsUri")) - if (!$util.isString(message.artifactGcsUri)) - return "artifactGcsUri: string expected"; - if (message.tier != null && message.hasOwnProperty("tier")) - switch (message.tier) { - default: - return "tier: enum value expected"; - case 0: - case 1: - case 3: - break; - } - if (message.metadataIntegration != null && message.hasOwnProperty("metadataIntegration")) { - var error = $root.google.cloud.metastore.v1beta.MetadataIntegration.verify(message.metadataIntegration); - if (error) - return "metadataIntegration." + error; - } - if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) { - var error = $root.google.cloud.metastore.v1beta.MaintenanceWindow.verify(message.maintenanceWindow); - if (error) - return "maintenanceWindow." + error; - } - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.metadataManagementActivity != null && message.hasOwnProperty("metadataManagementActivity")) { - var error = $root.google.cloud.metastore.v1beta.MetadataManagementActivity.verify(message.metadataManagementActivity); - if (error) - return "metadataManagementActivity." + error; - } - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) - switch (message.releaseChannel) { - default: - return "releaseChannel: enum value expected"; - case 0: - case 1: - case 2: break; } return null; }; /** - * Creates a Service message from a plain object. Also converts values to their respective internal types. + * Creates a MetadataImport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.Service + * @memberof google.cloud.metastore.v1beta.MetadataImport * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.Service} Service + * @returns {google.cloud.metastore.v1beta.MetadataImport} MetadataImport */ - Service.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.Service) + MetadataImport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.MetadataImport) return object; - var message = new $root.google.cloud.metastore.v1beta.Service(); - if (object.hiveMetastoreConfig != null) { - if (typeof object.hiveMetastoreConfig !== "object") - throw TypeError(".google.cloud.metastore.v1beta.Service.hiveMetastoreConfig: object expected"); - message.hiveMetastoreConfig = $root.google.cloud.metastore.v1beta.HiveMetastoreConfig.fromObject(object.hiveMetastoreConfig); + var message = new $root.google.cloud.metastore.v1beta.MetadataImport(); + if (object.databaseDump != null) { + if (typeof object.databaseDump !== "object") + throw TypeError(".google.cloud.metastore.v1beta.MetadataImport.databaseDump: object expected"); + message.databaseDump = $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.fromObject(object.databaseDump); } if (object.name != null) message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.metastore.v1beta.Service.createTime: object expected"); + throw TypeError(".google.cloud.metastore.v1beta.MetadataImport.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } if (object.updateTime != null) { if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.metastore.v1beta.Service.updateTime: object expected"); + throw TypeError(".google.cloud.metastore.v1beta.MetadataImport.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.metastore.v1beta.Service.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.metastore.v1beta.MetadataImport.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } - if (object.network != null) - message.network = String(object.network); - if (object.endpointUri != null) - message.endpointUri = String(object.endpointUri); - if (object.port != null) - message.port = object.port | 0; switch (object.state) { default: if (typeof object.state === "number") { @@ -24150,280 +34910,468 @@ case 0: message.state = 0; break; - case "CREATING": + case "RUNNING": case 1: message.state = 1; break; - case "ACTIVE": + case "SUCCEEDED": case 2: message.state = 2; break; - case "SUSPENDING": + case "UPDATING": case 3: message.state = 3; break; - case "SUSPENDED": + case "FAILED": case 4: message.state = 4; break; - case "UPDATING": - case 5: - message.state = 5; - break; - case "DELETING": - case 6: - message.state = 6; - break; - case "ERROR": - case 7: - message.state = 7; - break; } - if (object.stateMessage != null) - message.stateMessage = String(object.stateMessage); - if (object.artifactGcsUri != null) - message.artifactGcsUri = String(object.artifactGcsUri); - switch (object.tier) { - default: - if (typeof object.tier === "number") { - message.tier = object.tier; - break; - } - break; - case "TIER_UNSPECIFIED": - case 0: - message.tier = 0; - break; - case "DEVELOPER": - case 1: - message.tier = 1; - break; - case "ENTERPRISE": - case 3: - message.tier = 3; - break; + return message; + }; + + /** + * Creates a plain object from a MetadataImport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1beta.MetadataImport + * @static + * @param {google.cloud.metastore.v1beta.MetadataImport} message MetadataImport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetadataImport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.endTime = null; } - if (object.metadataIntegration != null) { - if (typeof object.metadataIntegration !== "object") - throw TypeError(".google.cloud.metastore.v1beta.Service.metadataIntegration: object expected"); - message.metadataIntegration = $root.google.cloud.metastore.v1beta.MetadataIntegration.fromObject(object.metadataIntegration); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1beta.MetadataImport.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1beta.MetadataImport.State[message.state] : message.state; + if (message.databaseDump != null && message.hasOwnProperty("databaseDump")) { + object.databaseDump = $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.toObject(message.databaseDump, options); + if (options.oneofs) + object.metadata = "databaseDump"; } - if (object.maintenanceWindow != null) { - if (typeof object.maintenanceWindow !== "object") - throw TypeError(".google.cloud.metastore.v1beta.Service.maintenanceWindow: object expected"); - message.maintenanceWindow = $root.google.cloud.metastore.v1beta.MaintenanceWindow.fromObject(object.maintenanceWindow); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + return object; + }; + + /** + * Converts this MetadataImport to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1beta.MetadataImport + * @instance + * @returns {Object.} JSON object + */ + MetadataImport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetadataImport + * @function getTypeUrl + * @memberof google.cloud.metastore.v1beta.MetadataImport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetadataImport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (object.uid != null) - message.uid = String(object.uid); - if (object.metadataManagementActivity != null) { - if (typeof object.metadataManagementActivity !== "object") - throw TypeError(".google.cloud.metastore.v1beta.Service.metadataManagementActivity: object expected"); - message.metadataManagementActivity = $root.google.cloud.metastore.v1beta.MetadataManagementActivity.fromObject(object.metadataManagementActivity); + return typeUrlPrefix + "/google.cloud.metastore.v1beta.MetadataImport"; + }; + + MetadataImport.DatabaseDump = (function() { + + /** + * Properties of a DatabaseDump. + * @memberof google.cloud.metastore.v1beta.MetadataImport + * @interface IDatabaseDump + * @property {google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType|null} [databaseType] DatabaseDump databaseType + * @property {string|null} [gcsUri] DatabaseDump gcsUri + * @property {string|null} [sourceDatabase] DatabaseDump sourceDatabase + * @property {google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|null} [type] DatabaseDump type + */ + + /** + * Constructs a new DatabaseDump. + * @memberof google.cloud.metastore.v1beta.MetadataImport + * @classdesc Represents a DatabaseDump. + * @implements IDatabaseDump + * @constructor + * @param {google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump=} [properties] Properties to set + */ + function DatabaseDump(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - switch (object.releaseChannel) { - default: - if (typeof object.releaseChannel === "number") { - message.releaseChannel = object.releaseChannel; + + /** + * DatabaseDump databaseType. + * @member {google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType} databaseType + * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump + * @instance + */ + DatabaseDump.prototype.databaseType = 0; + + /** + * DatabaseDump gcsUri. + * @member {string} gcsUri + * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump + * @instance + */ + DatabaseDump.prototype.gcsUri = ""; + + /** + * DatabaseDump sourceDatabase. + * @member {string} sourceDatabase + * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump + * @instance + */ + DatabaseDump.prototype.sourceDatabase = ""; + + /** + * DatabaseDump type. + * @member {google.cloud.metastore.v1beta.DatabaseDumpSpec.Type} type + * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump + * @instance + */ + DatabaseDump.prototype.type = 0; + + /** + * Creates a new DatabaseDump instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump + * @static + * @param {google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.MetadataImport.DatabaseDump} DatabaseDump instance + */ + DatabaseDump.create = function create(properties) { + return new DatabaseDump(properties); + }; + + /** + * Encodes the specified DatabaseDump message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump + * @static + * @param {google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump} message DatabaseDump message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseDump.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.databaseType != null && Object.hasOwnProperty.call(message, "databaseType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.databaseType); + if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsUri); + if (message.sourceDatabase != null && Object.hasOwnProperty.call(message, "sourceDatabase")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceDatabase); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + return writer; + }; + + /** + * Encodes the specified DatabaseDump message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump + * @static + * @param {google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump} message DatabaseDump message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseDump.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseDump message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1beta.MetadataImport.DatabaseDump} DatabaseDump + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseDump.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.databaseType = reader.int32(); + break; + } + case 2: { + message.gcsUri = reader.string(); + break; + } + case 3: { + message.sourceDatabase = reader.string(); + break; + } + case 4: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseDump message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1beta.MetadataImport.DatabaseDump} DatabaseDump + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseDump.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseDump message. + * @function verify + * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseDump.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.databaseType != null && message.hasOwnProperty("databaseType")) + switch (message.databaseType) { + default: + return "databaseType: enum value expected"; + case 0: + case 1: + break; + } + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) + if (!$util.isString(message.gcsUri)) + return "gcsUri: string expected"; + if (message.sourceDatabase != null && message.hasOwnProperty("sourceDatabase")) + if (!$util.isString(message.sourceDatabase)) + return "sourceDatabase: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a DatabaseDump message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1beta.MetadataImport.DatabaseDump} DatabaseDump + */ + DatabaseDump.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) + return object; + var message = new $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump(); + switch (object.databaseType) { + default: + if (typeof object.databaseType === "number") { + message.databaseType = object.databaseType; + break; + } + break; + case "DATABASE_TYPE_UNSPECIFIED": + case 0: + message.databaseType = 0; + break; + case "MYSQL": + case 1: + message.databaseType = 1; + break; + } + if (object.gcsUri != null) + message.gcsUri = String(object.gcsUri); + if (object.sourceDatabase != null) + message.sourceDatabase = String(object.sourceDatabase); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "MYSQL": + case 1: + message.type = 1; + break; + case "AVRO": + case 2: + message.type = 2; break; } - break; - case "RELEASE_CHANNEL_UNSPECIFIED": - case 0: - message.releaseChannel = 0; - break; - case "CANARY": - case 1: - message.releaseChannel = 1; - break; - case "STABLE": - case 2: - message.releaseChannel = 2; - break; - } - return message; - }; + return message; + }; - /** - * Creates a plain object from a Service message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1beta.Service - * @static - * @param {google.cloud.metastore.v1beta.Service} message Service - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Service.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.network = ""; - object.endpointUri = ""; - object.port = 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.stateMessage = ""; - object.artifactGcsUri = ""; - object.tier = options.enums === String ? "TIER_UNSPECIFIED" : 0; - object.metadataIntegration = null; - object.maintenanceWindow = null; - object.uid = ""; - object.metadataManagementActivity = null; - object.releaseChannel = options.enums === String ? "RELEASE_CHANNEL_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.hiveMetastoreConfig != null && message.hasOwnProperty("hiveMetastoreConfig")) { - object.hiveMetastoreConfig = $root.google.cloud.metastore.v1beta.HiveMetastoreConfig.toObject(message.hiveMetastoreConfig, options); - if (options.oneofs) - object.metastoreConfig = "hiveMetastoreConfig"; - } - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) - object.endpointUri = message.endpointUri; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.metastore.v1beta.Service.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1beta.Service.State[message.state] : message.state; - if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) - object.stateMessage = message.stateMessage; - if (message.artifactGcsUri != null && message.hasOwnProperty("artifactGcsUri")) - object.artifactGcsUri = message.artifactGcsUri; - if (message.tier != null && message.hasOwnProperty("tier")) - object.tier = options.enums === String ? $root.google.cloud.metastore.v1beta.Service.Tier[message.tier] === undefined ? message.tier : $root.google.cloud.metastore.v1beta.Service.Tier[message.tier] : message.tier; - if (message.metadataIntegration != null && message.hasOwnProperty("metadataIntegration")) - object.metadataIntegration = $root.google.cloud.metastore.v1beta.MetadataIntegration.toObject(message.metadataIntegration, options); - if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) - object.maintenanceWindow = $root.google.cloud.metastore.v1beta.MaintenanceWindow.toObject(message.maintenanceWindow, options); - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.metadataManagementActivity != null && message.hasOwnProperty("metadataManagementActivity")) - object.metadataManagementActivity = $root.google.cloud.metastore.v1beta.MetadataManagementActivity.toObject(message.metadataManagementActivity, options); - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) - object.releaseChannel = options.enums === String ? $root.google.cloud.metastore.v1beta.Service.ReleaseChannel[message.releaseChannel] === undefined ? message.releaseChannel : $root.google.cloud.metastore.v1beta.Service.ReleaseChannel[message.releaseChannel] : message.releaseChannel; - return object; - }; + /** + * Creates a plain object from a DatabaseDump message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump + * @static + * @param {google.cloud.metastore.v1beta.MetadataImport.DatabaseDump} message DatabaseDump + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseDump.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.databaseType = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; + object.gcsUri = ""; + object.sourceDatabase = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.databaseType != null && message.hasOwnProperty("databaseType")) + object.databaseType = options.enums === String ? $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType[message.databaseType] === undefined ? message.databaseType : $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType[message.databaseType] : message.databaseType; + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) + object.gcsUri = message.gcsUri; + if (message.sourceDatabase != null && message.hasOwnProperty("sourceDatabase")) + object.sourceDatabase = message.sourceDatabase; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type[message.type] : message.type; + return object; + }; - /** - * Converts this Service to JSON. - * @function toJSON - * @memberof google.cloud.metastore.v1beta.Service - * @instance - * @returns {Object.} JSON object - */ - Service.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this DatabaseDump to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump + * @instance + * @returns {Object.} JSON object + */ + DatabaseDump.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for Service - * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.Service - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Service.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.Service"; - }; + /** + * Gets the default type url for DatabaseDump + * @function getTypeUrl + * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseDump.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1beta.MetadataImport.DatabaseDump"; + }; - /** - * State enum. - * @name google.cloud.metastore.v1beta.Service.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} SUSPENDING=3 SUSPENDING value - * @property {number} SUSPENDED=4 SUSPENDED value - * @property {number} UPDATING=5 UPDATING value - * @property {number} DELETING=6 DELETING value - * @property {number} ERROR=7 ERROR value - */ - Service.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "SUSPENDING"] = 3; - values[valuesById[4] = "SUSPENDED"] = 4; - values[valuesById[5] = "UPDATING"] = 5; - values[valuesById[6] = "DELETING"] = 6; - values[valuesById[7] = "ERROR"] = 7; - return values; - })(); + /** + * DatabaseType enum. + * @name google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType + * @enum {number} + * @property {number} DATABASE_TYPE_UNSPECIFIED=0 DATABASE_TYPE_UNSPECIFIED value + * @property {number} MYSQL=1 MYSQL value + */ + DatabaseDump.DatabaseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MYSQL"] = 1; + return values; + })(); - /** - * Tier enum. - * @name google.cloud.metastore.v1beta.Service.Tier - * @enum {number} - * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value - * @property {number} DEVELOPER=1 DEVELOPER value - * @property {number} ENTERPRISE=3 ENTERPRISE value - */ - Service.Tier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEVELOPER"] = 1; - values[valuesById[3] = "ENTERPRISE"] = 3; - return values; + return DatabaseDump; })(); /** - * ReleaseChannel enum. - * @name google.cloud.metastore.v1beta.Service.ReleaseChannel + * State enum. + * @name google.cloud.metastore.v1beta.MetadataImport.State * @enum {number} - * @property {number} RELEASE_CHANNEL_UNSPECIFIED=0 RELEASE_CHANNEL_UNSPECIFIED value - * @property {number} CANARY=1 CANARY value - * @property {number} STABLE=2 STABLE value + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} UPDATING=3 UPDATING value + * @property {number} FAILED=4 FAILED value */ - Service.ReleaseChannel = (function() { + MetadataImport.State = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RELEASE_CHANNEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "CANARY"] = 1; - values[valuesById[2] = "STABLE"] = 2; + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "FAILED"] = 4; return values; })(); - return Service; + return MetadataImport; })(); - v1beta.MetadataIntegration = (function() { + v1beta.MetadataExport = (function() { /** - * Properties of a MetadataIntegration. + * Properties of a MetadataExport. * @memberof google.cloud.metastore.v1beta - * @interface IMetadataIntegration - * @property {google.cloud.metastore.v1beta.IDataCatalogConfig|null} [dataCatalogConfig] MetadataIntegration dataCatalogConfig + * @interface IMetadataExport + * @property {string|null} [destinationGcsUri] MetadataExport destinationGcsUri + * @property {google.protobuf.ITimestamp|null} [startTime] MetadataExport startTime + * @property {google.protobuf.ITimestamp|null} [endTime] MetadataExport endTime + * @property {google.cloud.metastore.v1beta.MetadataExport.State|null} [state] MetadataExport state + * @property {google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|null} [databaseDumpType] MetadataExport databaseDumpType */ /** - * Constructs a new MetadataIntegration. + * Constructs a new MetadataExport. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a MetadataIntegration. - * @implements IMetadataIntegration + * @classdesc Represents a MetadataExport. + * @implements IMetadataExport * @constructor - * @param {google.cloud.metastore.v1beta.IMetadataIntegration=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IMetadataExport=} [properties] Properties to set */ - function MetadataIntegration(properties) { + function MetadataExport(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24431,75 +35379,145 @@ } /** - * MetadataIntegration dataCatalogConfig. - * @member {google.cloud.metastore.v1beta.IDataCatalogConfig|null|undefined} dataCatalogConfig - * @memberof google.cloud.metastore.v1beta.MetadataIntegration + * MetadataExport destinationGcsUri. + * @member {string|null|undefined} destinationGcsUri + * @memberof google.cloud.metastore.v1beta.MetadataExport * @instance */ - MetadataIntegration.prototype.dataCatalogConfig = null; + MetadataExport.prototype.destinationGcsUri = null; /** - * Creates a new MetadataIntegration instance using the specified properties. + * MetadataExport startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.metastore.v1beta.MetadataExport + * @instance + */ + MetadataExport.prototype.startTime = null; + + /** + * MetadataExport endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1beta.MetadataExport + * @instance + */ + MetadataExport.prototype.endTime = null; + + /** + * MetadataExport state. + * @member {google.cloud.metastore.v1beta.MetadataExport.State} state + * @memberof google.cloud.metastore.v1beta.MetadataExport + * @instance + */ + MetadataExport.prototype.state = 0; + + /** + * MetadataExport databaseDumpType. + * @member {google.cloud.metastore.v1beta.DatabaseDumpSpec.Type} databaseDumpType + * @memberof google.cloud.metastore.v1beta.MetadataExport + * @instance + */ + MetadataExport.prototype.databaseDumpType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MetadataExport destination. + * @member {"destinationGcsUri"|undefined} destination + * @memberof google.cloud.metastore.v1beta.MetadataExport + * @instance + */ + Object.defineProperty(MetadataExport.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["destinationGcsUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MetadataExport instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.MetadataIntegration + * @memberof google.cloud.metastore.v1beta.MetadataExport * @static - * @param {google.cloud.metastore.v1beta.IMetadataIntegration=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.MetadataIntegration} MetadataIntegration instance + * @param {google.cloud.metastore.v1beta.IMetadataExport=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.MetadataExport} MetadataExport instance */ - MetadataIntegration.create = function create(properties) { - return new MetadataIntegration(properties); + MetadataExport.create = function create(properties) { + return new MetadataExport(properties); }; /** - * Encodes the specified MetadataIntegration message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataIntegration.verify|verify} messages. + * Encodes the specified MetadataExport message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataExport.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.MetadataIntegration + * @memberof google.cloud.metastore.v1beta.MetadataExport * @static - * @param {google.cloud.metastore.v1beta.IMetadataIntegration} message MetadataIntegration message or plain object to encode + * @param {google.cloud.metastore.v1beta.IMetadataExport} message MetadataExport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataIntegration.encode = function encode(message, writer) { + MetadataExport.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataCatalogConfig != null && Object.hasOwnProperty.call(message, "dataCatalogConfig")) - $root.google.cloud.metastore.v1beta.DataCatalogConfig.encode(message.dataCatalogConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.destinationGcsUri != null && Object.hasOwnProperty.call(message, "destinationGcsUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationGcsUri); + if (message.databaseDumpType != null && Object.hasOwnProperty.call(message, "databaseDumpType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.databaseDumpType); return writer; }; /** - * Encodes the specified MetadataIntegration message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataIntegration.verify|verify} messages. + * Encodes the specified MetadataExport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataExport.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.MetadataIntegration + * @memberof google.cloud.metastore.v1beta.MetadataExport * @static - * @param {google.cloud.metastore.v1beta.IMetadataIntegration} message MetadataIntegration message or plain object to encode + * @param {google.cloud.metastore.v1beta.IMetadataExport} message MetadataExport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataIntegration.encodeDelimited = function encodeDelimited(message, writer) { + MetadataExport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetadataIntegration message from the specified reader or buffer. + * Decodes a MetadataExport message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.MetadataIntegration + * @memberof google.cloud.metastore.v1beta.MetadataExport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.MetadataIntegration} MetadataIntegration + * @returns {google.cloud.metastore.v1beta.MetadataExport} MetadataExport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataIntegration.decode = function decode(reader, length) { + MetadataExport.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.MetadataIntegration(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.MetadataExport(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: { + message.destinationGcsUri = reader.string(); + break; + } case 1: { - message.dataCatalogConfig = $root.google.cloud.metastore.v1beta.DataCatalogConfig.decode(reader, reader.uint32()); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 5: { + message.databaseDumpType = reader.int32(); break; } default: @@ -24511,127 +35529,255 @@ }; /** - * Decodes a MetadataIntegration message from the specified reader or buffer, length delimited. + * Decodes a MetadataExport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.MetadataIntegration + * @memberof google.cloud.metastore.v1beta.MetadataExport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.MetadataIntegration} MetadataIntegration + * @returns {google.cloud.metastore.v1beta.MetadataExport} MetadataExport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataIntegration.decodeDelimited = function decodeDelimited(reader) { + MetadataExport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetadataIntegration message. + * Verifies a MetadataExport message. * @function verify - * @memberof google.cloud.metastore.v1beta.MetadataIntegration + * @memberof google.cloud.metastore.v1beta.MetadataExport * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetadataIntegration.verify = function verify(message) { + MetadataExport.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataCatalogConfig != null && message.hasOwnProperty("dataCatalogConfig")) { - var error = $root.google.cloud.metastore.v1beta.DataCatalogConfig.verify(message.dataCatalogConfig); + var properties = {}; + if (message.destinationGcsUri != null && message.hasOwnProperty("destinationGcsUri")) { + properties.destination = 1; + if (!$util.isString(message.destinationGcsUri)) + return "destinationGcsUri: string expected"; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); if (error) - return "dataCatalogConfig." + error; + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) + switch (message.databaseDumpType) { + default: + return "databaseDumpType: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a MetadataIntegration message from a plain object. Also converts values to their respective internal types. + * Creates a MetadataExport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.MetadataIntegration + * @memberof google.cloud.metastore.v1beta.MetadataExport * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.MetadataIntegration} MetadataIntegration + * @returns {google.cloud.metastore.v1beta.MetadataExport} MetadataExport */ - MetadataIntegration.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.MetadataIntegration) + MetadataExport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.MetadataExport) return object; - var message = new $root.google.cloud.metastore.v1beta.MetadataIntegration(); - if (object.dataCatalogConfig != null) { - if (typeof object.dataCatalogConfig !== "object") - throw TypeError(".google.cloud.metastore.v1beta.MetadataIntegration.dataCatalogConfig: object expected"); - message.dataCatalogConfig = $root.google.cloud.metastore.v1beta.DataCatalogConfig.fromObject(object.dataCatalogConfig); + var message = new $root.google.cloud.metastore.v1beta.MetadataExport(); + if (object.destinationGcsUri != null) + message.destinationGcsUri = String(object.destinationGcsUri); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.metastore.v1beta.MetadataExport.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.metastore.v1beta.MetadataExport.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + case "CANCELLED": + case 4: + message.state = 4; + break; + } + switch (object.databaseDumpType) { + default: + if (typeof object.databaseDumpType === "number") { + message.databaseDumpType = object.databaseDumpType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.databaseDumpType = 0; + break; + case "MYSQL": + case 1: + message.databaseDumpType = 1; + break; + case "AVRO": + case 2: + message.databaseDumpType = 2; + break; } return message; }; /** - * Creates a plain object from a MetadataIntegration message. Also converts values to other types if specified. + * Creates a plain object from a MetadataExport message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.MetadataIntegration + * @memberof google.cloud.metastore.v1beta.MetadataExport * @static - * @param {google.cloud.metastore.v1beta.MetadataIntegration} message MetadataIntegration + * @param {google.cloud.metastore.v1beta.MetadataExport} message MetadataExport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetadataIntegration.toObject = function toObject(message, options) { + MetadataExport.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.dataCatalogConfig = null; - if (message.dataCatalogConfig != null && message.hasOwnProperty("dataCatalogConfig")) - object.dataCatalogConfig = $root.google.cloud.metastore.v1beta.DataCatalogConfig.toObject(message.dataCatalogConfig, options); + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.databaseDumpType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1beta.MetadataExport.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1beta.MetadataExport.State[message.state] : message.state; + if (message.destinationGcsUri != null && message.hasOwnProperty("destinationGcsUri")) { + object.destinationGcsUri = message.destinationGcsUri; + if (options.oneofs) + object.destination = "destinationGcsUri"; + } + if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) + object.databaseDumpType = options.enums === String ? $root.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type[message.databaseDumpType] === undefined ? message.databaseDumpType : $root.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type[message.databaseDumpType] : message.databaseDumpType; return object; }; /** - * Converts this MetadataIntegration to JSON. + * Converts this MetadataExport to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.MetadataIntegration + * @memberof google.cloud.metastore.v1beta.MetadataExport * @instance * @returns {Object.} JSON object */ - MetadataIntegration.prototype.toJSON = function toJSON() { + MetadataExport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetadataIntegration + * Gets the default type url for MetadataExport * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.MetadataIntegration + * @memberof google.cloud.metastore.v1beta.MetadataExport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetadataIntegration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MetadataExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.MetadataIntegration"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.MetadataExport"; }; - return MetadataIntegration; + /** + * State enum. + * @name google.cloud.metastore.v1beta.MetadataExport.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} CANCELLED=4 CANCELLED value + */ + MetadataExport.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "CANCELLED"] = 4; + return values; + })(); + + return MetadataExport; })(); - v1beta.DataCatalogConfig = (function() { + v1beta.Backup = (function() { /** - * Properties of a DataCatalogConfig. + * Properties of a Backup. * @memberof google.cloud.metastore.v1beta - * @interface IDataCatalogConfig - * @property {boolean|null} [enabled] DataCatalogConfig enabled + * @interface IBackup + * @property {string|null} [name] Backup name + * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime + * @property {google.protobuf.ITimestamp|null} [endTime] Backup endTime + * @property {google.cloud.metastore.v1beta.Backup.State|null} [state] Backup state + * @property {google.cloud.metastore.v1beta.IService|null} [serviceRevision] Backup serviceRevision + * @property {string|null} [description] Backup description + * @property {Array.|null} [restoringServices] Backup restoringServices */ /** - * Constructs a new DataCatalogConfig. + * Constructs a new Backup. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a DataCatalogConfig. - * @implements IDataCatalogConfig + * @classdesc Represents a Backup. + * @implements IBackup * @constructor - * @param {google.cloud.metastore.v1beta.IDataCatalogConfig=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IBackup=} [properties] Properties to set */ - function DataCatalogConfig(properties) { + function Backup(properties) { + this.restoringServices = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24639,75 +35785,162 @@ } /** - * DataCatalogConfig enabled. - * @member {boolean} enabled - * @memberof google.cloud.metastore.v1beta.DataCatalogConfig + * Backup name. + * @member {string} name + * @memberof google.cloud.metastore.v1beta.Backup * @instance */ - DataCatalogConfig.prototype.enabled = false; + Backup.prototype.name = ""; /** - * Creates a new DataCatalogConfig instance using the specified properties. + * Backup createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.metastore.v1beta.Backup + * @instance + */ + Backup.prototype.createTime = null; + + /** + * Backup endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1beta.Backup + * @instance + */ + Backup.prototype.endTime = null; + + /** + * Backup state. + * @member {google.cloud.metastore.v1beta.Backup.State} state + * @memberof google.cloud.metastore.v1beta.Backup + * @instance + */ + Backup.prototype.state = 0; + + /** + * Backup serviceRevision. + * @member {google.cloud.metastore.v1beta.IService|null|undefined} serviceRevision + * @memberof google.cloud.metastore.v1beta.Backup + * @instance + */ + Backup.prototype.serviceRevision = null; + + /** + * Backup description. + * @member {string} description + * @memberof google.cloud.metastore.v1beta.Backup + * @instance + */ + Backup.prototype.description = ""; + + /** + * Backup restoringServices. + * @member {Array.} restoringServices + * @memberof google.cloud.metastore.v1beta.Backup + * @instance + */ + Backup.prototype.restoringServices = $util.emptyArray; + + /** + * Creates a new Backup instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.DataCatalogConfig + * @memberof google.cloud.metastore.v1beta.Backup * @static - * @param {google.cloud.metastore.v1beta.IDataCatalogConfig=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.DataCatalogConfig} DataCatalogConfig instance + * @param {google.cloud.metastore.v1beta.IBackup=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.Backup} Backup instance */ - DataCatalogConfig.create = function create(properties) { - return new DataCatalogConfig(properties); + Backup.create = function create(properties) { + return new Backup(properties); }; /** - * Encodes the specified DataCatalogConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.DataCatalogConfig.verify|verify} messages. + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.metastore.v1beta.Backup.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.DataCatalogConfig + * @memberof google.cloud.metastore.v1beta.Backup * @static - * @param {google.cloud.metastore.v1beta.IDataCatalogConfig} message DataCatalogConfig message or plain object to encode + * @param {google.cloud.metastore.v1beta.IBackup} message Backup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataCatalogConfig.encode = function encode(message, writer) { + Backup.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.serviceRevision != null && Object.hasOwnProperty.call(message, "serviceRevision")) + $root.google.cloud.metastore.v1beta.Service.encode(message.serviceRevision, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.restoringServices != null && message.restoringServices.length) + for (var i = 0; i < message.restoringServices.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.restoringServices[i]); return writer; }; /** - * Encodes the specified DataCatalogConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DataCatalogConfig.verify|verify} messages. + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Backup.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.DataCatalogConfig + * @memberof google.cloud.metastore.v1beta.Backup * @static - * @param {google.cloud.metastore.v1beta.IDataCatalogConfig} message DataCatalogConfig message or plain object to encode + * @param {google.cloud.metastore.v1beta.IBackup} message Backup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataCatalogConfig.encodeDelimited = function encodeDelimited(message, writer) { + Backup.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataCatalogConfig message from the specified reader or buffer. + * Decodes a Backup message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.DataCatalogConfig + * @memberof google.cloud.metastore.v1beta.Backup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.DataCatalogConfig} DataCatalogConfig + * @returns {google.cloud.metastore.v1beta.Backup} Backup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataCatalogConfig.decode = function decode(reader, length) { + Backup.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.DataCatalogConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.Backup(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } case 2: { - message.enabled = reader.bool(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.serviceRevision = $root.google.cloud.metastore.v1beta.Service.decode(reader, reader.uint32()); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + if (!(message.restoringServices && message.restoringServices.length)) + message.restoringServices = []; + message.restoringServices.push(reader.string()); break; } default: @@ -24719,213 +35952,411 @@ }; /** - * Decodes a DataCatalogConfig message from the specified reader or buffer, length delimited. + * Decodes a Backup message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.DataCatalogConfig + * @memberof google.cloud.metastore.v1beta.Backup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.DataCatalogConfig} DataCatalogConfig + * @returns {google.cloud.metastore.v1beta.Backup} Backup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataCatalogConfig.decodeDelimited = function decodeDelimited(reader) { + Backup.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataCatalogConfig message. + * Verifies a Backup message. * @function verify - * @memberof google.cloud.metastore.v1beta.DataCatalogConfig + * @memberof google.cloud.metastore.v1beta.Backup * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataCatalogConfig.verify = function verify(message) { + Backup.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.serviceRevision != null && message.hasOwnProperty("serviceRevision")) { + var error = $root.google.cloud.metastore.v1beta.Service.verify(message.serviceRevision); + if (error) + return "serviceRevision." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.restoringServices != null && message.hasOwnProperty("restoringServices")) { + if (!Array.isArray(message.restoringServices)) + return "restoringServices: array expected"; + for (var i = 0; i < message.restoringServices.length; ++i) + if (!$util.isString(message.restoringServices[i])) + return "restoringServices: string[] expected"; + } return null; }; /** - * Creates a DataCatalogConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Backup message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.DataCatalogConfig + * @memberof google.cloud.metastore.v1beta.Backup * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.DataCatalogConfig} DataCatalogConfig + * @returns {google.cloud.metastore.v1beta.Backup} Backup */ - DataCatalogConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.DataCatalogConfig) + Backup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.Backup) return object; - var message = new $root.google.cloud.metastore.v1beta.DataCatalogConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); + var message = new $root.google.cloud.metastore.v1beta.Backup(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Backup.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Backup.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "DELETING": + case 2: + message.state = 2; + break; + case "ACTIVE": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "RESTORING": + case 5: + message.state = 5; + break; + } + if (object.serviceRevision != null) { + if (typeof object.serviceRevision !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Backup.serviceRevision: object expected"); + message.serviceRevision = $root.google.cloud.metastore.v1beta.Service.fromObject(object.serviceRevision); + } + if (object.description != null) + message.description = String(object.description); + if (object.restoringServices) { + if (!Array.isArray(object.restoringServices)) + throw TypeError(".google.cloud.metastore.v1beta.Backup.restoringServices: array expected"); + message.restoringServices = []; + for (var i = 0; i < object.restoringServices.length; ++i) + message.restoringServices[i] = String(object.restoringServices[i]); + } return message; }; /** - * Creates a plain object from a DataCatalogConfig message. Also converts values to other types if specified. + * Creates a plain object from a Backup message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.DataCatalogConfig + * @memberof google.cloud.metastore.v1beta.Backup * @static - * @param {google.cloud.metastore.v1beta.DataCatalogConfig} message DataCatalogConfig + * @param {google.cloud.metastore.v1beta.Backup} message Backup * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataCatalogConfig.toObject = function toObject(message, options) { + Backup.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; + if (options.arrays || options.defaults) + object.restoringServices = []; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.serviceRevision = null; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1beta.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1beta.Backup.State[message.state] : message.state; + if (message.serviceRevision != null && message.hasOwnProperty("serviceRevision")) + object.serviceRevision = $root.google.cloud.metastore.v1beta.Service.toObject(message.serviceRevision, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.restoringServices && message.restoringServices.length) { + object.restoringServices = []; + for (var j = 0; j < message.restoringServices.length; ++j) + object.restoringServices[j] = message.restoringServices[j]; + } return object; }; /** - * Converts this DataCatalogConfig to JSON. + * Converts this Backup to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.DataCatalogConfig + * @memberof google.cloud.metastore.v1beta.Backup * @instance * @returns {Object.} JSON object */ - DataCatalogConfig.prototype.toJSON = function toJSON() { + Backup.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataCatalogConfig + * Gets the default type url for Backup * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.DataCatalogConfig + * @memberof google.cloud.metastore.v1beta.Backup * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataCatalogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.DataCatalogConfig"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.Backup"; }; - return DataCatalogConfig; + /** + * State enum. + * @name google.cloud.metastore.v1beta.Backup.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} DELETING=2 DELETING value + * @property {number} ACTIVE=3 ACTIVE value + * @property {number} FAILED=4 FAILED value + * @property {number} RESTORING=5 RESTORING value + */ + Backup.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "DELETING"] = 2; + values[valuesById[3] = "ACTIVE"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "RESTORING"] = 5; + return values; + })(); + + return Backup; })(); - v1beta.MaintenanceWindow = (function() { + v1beta.Restore = (function() { /** - * Properties of a MaintenanceWindow. + * Properties of a Restore. * @memberof google.cloud.metastore.v1beta - * @interface IMaintenanceWindow - * @property {google.protobuf.IInt32Value|null} [hourOfDay] MaintenanceWindow hourOfDay - * @property {google.type.DayOfWeek|null} [dayOfWeek] MaintenanceWindow dayOfWeek + * @interface IRestore + * @property {google.protobuf.ITimestamp|null} [startTime] Restore startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Restore endTime + * @property {google.cloud.metastore.v1beta.Restore.State|null} [state] Restore state + * @property {string|null} [backup] Restore backup + * @property {google.cloud.metastore.v1beta.Restore.RestoreType|null} [type] Restore type + * @property {string|null} [details] Restore details */ /** - * Constructs a new MaintenanceWindow. + * Constructs a new Restore. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a MaintenanceWindow. - * @implements IMaintenanceWindow + * @classdesc Represents a Restore. + * @implements IRestore * @constructor - * @param {google.cloud.metastore.v1beta.IMaintenanceWindow=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IRestore=} [properties] Properties to set + */ + function Restore(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Restore startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.metastore.v1beta.Restore + * @instance + */ + Restore.prototype.startTime = null; + + /** + * Restore endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1beta.Restore + * @instance + */ + Restore.prototype.endTime = null; + + /** + * Restore state. + * @member {google.cloud.metastore.v1beta.Restore.State} state + * @memberof google.cloud.metastore.v1beta.Restore + * @instance + */ + Restore.prototype.state = 0; + + /** + * Restore backup. + * @member {string} backup + * @memberof google.cloud.metastore.v1beta.Restore + * @instance */ - function MaintenanceWindow(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Restore.prototype.backup = ""; /** - * MaintenanceWindow hourOfDay. - * @member {google.protobuf.IInt32Value|null|undefined} hourOfDay - * @memberof google.cloud.metastore.v1beta.MaintenanceWindow + * Restore type. + * @member {google.cloud.metastore.v1beta.Restore.RestoreType} type + * @memberof google.cloud.metastore.v1beta.Restore * @instance */ - MaintenanceWindow.prototype.hourOfDay = null; + Restore.prototype.type = 0; /** - * MaintenanceWindow dayOfWeek. - * @member {google.type.DayOfWeek} dayOfWeek - * @memberof google.cloud.metastore.v1beta.MaintenanceWindow + * Restore details. + * @member {string} details + * @memberof google.cloud.metastore.v1beta.Restore * @instance */ - MaintenanceWindow.prototype.dayOfWeek = 0; + Restore.prototype.details = ""; /** - * Creates a new MaintenanceWindow instance using the specified properties. + * Creates a new Restore instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.MaintenanceWindow + * @memberof google.cloud.metastore.v1beta.Restore * @static - * @param {google.cloud.metastore.v1beta.IMaintenanceWindow=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.MaintenanceWindow} MaintenanceWindow instance + * @param {google.cloud.metastore.v1beta.IRestore=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.Restore} Restore instance */ - MaintenanceWindow.create = function create(properties) { - return new MaintenanceWindow(properties); + Restore.create = function create(properties) { + return new Restore(properties); }; /** - * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.metastore.v1beta.MaintenanceWindow.verify|verify} messages. + * Encodes the specified Restore message. Does not implicitly {@link google.cloud.metastore.v1beta.Restore.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.MaintenanceWindow + * @memberof google.cloud.metastore.v1beta.Restore * @static - * @param {google.cloud.metastore.v1beta.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {google.cloud.metastore.v1beta.IRestore} message Restore message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MaintenanceWindow.encode = function encode(message, writer) { + Restore.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.hourOfDay != null && Object.hasOwnProperty.call(message, "hourOfDay")) - $root.google.protobuf.Int32Value.encode(message.hourOfDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.backup); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.details); return writer; }; /** - * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MaintenanceWindow.verify|verify} messages. + * Encodes the specified Restore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Restore.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.MaintenanceWindow + * @memberof google.cloud.metastore.v1beta.Restore * @static - * @param {google.cloud.metastore.v1beta.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {google.cloud.metastore.v1beta.IRestore} message Restore message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { + Restore.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MaintenanceWindow message from the specified reader or buffer. + * Decodes a Restore message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.MaintenanceWindow + * @memberof google.cloud.metastore.v1beta.Restore * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.MaintenanceWindow} MaintenanceWindow + * @returns {google.cloud.metastore.v1beta.Restore} Restore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MaintenanceWindow.decode = function decode(reader, length) { + Restore.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.MaintenanceWindow(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.Restore(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.hourOfDay = $root.google.protobuf.Int32Value.decode(reader, reader.uint32()); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.dayOfWeek = reader.int32(); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.backup = reader.string(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.details = reader.string(); break; } default: @@ -24937,188 +36368,271 @@ }; /** - * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * Decodes a Restore message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.MaintenanceWindow + * @memberof google.cloud.metastore.v1beta.Restore * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.MaintenanceWindow} MaintenanceWindow + * @returns {google.cloud.metastore.v1beta.Restore} Restore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { + Restore.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MaintenanceWindow message. + * Verifies a Restore message. * @function verify - * @memberof google.cloud.metastore.v1beta.MaintenanceWindow + * @memberof google.cloud.metastore.v1beta.Restore * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MaintenanceWindow.verify = function verify(message) { + Restore.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.hourOfDay != null && message.hasOwnProperty("hourOfDay")) { - var error = $root.google.protobuf.Int32Value.verify(message.hourOfDay); + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); if (error) - return "hourOfDay." + error; + return "startTime." + error; } - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - switch (message.dayOfWeek) { + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "dayOfWeek: enum value expected"; + return "state: enum value expected"; case 0: case 1: case 2: case 3: case 4: - case 5: - case 6: - case 7: break; } + if (message.backup != null && message.hasOwnProperty("backup")) + if (!$util.isString(message.backup)) + return "backup: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.details != null && message.hasOwnProperty("details")) + if (!$util.isString(message.details)) + return "details: string expected"; return null; }; /** - * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * Creates a Restore message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.MaintenanceWindow + * @memberof google.cloud.metastore.v1beta.Restore * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.MaintenanceWindow} MaintenanceWindow + * @returns {google.cloud.metastore.v1beta.Restore} Restore */ - MaintenanceWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.MaintenanceWindow) + Restore.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.Restore) return object; - var message = new $root.google.cloud.metastore.v1beta.MaintenanceWindow(); - if (object.hourOfDay != null) { - if (typeof object.hourOfDay !== "object") - throw TypeError(".google.cloud.metastore.v1beta.MaintenanceWindow.hourOfDay: object expected"); - message.hourOfDay = $root.google.protobuf.Int32Value.fromObject(object.hourOfDay); + var message = new $root.google.cloud.metastore.v1beta.Restore(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Restore.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); } - switch (object.dayOfWeek) { + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Restore.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { default: - if (typeof object.dayOfWeek === "number") { - message.dayOfWeek = object.dayOfWeek; + if (typeof object.state === "number") { + message.state = object.state; break; } break; - case "DAY_OF_WEEK_UNSPECIFIED": + case "STATE_UNSPECIFIED": case 0: - message.dayOfWeek = 0; + message.state = 0; break; - case "MONDAY": + case "RUNNING": case 1: - message.dayOfWeek = 1; + message.state = 1; break; - case "TUESDAY": + case "SUCCEEDED": case 2: - message.dayOfWeek = 2; + message.state = 2; break; - case "WEDNESDAY": + case "FAILED": case 3: - message.dayOfWeek = 3; + message.state = 3; break; - case "THURSDAY": + case "CANCELLED": case 4: - message.dayOfWeek = 4; + message.state = 4; break; - case "FRIDAY": - case 5: - message.dayOfWeek = 5; + } + if (object.backup != null) + message.backup = String(object.backup); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } break; - case "SATURDAY": - case 6: - message.dayOfWeek = 6; + case "RESTORE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; break; - case "SUNDAY": - case 7: - message.dayOfWeek = 7; + case "FULL": + case 1: + message.type = 1; + break; + case "METADATA_ONLY": + case 2: + message.type = 2; break; } + if (object.details != null) + message.details = String(object.details); return message; }; /** - * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * Creates a plain object from a Restore message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.MaintenanceWindow + * @memberof google.cloud.metastore.v1beta.Restore * @static - * @param {google.cloud.metastore.v1beta.MaintenanceWindow} message MaintenanceWindow + * @param {google.cloud.metastore.v1beta.Restore} message Restore * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MaintenanceWindow.toObject = function toObject(message, options) { + Restore.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.hourOfDay = null; - object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.backup = ""; + object.type = options.enums === String ? "RESTORE_TYPE_UNSPECIFIED" : 0; + object.details = ""; } - if (message.hourOfDay != null && message.hasOwnProperty("hourOfDay")) - object.hourOfDay = $root.google.protobuf.Int32Value.toObject(message.hourOfDay, options); - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1beta.Restore.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1beta.Restore.State[message.state] : message.state; + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = message.backup; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.metastore.v1beta.Restore.RestoreType[message.type] === undefined ? message.type : $root.google.cloud.metastore.v1beta.Restore.RestoreType[message.type] : message.type; + if (message.details != null && message.hasOwnProperty("details")) + object.details = message.details; return object; }; /** - * Converts this MaintenanceWindow to JSON. + * Converts this Restore to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.MaintenanceWindow + * @memberof google.cloud.metastore.v1beta.Restore * @instance * @returns {Object.} JSON object */ - MaintenanceWindow.prototype.toJSON = function toJSON() { + Restore.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MaintenanceWindow + * Gets the default type url for Restore * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.MaintenanceWindow + * @memberof google.cloud.metastore.v1beta.Restore * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Restore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.MaintenanceWindow"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.Restore"; }; - return MaintenanceWindow; + /** + * State enum. + * @name google.cloud.metastore.v1beta.Restore.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} CANCELLED=4 CANCELLED value + */ + Restore.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "CANCELLED"] = 4; + return values; + })(); + + /** + * RestoreType enum. + * @name google.cloud.metastore.v1beta.Restore.RestoreType + * @enum {number} + * @property {number} RESTORE_TYPE_UNSPECIFIED=0 RESTORE_TYPE_UNSPECIFIED value + * @property {number} FULL=1 FULL value + * @property {number} METADATA_ONLY=2 METADATA_ONLY value + */ + Restore.RestoreType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTORE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FULL"] = 1; + values[valuesById[2] = "METADATA_ONLY"] = 2; + return values; + })(); + + return Restore; })(); - v1beta.HiveMetastoreConfig = (function() { + v1beta.ListServicesRequest = (function() { /** - * Properties of a HiveMetastoreConfig. + * Properties of a ListServicesRequest. * @memberof google.cloud.metastore.v1beta - * @interface IHiveMetastoreConfig - * @property {string|null} [version] HiveMetastoreConfig version - * @property {Object.|null} [configOverrides] HiveMetastoreConfig configOverrides - * @property {google.cloud.metastore.v1beta.IKerberosConfig|null} [kerberosConfig] HiveMetastoreConfig kerberosConfig + * @interface IListServicesRequest + * @property {string|null} [parent] ListServicesRequest parent + * @property {number|null} [pageSize] ListServicesRequest pageSize + * @property {string|null} [pageToken] ListServicesRequest pageToken + * @property {string|null} [filter] ListServicesRequest filter + * @property {string|null} [orderBy] ListServicesRequest orderBy */ /** - * Constructs a new HiveMetastoreConfig. + * Constructs a new ListServicesRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a HiveMetastoreConfig. - * @implements IHiveMetastoreConfig + * @classdesc Represents a ListServicesRequest. + * @implements IListServicesRequest * @constructor - * @param {google.cloud.metastore.v1beta.IHiveMetastoreConfig=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IListServicesRequest=} [properties] Properties to set */ - function HiveMetastoreConfig(properties) { - this.configOverrides = {}; + function ListServicesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25126,123 +36640,131 @@ } /** - * HiveMetastoreConfig version. - * @member {string} version - * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig + * ListServicesRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1beta.ListServicesRequest * @instance */ - HiveMetastoreConfig.prototype.version = ""; + ListServicesRequest.prototype.parent = ""; /** - * HiveMetastoreConfig configOverrides. - * @member {Object.} configOverrides - * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig + * ListServicesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.metastore.v1beta.ListServicesRequest * @instance */ - HiveMetastoreConfig.prototype.configOverrides = $util.emptyObject; + ListServicesRequest.prototype.pageSize = 0; /** - * HiveMetastoreConfig kerberosConfig. - * @member {google.cloud.metastore.v1beta.IKerberosConfig|null|undefined} kerberosConfig - * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig + * ListServicesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.metastore.v1beta.ListServicesRequest * @instance */ - HiveMetastoreConfig.prototype.kerberosConfig = null; + ListServicesRequest.prototype.pageToken = ""; /** - * Creates a new HiveMetastoreConfig instance using the specified properties. + * ListServicesRequest filter. + * @member {string} filter + * @memberof google.cloud.metastore.v1beta.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.filter = ""; + + /** + * ListServicesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.metastore.v1beta.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListServicesRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1beta.ListServicesRequest * @static - * @param {google.cloud.metastore.v1beta.IHiveMetastoreConfig=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.HiveMetastoreConfig} HiveMetastoreConfig instance + * @param {google.cloud.metastore.v1beta.IListServicesRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.ListServicesRequest} ListServicesRequest instance */ - HiveMetastoreConfig.create = function create(properties) { - return new HiveMetastoreConfig(properties); + ListServicesRequest.create = function create(properties) { + return new ListServicesRequest(properties); }; /** - * Encodes the specified HiveMetastoreConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.HiveMetastoreConfig.verify|verify} messages. + * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1beta.ListServicesRequest * @static - * @param {google.cloud.metastore.v1beta.IHiveMetastoreConfig} message HiveMetastoreConfig message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListServicesRequest} message ListServicesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HiveMetastoreConfig.encode = function encode(message, writer) { + ListServicesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.configOverrides != null && Object.hasOwnProperty.call(message, "configOverrides")) - for (var keys = Object.keys(message.configOverrides), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.configOverrides[keys[i]]).ldelim(); - if (message.kerberosConfig != null && Object.hasOwnProperty.call(message, "kerberosConfig")) - $root.google.cloud.metastore.v1beta.KerberosConfig.encode(message.kerberosConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified HiveMetastoreConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.HiveMetastoreConfig.verify|verify} messages. + * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1beta.ListServicesRequest * @static - * @param {google.cloud.metastore.v1beta.IHiveMetastoreConfig} message HiveMetastoreConfig message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListServicesRequest} message ListServicesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HiveMetastoreConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListServicesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HiveMetastoreConfig message from the specified reader or buffer. + * Decodes a ListServicesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1beta.ListServicesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.HiveMetastoreConfig} HiveMetastoreConfig + * @returns {google.cloud.metastore.v1beta.ListServicesRequest} ListServicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HiveMetastoreConfig.decode = function decode(reader, length) { + ListServicesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.HiveMetastoreConfig(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ListServicesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.version = reader.string(); + message.parent = reader.string(); break; } case 2: { - if (message.configOverrides === $util.emptyObject) - message.configOverrides = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.configOverrides[key] = value; + message.pageSize = reader.int32(); break; } case 3: { - message.kerberosConfig = $root.google.cloud.metastore.v1beta.KerberosConfig.decode(reader, reader.uint32()); + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -25254,161 +36776,159 @@ }; /** - * Decodes a HiveMetastoreConfig message from the specified reader or buffer, length delimited. + * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1beta.ListServicesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.HiveMetastoreConfig} HiveMetastoreConfig + * @returns {google.cloud.metastore.v1beta.ListServicesRequest} ListServicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HiveMetastoreConfig.decodeDelimited = function decodeDelimited(reader) { + ListServicesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HiveMetastoreConfig message. + * Verifies a ListServicesRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1beta.ListServicesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HiveMetastoreConfig.verify = function verify(message) { + ListServicesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.configOverrides != null && message.hasOwnProperty("configOverrides")) { - if (!$util.isObject(message.configOverrides)) - return "configOverrides: object expected"; - var key = Object.keys(message.configOverrides); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.configOverrides[key[i]])) - return "configOverrides: string{k:string} expected"; - } - if (message.kerberosConfig != null && message.hasOwnProperty("kerberosConfig")) { - var error = $root.google.cloud.metastore.v1beta.KerberosConfig.verify(message.kerberosConfig); - if (error) - return "kerberosConfig." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a HiveMetastoreConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1beta.ListServicesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.HiveMetastoreConfig} HiveMetastoreConfig + * @returns {google.cloud.metastore.v1beta.ListServicesRequest} ListServicesRequest */ - HiveMetastoreConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.HiveMetastoreConfig) + ListServicesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.ListServicesRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.HiveMetastoreConfig(); - if (object.version != null) - message.version = String(object.version); - if (object.configOverrides) { - if (typeof object.configOverrides !== "object") - throw TypeError(".google.cloud.metastore.v1beta.HiveMetastoreConfig.configOverrides: object expected"); - message.configOverrides = {}; - for (var keys = Object.keys(object.configOverrides), i = 0; i < keys.length; ++i) - message.configOverrides[keys[i]] = String(object.configOverrides[keys[i]]); - } - if (object.kerberosConfig != null) { - if (typeof object.kerberosConfig !== "object") - throw TypeError(".google.cloud.metastore.v1beta.HiveMetastoreConfig.kerberosConfig: object expected"); - message.kerberosConfig = $root.google.cloud.metastore.v1beta.KerberosConfig.fromObject(object.kerberosConfig); - } + var message = new $root.google.cloud.metastore.v1beta.ListServicesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a HiveMetastoreConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1beta.ListServicesRequest * @static - * @param {google.cloud.metastore.v1beta.HiveMetastoreConfig} message HiveMetastoreConfig + * @param {google.cloud.metastore.v1beta.ListServicesRequest} message ListServicesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HiveMetastoreConfig.toObject = function toObject(message, options) { + ListServicesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.configOverrides = {}; if (options.defaults) { - object.version = ""; - object.kerberosConfig = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - var keys2; - if (message.configOverrides && (keys2 = Object.keys(message.configOverrides)).length) { - object.configOverrides = {}; - for (var j = 0; j < keys2.length; ++j) - object.configOverrides[keys2[j]] = message.configOverrides[keys2[j]]; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } - if (message.kerberosConfig != null && message.hasOwnProperty("kerberosConfig")) - object.kerberosConfig = $root.google.cloud.metastore.v1beta.KerberosConfig.toObject(message.kerberosConfig, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this HiveMetastoreConfig to JSON. + * Converts this ListServicesRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1beta.ListServicesRequest * @instance * @returns {Object.} JSON object */ - HiveMetastoreConfig.prototype.toJSON = function toJSON() { + ListServicesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HiveMetastoreConfig + * Gets the default type url for ListServicesRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1beta.ListServicesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HiveMetastoreConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListServicesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.HiveMetastoreConfig"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.ListServicesRequest"; }; - return HiveMetastoreConfig; + return ListServicesRequest; })(); - v1beta.KerberosConfig = (function() { + v1beta.ListServicesResponse = (function() { /** - * Properties of a KerberosConfig. + * Properties of a ListServicesResponse. * @memberof google.cloud.metastore.v1beta - * @interface IKerberosConfig - * @property {google.cloud.metastore.v1beta.ISecret|null} [keytab] KerberosConfig keytab - * @property {string|null} [principal] KerberosConfig principal - * @property {string|null} [krb5ConfigGcsUri] KerberosConfig krb5ConfigGcsUri + * @interface IListServicesResponse + * @property {Array.|null} [services] ListServicesResponse services + * @property {string|null} [nextPageToken] ListServicesResponse nextPageToken + * @property {Array.|null} [unreachable] ListServicesResponse unreachable */ /** - * Constructs a new KerberosConfig. + * Constructs a new ListServicesResponse. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a KerberosConfig. - * @implements IKerberosConfig + * @classdesc Represents a ListServicesResponse. + * @implements IListServicesResponse * @constructor - * @param {google.cloud.metastore.v1beta.IKerberosConfig=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IListServicesResponse=} [properties] Properties to set */ - function KerberosConfig(properties) { + function ListServicesResponse(properties) { + this.services = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25416,103 +36936,109 @@ } /** - * KerberosConfig keytab. - * @member {google.cloud.metastore.v1beta.ISecret|null|undefined} keytab - * @memberof google.cloud.metastore.v1beta.KerberosConfig + * ListServicesResponse services. + * @member {Array.} services + * @memberof google.cloud.metastore.v1beta.ListServicesResponse * @instance */ - KerberosConfig.prototype.keytab = null; + ListServicesResponse.prototype.services = $util.emptyArray; /** - * KerberosConfig principal. - * @member {string} principal - * @memberof google.cloud.metastore.v1beta.KerberosConfig + * ListServicesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.metastore.v1beta.ListServicesResponse * @instance */ - KerberosConfig.prototype.principal = ""; + ListServicesResponse.prototype.nextPageToken = ""; /** - * KerberosConfig krb5ConfigGcsUri. - * @member {string} krb5ConfigGcsUri - * @memberof google.cloud.metastore.v1beta.KerberosConfig + * ListServicesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.metastore.v1beta.ListServicesResponse * @instance */ - KerberosConfig.prototype.krb5ConfigGcsUri = ""; + ListServicesResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new KerberosConfig instance using the specified properties. + * Creates a new ListServicesResponse instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.KerberosConfig + * @memberof google.cloud.metastore.v1beta.ListServicesResponse * @static - * @param {google.cloud.metastore.v1beta.IKerberosConfig=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.KerberosConfig} KerberosConfig instance + * @param {google.cloud.metastore.v1beta.IListServicesResponse=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.ListServicesResponse} ListServicesResponse instance */ - KerberosConfig.create = function create(properties) { - return new KerberosConfig(properties); + ListServicesResponse.create = function create(properties) { + return new ListServicesResponse(properties); }; /** - * Encodes the specified KerberosConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.KerberosConfig.verify|verify} messages. + * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.KerberosConfig + * @memberof google.cloud.metastore.v1beta.ListServicesResponse * @static - * @param {google.cloud.metastore.v1beta.IKerberosConfig} message KerberosConfig message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListServicesResponse} message ListServicesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KerberosConfig.encode = function encode(message, writer) { + ListServicesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keytab != null && Object.hasOwnProperty.call(message, "keytab")) - $root.google.cloud.metastore.v1beta.Secret.encode(message.keytab, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.principal != null && Object.hasOwnProperty.call(message, "principal")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.principal); - if (message.krb5ConfigGcsUri != null && Object.hasOwnProperty.call(message, "krb5ConfigGcsUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.krb5ConfigGcsUri); + if (message.services != null && message.services.length) + for (var i = 0; i < message.services.length; ++i) + $root.google.cloud.metastore.v1beta.Service.encode(message.services[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified KerberosConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.KerberosConfig.verify|verify} messages. + * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.KerberosConfig + * @memberof google.cloud.metastore.v1beta.ListServicesResponse * @static - * @param {google.cloud.metastore.v1beta.IKerberosConfig} message KerberosConfig message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListServicesResponse} message ListServicesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KerberosConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListServicesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a KerberosConfig message from the specified reader or buffer. + * Decodes a ListServicesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.KerberosConfig + * @memberof google.cloud.metastore.v1beta.ListServicesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.KerberosConfig} KerberosConfig + * @returns {google.cloud.metastore.v1beta.ListServicesResponse} ListServicesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KerberosConfig.decode = function decode(reader, length) { + ListServicesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.KerberosConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ListServicesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keytab = $root.google.cloud.metastore.v1beta.Secret.decode(reader, reader.uint32()); + if (!(message.services && message.services.length)) + message.services = []; + message.services.push($root.google.cloud.metastore.v1beta.Service.decode(reader, reader.uint32())); break; } case 2: { - message.principal = reader.string(); + message.nextPageToken = reader.string(); break; } case 3: { - message.krb5ConfigGcsUri = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -25524,144 +37050,169 @@ }; /** - * Decodes a KerberosConfig message from the specified reader or buffer, length delimited. + * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.KerberosConfig + * @memberof google.cloud.metastore.v1beta.ListServicesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.KerberosConfig} KerberosConfig + * @returns {google.cloud.metastore.v1beta.ListServicesResponse} ListServicesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KerberosConfig.decodeDelimited = function decodeDelimited(reader) { + ListServicesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a KerberosConfig message. + * Verifies a ListServicesResponse message. * @function verify - * @memberof google.cloud.metastore.v1beta.KerberosConfig + * @memberof google.cloud.metastore.v1beta.ListServicesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KerberosConfig.verify = function verify(message) { + ListServicesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keytab != null && message.hasOwnProperty("keytab")) { - var error = $root.google.cloud.metastore.v1beta.Secret.verify(message.keytab); - if (error) - return "keytab." + error; + if (message.services != null && message.hasOwnProperty("services")) { + if (!Array.isArray(message.services)) + return "services: array expected"; + for (var i = 0; i < message.services.length; ++i) { + var error = $root.google.cloud.metastore.v1beta.Service.verify(message.services[i]); + if (error) + return "services." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.principal != null && message.hasOwnProperty("principal")) - if (!$util.isString(message.principal)) - return "principal: string expected"; - if (message.krb5ConfigGcsUri != null && message.hasOwnProperty("krb5ConfigGcsUri")) - if (!$util.isString(message.krb5ConfigGcsUri)) - return "krb5ConfigGcsUri: string expected"; return null; }; /** - * Creates a KerberosConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.KerberosConfig + * @memberof google.cloud.metastore.v1beta.ListServicesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.KerberosConfig} KerberosConfig + * @returns {google.cloud.metastore.v1beta.ListServicesResponse} ListServicesResponse */ - KerberosConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.KerberosConfig) + ListServicesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.ListServicesResponse) return object; - var message = new $root.google.cloud.metastore.v1beta.KerberosConfig(); - if (object.keytab != null) { - if (typeof object.keytab !== "object") - throw TypeError(".google.cloud.metastore.v1beta.KerberosConfig.keytab: object expected"); - message.keytab = $root.google.cloud.metastore.v1beta.Secret.fromObject(object.keytab); + var message = new $root.google.cloud.metastore.v1beta.ListServicesResponse(); + if (object.services) { + if (!Array.isArray(object.services)) + throw TypeError(".google.cloud.metastore.v1beta.ListServicesResponse.services: array expected"); + message.services = []; + for (var i = 0; i < object.services.length; ++i) { + if (typeof object.services[i] !== "object") + throw TypeError(".google.cloud.metastore.v1beta.ListServicesResponse.services: object expected"); + message.services[i] = $root.google.cloud.metastore.v1beta.Service.fromObject(object.services[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.metastore.v1beta.ListServicesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.principal != null) - message.principal = String(object.principal); - if (object.krb5ConfigGcsUri != null) - message.krb5ConfigGcsUri = String(object.krb5ConfigGcsUri); return message; }; /** - * Creates a plain object from a KerberosConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.KerberosConfig + * @memberof google.cloud.metastore.v1beta.ListServicesResponse * @static - * @param {google.cloud.metastore.v1beta.KerberosConfig} message KerberosConfig + * @param {google.cloud.metastore.v1beta.ListServicesResponse} message ListServicesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KerberosConfig.toObject = function toObject(message, options) { + ListServicesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keytab = null; - object.principal = ""; - object.krb5ConfigGcsUri = ""; + if (options.arrays || options.defaults) { + object.services = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.services && message.services.length) { + object.services = []; + for (var j = 0; j < message.services.length; ++j) + object.services[j] = $root.google.cloud.metastore.v1beta.Service.toObject(message.services[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.keytab != null && message.hasOwnProperty("keytab")) - object.keytab = $root.google.cloud.metastore.v1beta.Secret.toObject(message.keytab, options); - if (message.principal != null && message.hasOwnProperty("principal")) - object.principal = message.principal; - if (message.krb5ConfigGcsUri != null && message.hasOwnProperty("krb5ConfigGcsUri")) - object.krb5ConfigGcsUri = message.krb5ConfigGcsUri; return object; }; /** - * Converts this KerberosConfig to JSON. + * Converts this ListServicesResponse to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.KerberosConfig + * @memberof google.cloud.metastore.v1beta.ListServicesResponse * @instance * @returns {Object.} JSON object */ - KerberosConfig.prototype.toJSON = function toJSON() { + ListServicesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for KerberosConfig + * Gets the default type url for ListServicesResponse * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.KerberosConfig + * @memberof google.cloud.metastore.v1beta.ListServicesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - KerberosConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListServicesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.KerberosConfig"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.ListServicesResponse"; }; - return KerberosConfig; + return ListServicesResponse; })(); - v1beta.Secret = (function() { + v1beta.GetServiceRequest = (function() { /** - * Properties of a Secret. + * Properties of a GetServiceRequest. * @memberof google.cloud.metastore.v1beta - * @interface ISecret - * @property {string|null} [cloudSecret] Secret cloudSecret + * @interface IGetServiceRequest + * @property {string|null} [name] GetServiceRequest name */ /** - * Constructs a new Secret. + * Constructs a new GetServiceRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a Secret. - * @implements ISecret + * @classdesc Represents a GetServiceRequest. + * @implements IGetServiceRequest * @constructor - * @param {google.cloud.metastore.v1beta.ISecret=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IGetServiceRequest=} [properties] Properties to set */ - function Secret(properties) { + function GetServiceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25669,89 +37220,75 @@ } /** - * Secret cloudSecret. - * @member {string|null|undefined} cloudSecret - * @memberof google.cloud.metastore.v1beta.Secret - * @instance - */ - Secret.prototype.cloudSecret = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Secret value. - * @member {"cloudSecret"|undefined} value - * @memberof google.cloud.metastore.v1beta.Secret + * GetServiceRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1beta.GetServiceRequest * @instance */ - Object.defineProperty(Secret.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["cloudSecret"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetServiceRequest.prototype.name = ""; /** - * Creates a new Secret instance using the specified properties. + * Creates a new GetServiceRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.Secret + * @memberof google.cloud.metastore.v1beta.GetServiceRequest * @static - * @param {google.cloud.metastore.v1beta.ISecret=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.Secret} Secret instance + * @param {google.cloud.metastore.v1beta.IGetServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.GetServiceRequest} GetServiceRequest instance */ - Secret.create = function create(properties) { - return new Secret(properties); + GetServiceRequest.create = function create(properties) { + return new GetServiceRequest(properties); }; /** - * Encodes the specified Secret message. Does not implicitly {@link google.cloud.metastore.v1beta.Secret.verify|verify} messages. + * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.GetServiceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.Secret + * @memberof google.cloud.metastore.v1beta.GetServiceRequest * @static - * @param {google.cloud.metastore.v1beta.ISecret} message Secret message or plain object to encode + * @param {google.cloud.metastore.v1beta.IGetServiceRequest} message GetServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Secret.encode = function encode(message, writer) { + GetServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cloudSecret != null && Object.hasOwnProperty.call(message, "cloudSecret")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cloudSecret); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified Secret message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Secret.verify|verify} messages. + * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.GetServiceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.Secret + * @memberof google.cloud.metastore.v1beta.GetServiceRequest * @static - * @param {google.cloud.metastore.v1beta.ISecret} message Secret message or plain object to encode + * @param {google.cloud.metastore.v1beta.IGetServiceRequest} message GetServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Secret.encodeDelimited = function encodeDelimited(message, writer) { + GetServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Secret message from the specified reader or buffer. + * Decodes a GetServiceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.Secret + * @memberof google.cloud.metastore.v1beta.GetServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.Secret} Secret + * @returns {google.cloud.metastore.v1beta.GetServiceRequest} GetServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Secret.decode = function decode(reader, length) { + GetServiceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.Secret(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.GetServiceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.cloudSecret = reader.string(); + case 1: { + message.name = reader.string(); break; } default: @@ -25763,129 +37300,125 @@ }; /** - * Decodes a Secret message from the specified reader or buffer, length delimited. + * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.Secret + * @memberof google.cloud.metastore.v1beta.GetServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.Secret} Secret + * @returns {google.cloud.metastore.v1beta.GetServiceRequest} GetServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Secret.decodeDelimited = function decodeDelimited(reader) { + GetServiceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Secret message. + * Verifies a GetServiceRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.Secret + * @memberof google.cloud.metastore.v1beta.GetServiceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Secret.verify = function verify(message) { + GetServiceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.cloudSecret != null && message.hasOwnProperty("cloudSecret")) { - properties.value = 1; - if (!$util.isString(message.cloudSecret)) - return "cloudSecret: string expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a Secret message from a plain object. Also converts values to their respective internal types. + * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.Secret + * @memberof google.cloud.metastore.v1beta.GetServiceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.Secret} Secret + * @returns {google.cloud.metastore.v1beta.GetServiceRequest} GetServiceRequest */ - Secret.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.Secret) + GetServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.GetServiceRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.Secret(); - if (object.cloudSecret != null) - message.cloudSecret = String(object.cloudSecret); + var message = new $root.google.cloud.metastore.v1beta.GetServiceRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a Secret message. Also converts values to other types if specified. + * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.Secret + * @memberof google.cloud.metastore.v1beta.GetServiceRequest * @static - * @param {google.cloud.metastore.v1beta.Secret} message Secret + * @param {google.cloud.metastore.v1beta.GetServiceRequest} message GetServiceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Secret.toObject = function toObject(message, options) { + GetServiceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.cloudSecret != null && message.hasOwnProperty("cloudSecret")) { - object.cloudSecret = message.cloudSecret; - if (options.oneofs) - object.value = "cloudSecret"; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this Secret to JSON. + * Converts this GetServiceRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.Secret + * @memberof google.cloud.metastore.v1beta.GetServiceRequest * @instance * @returns {Object.} JSON object */ - Secret.prototype.toJSON = function toJSON() { + GetServiceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Secret + * Gets the default type url for GetServiceRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.Secret + * @memberof google.cloud.metastore.v1beta.GetServiceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Secret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.Secret"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.GetServiceRequest"; }; - return Secret; + return GetServiceRequest; })(); - v1beta.MetadataManagementActivity = (function() { + v1beta.CreateServiceRequest = (function() { /** - * Properties of a MetadataManagementActivity. + * Properties of a CreateServiceRequest. * @memberof google.cloud.metastore.v1beta - * @interface IMetadataManagementActivity - * @property {Array.|null} [metadataExports] MetadataManagementActivity metadataExports - * @property {Array.|null} [restores] MetadataManagementActivity restores + * @interface ICreateServiceRequest + * @property {string|null} [parent] CreateServiceRequest parent + * @property {string|null} [serviceId] CreateServiceRequest serviceId + * @property {google.cloud.metastore.v1beta.IService|null} [service] CreateServiceRequest service + * @property {string|null} [requestId] CreateServiceRequest requestId */ /** - * Constructs a new MetadataManagementActivity. + * Constructs a new CreateServiceRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a MetadataManagementActivity. - * @implements IMetadataManagementActivity + * @classdesc Represents a CreateServiceRequest. + * @implements ICreateServiceRequest * @constructor - * @param {google.cloud.metastore.v1beta.IMetadataManagementActivity=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.ICreateServiceRequest=} [properties] Properties to set */ - function MetadataManagementActivity(properties) { - this.metadataExports = []; - this.restores = []; + function CreateServiceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25893,95 +37426,117 @@ } /** - * MetadataManagementActivity metadataExports. - * @member {Array.} metadataExports - * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * CreateServiceRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1beta.CreateServiceRequest * @instance */ - MetadataManagementActivity.prototype.metadataExports = $util.emptyArray; + CreateServiceRequest.prototype.parent = ""; /** - * MetadataManagementActivity restores. - * @member {Array.} restores - * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * CreateServiceRequest serviceId. + * @member {string} serviceId + * @memberof google.cloud.metastore.v1beta.CreateServiceRequest * @instance */ - MetadataManagementActivity.prototype.restores = $util.emptyArray; + CreateServiceRequest.prototype.serviceId = ""; /** - * Creates a new MetadataManagementActivity instance using the specified properties. + * CreateServiceRequest service. + * @member {google.cloud.metastore.v1beta.IService|null|undefined} service + * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * @instance + */ + CreateServiceRequest.prototype.service = null; + + /** + * CreateServiceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * @instance + */ + CreateServiceRequest.prototype.requestId = ""; + + /** + * Creates a new CreateServiceRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @memberof google.cloud.metastore.v1beta.CreateServiceRequest * @static - * @param {google.cloud.metastore.v1beta.IMetadataManagementActivity=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.MetadataManagementActivity} MetadataManagementActivity instance + * @param {google.cloud.metastore.v1beta.ICreateServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.CreateServiceRequest} CreateServiceRequest instance */ - MetadataManagementActivity.create = function create(properties) { - return new MetadataManagementActivity(properties); + CreateServiceRequest.create = function create(properties) { + return new CreateServiceRequest(properties); }; /** - * Encodes the specified MetadataManagementActivity message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataManagementActivity.verify|verify} messages. + * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.CreateServiceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @memberof google.cloud.metastore.v1beta.CreateServiceRequest * @static - * @param {google.cloud.metastore.v1beta.IMetadataManagementActivity} message MetadataManagementActivity message or plain object to encode + * @param {google.cloud.metastore.v1beta.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataManagementActivity.encode = function encode(message, writer) { + CreateServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metadataExports != null && message.metadataExports.length) - for (var i = 0; i < message.metadataExports.length; ++i) - $root.google.cloud.metastore.v1beta.MetadataExport.encode(message.metadataExports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.restores != null && message.restores.length) - for (var i = 0; i < message.restores.length; ++i) - $root.google.cloud.metastore.v1beta.Restore.encode(message.restores[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.serviceId != null && Object.hasOwnProperty.call(message, "serviceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceId); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + $root.google.cloud.metastore.v1beta.Service.encode(message.service, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; /** - * Encodes the specified MetadataManagementActivity message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataManagementActivity.verify|verify} messages. + * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.CreateServiceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @memberof google.cloud.metastore.v1beta.CreateServiceRequest * @static - * @param {google.cloud.metastore.v1beta.IMetadataManagementActivity} message MetadataManagementActivity message or plain object to encode + * @param {google.cloud.metastore.v1beta.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataManagementActivity.encodeDelimited = function encodeDelimited(message, writer) { + CreateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetadataManagementActivity message from the specified reader or buffer. + * Decodes a CreateServiceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @memberof google.cloud.metastore.v1beta.CreateServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.MetadataManagementActivity} MetadataManagementActivity + * @returns {google.cloud.metastore.v1beta.CreateServiceRequest} CreateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataManagementActivity.decode = function decode(reader, length) { + CreateServiceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.MetadataManagementActivity(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.CreateServiceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.metadataExports && message.metadataExports.length)) - message.metadataExports = []; - message.metadataExports.push($root.google.cloud.metastore.v1beta.MetadataExport.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - if (!(message.restores && message.restores.length)) - message.restores = []; - message.restores.push($root.google.cloud.metastore.v1beta.Restore.decode(reader, reader.uint32())); + message.serviceId = reader.string(); + break; + } + case 3: { + message.service = $root.google.cloud.metastore.v1beta.Service.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); break; } default: @@ -25993,170 +37548,154 @@ }; /** - * Decodes a MetadataManagementActivity message from the specified reader or buffer, length delimited. + * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @memberof google.cloud.metastore.v1beta.CreateServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.MetadataManagementActivity} MetadataManagementActivity + * @returns {google.cloud.metastore.v1beta.CreateServiceRequest} CreateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataManagementActivity.decodeDelimited = function decodeDelimited(reader) { + CreateServiceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetadataManagementActivity message. + * Verifies a CreateServiceRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @memberof google.cloud.metastore.v1beta.CreateServiceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetadataManagementActivity.verify = function verify(message) { + CreateServiceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metadataExports != null && message.hasOwnProperty("metadataExports")) { - if (!Array.isArray(message.metadataExports)) - return "metadataExports: array expected"; - for (var i = 0; i < message.metadataExports.length; ++i) { - var error = $root.google.cloud.metastore.v1beta.MetadataExport.verify(message.metadataExports[i]); - if (error) - return "metadataExports." + error; - } - } - if (message.restores != null && message.hasOwnProperty("restores")) { - if (!Array.isArray(message.restores)) - return "restores: array expected"; - for (var i = 0; i < message.restores.length; ++i) { - var error = $root.google.cloud.metastore.v1beta.Restore.verify(message.restores[i]); - if (error) - return "restores." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.serviceId != null && message.hasOwnProperty("serviceId")) + if (!$util.isString(message.serviceId)) + return "serviceId: string expected"; + if (message.service != null && message.hasOwnProperty("service")) { + var error = $root.google.cloud.metastore.v1beta.Service.verify(message.service); + if (error) + return "service." + error; } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a MetadataManagementActivity message from a plain object. Also converts values to their respective internal types. + * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @memberof google.cloud.metastore.v1beta.CreateServiceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.MetadataManagementActivity} MetadataManagementActivity + * @returns {google.cloud.metastore.v1beta.CreateServiceRequest} CreateServiceRequest */ - MetadataManagementActivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.MetadataManagementActivity) + CreateServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.CreateServiceRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.MetadataManagementActivity(); - if (object.metadataExports) { - if (!Array.isArray(object.metadataExports)) - throw TypeError(".google.cloud.metastore.v1beta.MetadataManagementActivity.metadataExports: array expected"); - message.metadataExports = []; - for (var i = 0; i < object.metadataExports.length; ++i) { - if (typeof object.metadataExports[i] !== "object") - throw TypeError(".google.cloud.metastore.v1beta.MetadataManagementActivity.metadataExports: object expected"); - message.metadataExports[i] = $root.google.cloud.metastore.v1beta.MetadataExport.fromObject(object.metadataExports[i]); - } - } - if (object.restores) { - if (!Array.isArray(object.restores)) - throw TypeError(".google.cloud.metastore.v1beta.MetadataManagementActivity.restores: array expected"); - message.restores = []; - for (var i = 0; i < object.restores.length; ++i) { - if (typeof object.restores[i] !== "object") - throw TypeError(".google.cloud.metastore.v1beta.MetadataManagementActivity.restores: object expected"); - message.restores[i] = $root.google.cloud.metastore.v1beta.Restore.fromObject(object.restores[i]); - } + var message = new $root.google.cloud.metastore.v1beta.CreateServiceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.serviceId != null) + message.serviceId = String(object.serviceId); + if (object.service != null) { + if (typeof object.service !== "object") + throw TypeError(".google.cloud.metastore.v1beta.CreateServiceRequest.service: object expected"); + message.service = $root.google.cloud.metastore.v1beta.Service.fromObject(object.service); } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a MetadataManagementActivity message. Also converts values to other types if specified. + * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @memberof google.cloud.metastore.v1beta.CreateServiceRequest * @static - * @param {google.cloud.metastore.v1beta.MetadataManagementActivity} message MetadataManagementActivity + * @param {google.cloud.metastore.v1beta.CreateServiceRequest} message CreateServiceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetadataManagementActivity.toObject = function toObject(message, options) { + CreateServiceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.metadataExports = []; - object.restores = []; - } - if (message.metadataExports && message.metadataExports.length) { - object.metadataExports = []; - for (var j = 0; j < message.metadataExports.length; ++j) - object.metadataExports[j] = $root.google.cloud.metastore.v1beta.MetadataExport.toObject(message.metadataExports[j], options); - } - if (message.restores && message.restores.length) { - object.restores = []; - for (var j = 0; j < message.restores.length; ++j) - object.restores[j] = $root.google.cloud.metastore.v1beta.Restore.toObject(message.restores[j], options); + if (options.defaults) { + object.parent = ""; + object.serviceId = ""; + object.service = null; + object.requestId = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.serviceId != null && message.hasOwnProperty("serviceId")) + object.serviceId = message.serviceId; + if (message.service != null && message.hasOwnProperty("service")) + object.service = $root.google.cloud.metastore.v1beta.Service.toObject(message.service, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this MetadataManagementActivity to JSON. + * Converts this CreateServiceRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @memberof google.cloud.metastore.v1beta.CreateServiceRequest * @instance * @returns {Object.} JSON object */ - MetadataManagementActivity.prototype.toJSON = function toJSON() { + CreateServiceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetadataManagementActivity + * Gets the default type url for CreateServiceRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.MetadataManagementActivity + * @memberof google.cloud.metastore.v1beta.CreateServiceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetadataManagementActivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.MetadataManagementActivity"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.CreateServiceRequest"; }; - return MetadataManagementActivity; + return CreateServiceRequest; })(); - v1beta.MetadataImport = (function() { + v1beta.UpdateServiceRequest = (function() { /** - * Properties of a MetadataImport. + * Properties of an UpdateServiceRequest. * @memberof google.cloud.metastore.v1beta - * @interface IMetadataImport - * @property {google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump|null} [databaseDump] MetadataImport databaseDump - * @property {string|null} [name] MetadataImport name - * @property {string|null} [description] MetadataImport description - * @property {google.protobuf.ITimestamp|null} [createTime] MetadataImport createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] MetadataImport updateTime - * @property {google.cloud.metastore.v1beta.MetadataImport.State|null} [state] MetadataImport state + * @interface IUpdateServiceRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateServiceRequest updateMask + * @property {google.cloud.metastore.v1beta.IService|null} [service] UpdateServiceRequest service + * @property {string|null} [requestId] UpdateServiceRequest requestId */ /** - * Constructs a new MetadataImport. + * Constructs a new UpdateServiceRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a MetadataImport. - * @implements IMetadataImport + * @classdesc Represents an UpdateServiceRequest. + * @implements IUpdateServiceRequest * @constructor - * @param {google.cloud.metastore.v1beta.IMetadataImport=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IUpdateServiceRequest=} [properties] Properties to set */ - function MetadataImport(properties) { + function UpdateServiceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26164,159 +37703,103 @@ } /** - * MetadataImport databaseDump. - * @member {google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump|null|undefined} databaseDump - * @memberof google.cloud.metastore.v1beta.MetadataImport - * @instance - */ - MetadataImport.prototype.databaseDump = null; - - /** - * MetadataImport name. - * @member {string} name - * @memberof google.cloud.metastore.v1beta.MetadataImport - * @instance - */ - MetadataImport.prototype.name = ""; - - /** - * MetadataImport description. - * @member {string} description - * @memberof google.cloud.metastore.v1beta.MetadataImport - * @instance - */ - MetadataImport.prototype.description = ""; - - /** - * MetadataImport createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.metastore.v1beta.MetadataImport - * @instance - */ - MetadataImport.prototype.createTime = null; - - /** - * MetadataImport updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.metastore.v1beta.MetadataImport + * UpdateServiceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest * @instance */ - MetadataImport.prototype.updateTime = null; + UpdateServiceRequest.prototype.updateMask = null; /** - * MetadataImport state. - * @member {google.cloud.metastore.v1beta.MetadataImport.State} state - * @memberof google.cloud.metastore.v1beta.MetadataImport + * UpdateServiceRequest service. + * @member {google.cloud.metastore.v1beta.IService|null|undefined} service + * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest * @instance */ - MetadataImport.prototype.state = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateServiceRequest.prototype.service = null; /** - * MetadataImport metadata. - * @member {"databaseDump"|undefined} metadata - * @memberof google.cloud.metastore.v1beta.MetadataImport + * UpdateServiceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest * @instance */ - Object.defineProperty(MetadataImport.prototype, "metadata", { - get: $util.oneOfGetter($oneOfFields = ["databaseDump"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateServiceRequest.prototype.requestId = ""; /** - * Creates a new MetadataImport instance using the specified properties. + * Creates a new UpdateServiceRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.MetadataImport + * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest * @static - * @param {google.cloud.metastore.v1beta.IMetadataImport=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.MetadataImport} MetadataImport instance + * @param {google.cloud.metastore.v1beta.IUpdateServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.UpdateServiceRequest} UpdateServiceRequest instance */ - MetadataImport.create = function create(properties) { - return new MetadataImport(properties); + UpdateServiceRequest.create = function create(properties) { + return new UpdateServiceRequest(properties); }; /** - * Encodes the specified MetadataImport message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.verify|verify} messages. + * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateServiceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.MetadataImport + * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest * @static - * @param {google.cloud.metastore.v1beta.IMetadataImport} message MetadataImport message or plain object to encode + * @param {google.cloud.metastore.v1beta.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataImport.encode = function encode(message, writer) { + UpdateServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.databaseDump != null && Object.hasOwnProperty.call(message, "databaseDump")) - $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.encode(message.databaseDump, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + $root.google.cloud.metastore.v1beta.Service.encode(message.service, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified MetadataImport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.verify|verify} messages. + * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateServiceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.MetadataImport + * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest * @static - * @param {google.cloud.metastore.v1beta.IMetadataImport} message MetadataImport message or plain object to encode + * @param {google.cloud.metastore.v1beta.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataImport.encodeDelimited = function encodeDelimited(message, writer) { + UpdateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetadataImport message from the specified reader or buffer. + * Decodes an UpdateServiceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.MetadataImport + * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.MetadataImport} MetadataImport + * @returns {google.cloud.metastore.v1beta.UpdateServiceRequest} UpdateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataImport.decode = function decode(reader, length) { + UpdateServiceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.MetadataImport(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.UpdateServiceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: { - message.databaseDump = $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.decode(reader, reader.uint32()); - break; - } case 1: { - message.name = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.description = reader.string(); + message.service = $root.google.cloud.metastore.v1beta.Service.decode(reader, reader.uint32()); break; } case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.state = reader.int32(); + message.requestId = reader.string(); break; } default: @@ -26328,567 +37811,150 @@ }; /** - * Decodes a MetadataImport message from the specified reader or buffer, length delimited. + * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.MetadataImport + * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.MetadataImport} MetadataImport + * @returns {google.cloud.metastore.v1beta.UpdateServiceRequest} UpdateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataImport.decodeDelimited = function decodeDelimited(reader) { + UpdateServiceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetadataImport message. + * Verifies an UpdateServiceRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.MetadataImport + * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetadataImport.verify = function verify(message) { + UpdateServiceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.databaseDump != null && message.hasOwnProperty("databaseDump")) { - properties.metadata = 1; - { - var error = $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.verify(message.databaseDump); - if (error) - return "databaseDump." + error; - } - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "createTime." + error; + return "updateMask." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.service != null && message.hasOwnProperty("service")) { + var error = $root.google.cloud.metastore.v1beta.Service.verify(message.service); if (error) - return "updateTime." + error; + return "service." + error; } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a MetadataImport message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.MetadataImport + * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.MetadataImport} MetadataImport - */ - MetadataImport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.MetadataImport) - return object; - var message = new $root.google.cloud.metastore.v1beta.MetadataImport(); - if (object.databaseDump != null) { - if (typeof object.databaseDump !== "object") - throw TypeError(".google.cloud.metastore.v1beta.MetadataImport.databaseDump: object expected"); - message.databaseDump = $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.fromObject(object.databaseDump); - } - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.metastore.v1beta.MetadataImport.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.metastore.v1beta.MetadataImport.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "RUNNING": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "FAILED": - case 4: - message.state = 4; - break; + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1beta.UpdateServiceRequest} UpdateServiceRequest + */ + UpdateServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.UpdateServiceRequest) + return object; + var message = new $root.google.cloud.metastore.v1beta.UpdateServiceRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.metastore.v1beta.UpdateServiceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.service != null) { + if (typeof object.service !== "object") + throw TypeError(".google.cloud.metastore.v1beta.UpdateServiceRequest.service: object expected"); + message.service = $root.google.cloud.metastore.v1beta.Service.fromObject(object.service); } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a MetadataImport message. Also converts values to other types if specified. + * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.MetadataImport + * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest * @static - * @param {google.cloud.metastore.v1beta.MetadataImport} message MetadataImport + * @param {google.cloud.metastore.v1beta.UpdateServiceRequest} message UpdateServiceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetadataImport.toObject = function toObject(message, options) { + UpdateServiceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.metastore.v1beta.MetadataImport.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1beta.MetadataImport.State[message.state] : message.state; - if (message.databaseDump != null && message.hasOwnProperty("databaseDump")) { - object.databaseDump = $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.toObject(message.databaseDump, options); - if (options.oneofs) - object.metadata = "databaseDump"; + object.updateMask = null; + object.service = null; + object.requestId = ""; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.service != null && message.hasOwnProperty("service")) + object.service = $root.google.cloud.metastore.v1beta.Service.toObject(message.service, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this MetadataImport to JSON. + * Converts this UpdateServiceRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.MetadataImport + * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest * @instance * @returns {Object.} JSON object */ - MetadataImport.prototype.toJSON = function toJSON() { + UpdateServiceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetadataImport + * Gets the default type url for UpdateServiceRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.MetadataImport + * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetadataImport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.MetadataImport"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.UpdateServiceRequest"; }; - MetadataImport.DatabaseDump = (function() { - - /** - * Properties of a DatabaseDump. - * @memberof google.cloud.metastore.v1beta.MetadataImport - * @interface IDatabaseDump - * @property {google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType|null} [databaseType] DatabaseDump databaseType - * @property {string|null} [gcsUri] DatabaseDump gcsUri - * @property {string|null} [sourceDatabase] DatabaseDump sourceDatabase - * @property {google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|null} [type] DatabaseDump type - */ - - /** - * Constructs a new DatabaseDump. - * @memberof google.cloud.metastore.v1beta.MetadataImport - * @classdesc Represents a DatabaseDump. - * @implements IDatabaseDump - * @constructor - * @param {google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump=} [properties] Properties to set - */ - function DatabaseDump(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DatabaseDump databaseType. - * @member {google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType} databaseType - * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - * @instance - */ - DatabaseDump.prototype.databaseType = 0; - - /** - * DatabaseDump gcsUri. - * @member {string} gcsUri - * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - * @instance - */ - DatabaseDump.prototype.gcsUri = ""; - - /** - * DatabaseDump sourceDatabase. - * @member {string} sourceDatabase - * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - * @instance - */ - DatabaseDump.prototype.sourceDatabase = ""; - - /** - * DatabaseDump type. - * @member {google.cloud.metastore.v1beta.DatabaseDumpSpec.Type} type - * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - * @instance - */ - DatabaseDump.prototype.type = 0; - - /** - * Creates a new DatabaseDump instance using the specified properties. - * @function create - * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - * @static - * @param {google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.MetadataImport.DatabaseDump} DatabaseDump instance - */ - DatabaseDump.create = function create(properties) { - return new DatabaseDump(properties); - }; - - /** - * Encodes the specified DatabaseDump message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.verify|verify} messages. - * @function encode - * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - * @static - * @param {google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump} message DatabaseDump message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseDump.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.databaseType != null && Object.hasOwnProperty.call(message, "databaseType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.databaseType); - if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsUri); - if (message.sourceDatabase != null && Object.hasOwnProperty.call(message, "sourceDatabase")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceDatabase); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); - return writer; - }; - - /** - * Encodes the specified DatabaseDump message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - * @static - * @param {google.cloud.metastore.v1beta.MetadataImport.IDatabaseDump} message DatabaseDump message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseDump.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatabaseDump message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.MetadataImport.DatabaseDump} DatabaseDump - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseDump.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.databaseType = reader.int32(); - break; - } - case 2: { - message.gcsUri = reader.string(); - break; - } - case 3: { - message.sourceDatabase = reader.string(); - break; - } - case 4: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatabaseDump message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.MetadataImport.DatabaseDump} DatabaseDump - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseDump.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatabaseDump message. - * @function verify - * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatabaseDump.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.databaseType != null && message.hasOwnProperty("databaseType")) - switch (message.databaseType) { - default: - return "databaseType: enum value expected"; - case 0: - case 1: - break; - } - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) - if (!$util.isString(message.gcsUri)) - return "gcsUri: string expected"; - if (message.sourceDatabase != null && message.hasOwnProperty("sourceDatabase")) - if (!$util.isString(message.sourceDatabase)) - return "sourceDatabase: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a DatabaseDump message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.MetadataImport.DatabaseDump} DatabaseDump - */ - DatabaseDump.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) - return object; - var message = new $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump(); - switch (object.databaseType) { - default: - if (typeof object.databaseType === "number") { - message.databaseType = object.databaseType; - break; - } - break; - case "DATABASE_TYPE_UNSPECIFIED": - case 0: - message.databaseType = 0; - break; - case "MYSQL": - case 1: - message.databaseType = 1; - break; - } - if (object.gcsUri != null) - message.gcsUri = String(object.gcsUri); - if (object.sourceDatabase != null) - message.sourceDatabase = String(object.sourceDatabase); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "MYSQL": - case 1: - message.type = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a DatabaseDump message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - * @static - * @param {google.cloud.metastore.v1beta.MetadataImport.DatabaseDump} message DatabaseDump - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatabaseDump.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.databaseType = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; - object.gcsUri = ""; - object.sourceDatabase = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - } - if (message.databaseType != null && message.hasOwnProperty("databaseType")) - object.databaseType = options.enums === String ? $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType[message.databaseType] === undefined ? message.databaseType : $root.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType[message.databaseType] : message.databaseType; - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) - object.gcsUri = message.gcsUri; - if (message.sourceDatabase != null && message.hasOwnProperty("sourceDatabase")) - object.sourceDatabase = message.sourceDatabase; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type[message.type] : message.type; - return object; - }; - - /** - * Converts this DatabaseDump to JSON. - * @function toJSON - * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - * @instance - * @returns {Object.} JSON object - */ - DatabaseDump.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatabaseDump - * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatabaseDump.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.MetadataImport.DatabaseDump"; - }; - - /** - * DatabaseType enum. - * @name google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType - * @enum {number} - * @property {number} DATABASE_TYPE_UNSPECIFIED=0 DATABASE_TYPE_UNSPECIFIED value - * @property {number} MYSQL=1 MYSQL value - */ - DatabaseDump.DatabaseType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MYSQL"] = 1; - return values; - })(); - - return DatabaseDump; - })(); - - /** - * State enum. - * @name google.cloud.metastore.v1beta.MetadataImport.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} UPDATING=3 UPDATING value - * @property {number} FAILED=4 FAILED value - */ - MetadataImport.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[4] = "FAILED"] = 4; - return values; - })(); - - return MetadataImport; + return UpdateServiceRequest; })(); - v1beta.MetadataExport = (function() { + v1beta.DeleteServiceRequest = (function() { /** - * Properties of a MetadataExport. + * Properties of a DeleteServiceRequest. * @memberof google.cloud.metastore.v1beta - * @interface IMetadataExport - * @property {string|null} [destinationGcsUri] MetadataExport destinationGcsUri - * @property {google.protobuf.ITimestamp|null} [startTime] MetadataExport startTime - * @property {google.protobuf.ITimestamp|null} [endTime] MetadataExport endTime - * @property {google.cloud.metastore.v1beta.MetadataExport.State|null} [state] MetadataExport state - * @property {google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|null} [databaseDumpType] MetadataExport databaseDumpType + * @interface IDeleteServiceRequest + * @property {string|null} [name] DeleteServiceRequest name + * @property {string|null} [requestId] DeleteServiceRequest requestId */ /** - * Constructs a new MetadataExport. + * Constructs a new DeleteServiceRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a MetadataExport. - * @implements IMetadataExport + * @classdesc Represents a DeleteServiceRequest. + * @implements IDeleteServiceRequest * @constructor - * @param {google.cloud.metastore.v1beta.IMetadataExport=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IDeleteServiceRequest=} [properties] Properties to set */ - function MetadataExport(properties) { + function DeleteServiceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26896,145 +37962,89 @@ } /** - * MetadataExport destinationGcsUri. - * @member {string|null|undefined} destinationGcsUri - * @memberof google.cloud.metastore.v1beta.MetadataExport - * @instance - */ - MetadataExport.prototype.destinationGcsUri = null; - - /** - * MetadataExport startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.metastore.v1beta.MetadataExport - * @instance - */ - MetadataExport.prototype.startTime = null; - - /** - * MetadataExport endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.metastore.v1beta.MetadataExport - * @instance - */ - MetadataExport.prototype.endTime = null; - - /** - * MetadataExport state. - * @member {google.cloud.metastore.v1beta.MetadataExport.State} state - * @memberof google.cloud.metastore.v1beta.MetadataExport - * @instance - */ - MetadataExport.prototype.state = 0; - - /** - * MetadataExport databaseDumpType. - * @member {google.cloud.metastore.v1beta.DatabaseDumpSpec.Type} databaseDumpType - * @memberof google.cloud.metastore.v1beta.MetadataExport + * DeleteServiceRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest * @instance */ - MetadataExport.prototype.databaseDumpType = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DeleteServiceRequest.prototype.name = ""; /** - * MetadataExport destination. - * @member {"destinationGcsUri"|undefined} destination - * @memberof google.cloud.metastore.v1beta.MetadataExport + * DeleteServiceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest * @instance */ - Object.defineProperty(MetadataExport.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["destinationGcsUri"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteServiceRequest.prototype.requestId = ""; /** - * Creates a new MetadataExport instance using the specified properties. + * Creates a new DeleteServiceRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.MetadataExport + * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest * @static - * @param {google.cloud.metastore.v1beta.IMetadataExport=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.MetadataExport} MetadataExport instance + * @param {google.cloud.metastore.v1beta.IDeleteServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.DeleteServiceRequest} DeleteServiceRequest instance */ - MetadataExport.create = function create(properties) { - return new MetadataExport(properties); + DeleteServiceRequest.create = function create(properties) { + return new DeleteServiceRequest(properties); }; /** - * Encodes the specified MetadataExport message. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataExport.verify|verify} messages. + * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteServiceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.MetadataExport + * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest * @static - * @param {google.cloud.metastore.v1beta.IMetadataExport} message MetadataExport message or plain object to encode + * @param {google.cloud.metastore.v1beta.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataExport.encode = function encode(message, writer) { + DeleteServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.destinationGcsUri != null && Object.hasOwnProperty.call(message, "destinationGcsUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationGcsUri); - if (message.databaseDumpType != null && Object.hasOwnProperty.call(message, "databaseDumpType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.databaseDumpType); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified MetadataExport message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.MetadataExport.verify|verify} messages. + * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteServiceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.MetadataExport + * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest * @static - * @param {google.cloud.metastore.v1beta.IMetadataExport} message MetadataExport message or plain object to encode + * @param {google.cloud.metastore.v1beta.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetadataExport.encodeDelimited = function encodeDelimited(message, writer) { + DeleteServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetadataExport message from the specified reader or buffer. + * Decodes a DeleteServiceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.MetadataExport + * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.MetadataExport} MetadataExport + * @returns {google.cloud.metastore.v1beta.DeleteServiceRequest} DeleteServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataExport.decode = function decode(reader, length) { + DeleteServiceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.MetadataExport(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.DeleteServiceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: { - message.destinationGcsUri = reader.string(); - break; - } case 1: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.state = reader.int32(); - break; - } - case 5: { - message.databaseDumpType = reader.int32(); + message.requestId = reader.string(); break; } default: @@ -27046,248 +38056,135 @@ }; /** - * Decodes a MetadataExport message from the specified reader or buffer, length delimited. + * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.MetadataExport + * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.MetadataExport} MetadataExport + * @returns {google.cloud.metastore.v1beta.DeleteServiceRequest} DeleteServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetadataExport.decodeDelimited = function decodeDelimited(reader) { + DeleteServiceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetadataExport message. + * Verifies a DeleteServiceRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.MetadataExport + * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetadataExport.verify = function verify(message) { + DeleteServiceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.destinationGcsUri != null && message.hasOwnProperty("destinationGcsUri")) { - properties.destination = 1; - if (!$util.isString(message.destinationGcsUri)) - return "destinationGcsUri: string expected"; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) - switch (message.databaseDumpType) { - default: - return "databaseDumpType: enum value expected"; - case 0: - case 1: - break; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a MetadataExport message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.MetadataExport + * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.MetadataExport} MetadataExport + * @returns {google.cloud.metastore.v1beta.DeleteServiceRequest} DeleteServiceRequest */ - MetadataExport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.MetadataExport) + DeleteServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.DeleteServiceRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.MetadataExport(); - if (object.destinationGcsUri != null) - message.destinationGcsUri = String(object.destinationGcsUri); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.metastore.v1beta.MetadataExport.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.metastore.v1beta.MetadataExport.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "RUNNING": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - case "CANCELLED": - case 4: - message.state = 4; - break; - } - switch (object.databaseDumpType) { - default: - if (typeof object.databaseDumpType === "number") { - message.databaseDumpType = object.databaseDumpType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.databaseDumpType = 0; - break; - case "MYSQL": - case 1: - message.databaseDumpType = 1; - break; - } + var message = new $root.google.cloud.metastore.v1beta.DeleteServiceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a MetadataExport message. Also converts values to other types if specified. + * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.MetadataExport + * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest * @static - * @param {google.cloud.metastore.v1beta.MetadataExport} message MetadataExport + * @param {google.cloud.metastore.v1beta.DeleteServiceRequest} message DeleteServiceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetadataExport.toObject = function toObject(message, options) { + DeleteServiceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.startTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.databaseDumpType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.metastore.v1beta.MetadataExport.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1beta.MetadataExport.State[message.state] : message.state; - if (message.destinationGcsUri != null && message.hasOwnProperty("destinationGcsUri")) { - object.destinationGcsUri = message.destinationGcsUri; - if (options.oneofs) - object.destination = "destinationGcsUri"; + object.name = ""; + object.requestId = ""; } - if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) - object.databaseDumpType = options.enums === String ? $root.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type[message.databaseDumpType] === undefined ? message.databaseDumpType : $root.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type[message.databaseDumpType] : message.databaseDumpType; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this MetadataExport to JSON. + * Converts this DeleteServiceRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.MetadataExport + * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest * @instance * @returns {Object.} JSON object */ - MetadataExport.prototype.toJSON = function toJSON() { + DeleteServiceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetadataExport + * Gets the default type url for DeleteServiceRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.MetadataExport + * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetadataExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.MetadataExport"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.DeleteServiceRequest"; }; - /** - * State enum. - * @name google.cloud.metastore.v1beta.MetadataExport.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - * @property {number} CANCELLED=4 CANCELLED value - */ - MetadataExport.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "CANCELLED"] = 4; - return values; - })(); - - return MetadataExport; + return DeleteServiceRequest; })(); - v1beta.Backup = (function() { + v1beta.ListMetadataImportsRequest = (function() { /** - * Properties of a Backup. + * Properties of a ListMetadataImportsRequest. * @memberof google.cloud.metastore.v1beta - * @interface IBackup - * @property {string|null} [name] Backup name - * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime - * @property {google.protobuf.ITimestamp|null} [endTime] Backup endTime - * @property {google.cloud.metastore.v1beta.Backup.State|null} [state] Backup state - * @property {google.cloud.metastore.v1beta.IService|null} [serviceRevision] Backup serviceRevision - * @property {string|null} [description] Backup description + * @interface IListMetadataImportsRequest + * @property {string|null} [parent] ListMetadataImportsRequest parent + * @property {number|null} [pageSize] ListMetadataImportsRequest pageSize + * @property {string|null} [pageToken] ListMetadataImportsRequest pageToken + * @property {string|null} [filter] ListMetadataImportsRequest filter + * @property {string|null} [orderBy] ListMetadataImportsRequest orderBy */ /** - * Constructs a new Backup. + * Constructs a new ListMetadataImportsRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a Backup. - * @implements IBackup + * @classdesc Represents a ListMetadataImportsRequest. + * @implements IListMetadataImportsRequest * @constructor - * @param {google.cloud.metastore.v1beta.IBackup=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IListMetadataImportsRequest=} [properties] Properties to set */ - function Backup(properties) { + function ListMetadataImportsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27295,145 +38192,131 @@ } /** - * Backup name. - * @member {string} name - * @memberof google.cloud.metastore.v1beta.Backup - * @instance - */ - Backup.prototype.name = ""; - - /** - * Backup createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.metastore.v1beta.Backup + * ListMetadataImportsRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest * @instance */ - Backup.prototype.createTime = null; + ListMetadataImportsRequest.prototype.parent = ""; /** - * Backup endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.metastore.v1beta.Backup + * ListMetadataImportsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest * @instance */ - Backup.prototype.endTime = null; + ListMetadataImportsRequest.prototype.pageSize = 0; /** - * Backup state. - * @member {google.cloud.metastore.v1beta.Backup.State} state - * @memberof google.cloud.metastore.v1beta.Backup + * ListMetadataImportsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest * @instance */ - Backup.prototype.state = 0; + ListMetadataImportsRequest.prototype.pageToken = ""; /** - * Backup serviceRevision. - * @member {google.cloud.metastore.v1beta.IService|null|undefined} serviceRevision - * @memberof google.cloud.metastore.v1beta.Backup + * ListMetadataImportsRequest filter. + * @member {string} filter + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest * @instance */ - Backup.prototype.serviceRevision = null; + ListMetadataImportsRequest.prototype.filter = ""; /** - * Backup description. - * @member {string} description - * @memberof google.cloud.metastore.v1beta.Backup + * ListMetadataImportsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest * @instance */ - Backup.prototype.description = ""; + ListMetadataImportsRequest.prototype.orderBy = ""; /** - * Creates a new Backup instance using the specified properties. + * Creates a new ListMetadataImportsRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.Backup + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest * @static - * @param {google.cloud.metastore.v1beta.IBackup=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.Backup} Backup instance + * @param {google.cloud.metastore.v1beta.IListMetadataImportsRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.ListMetadataImportsRequest} ListMetadataImportsRequest instance */ - Backup.create = function create(properties) { - return new Backup(properties); + ListMetadataImportsRequest.create = function create(properties) { + return new ListMetadataImportsRequest(properties); }; /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.metastore.v1beta.Backup.verify|verify} messages. + * Encodes the specified ListMetadataImportsRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.Backup + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest * @static - * @param {google.cloud.metastore.v1beta.IBackup} message Backup message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListMetadataImportsRequest} message ListMetadataImportsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Backup.encode = function encode(message, writer) { + ListMetadataImportsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.serviceRevision != null && Object.hasOwnProperty.call(message, "serviceRevision")) - $root.google.cloud.metastore.v1beta.Service.encode(message.serviceRevision, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Backup.verify|verify} messages. + * Encodes the specified ListMetadataImportsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.Backup + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest * @static - * @param {google.cloud.metastore.v1beta.IBackup} message Backup message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListMetadataImportsRequest} message ListMetadataImportsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Backup.encodeDelimited = function encodeDelimited(message, writer) { + ListMetadataImportsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Backup message from the specified reader or buffer. + * Decodes a ListMetadataImportsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.Backup + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.Backup} Backup + * @returns {google.cloud.metastore.v1beta.ListMetadataImportsRequest} ListMetadataImportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Backup.decode = function decode(reader, length) { + ListMetadataImportsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.Backup(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ListMetadataImportsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } case 4: { - message.state = reader.int32(); + message.filter = reader.string(); break; } case 5: { - message.serviceRevision = $root.google.cloud.metastore.v1beta.Service.decode(reader, reader.uint32()); - break; - } - case 6: { - message.description = reader.string(); + message.orderBy = reader.string(); break; } default: @@ -27445,237 +38328,159 @@ }; /** - * Decodes a Backup message from the specified reader or buffer, length delimited. + * Decodes a ListMetadataImportsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.Backup + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.Backup} Backup + * @returns {google.cloud.metastore.v1beta.ListMetadataImportsRequest} ListMetadataImportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Backup.decodeDelimited = function decodeDelimited(reader) { + ListMetadataImportsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Backup message. + * Verifies a ListMetadataImportsRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.Backup + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Backup.verify = function verify(message) { + ListMetadataImportsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.serviceRevision != null && message.hasOwnProperty("serviceRevision")) { - var error = $root.google.cloud.metastore.v1beta.Service.verify(message.serviceRevision); - if (error) - return "serviceRevision." + error; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetadataImportsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.Backup - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.Backup} Backup - */ - Backup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.Backup) - return object; - var message = new $root.google.cloud.metastore.v1beta.Backup(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.metastore.v1beta.Backup.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.metastore.v1beta.Backup.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "DELETING": - case 2: - message.state = 2; - break; - case "ACTIVE": - case 3: - message.state = 3; - break; - case "FAILED": - case 4: - message.state = 4; - break; - } - if (object.serviceRevision != null) { - if (typeof object.serviceRevision !== "object") - throw TypeError(".google.cloud.metastore.v1beta.Backup.serviceRevision: object expected"); - message.serviceRevision = $root.google.cloud.metastore.v1beta.Service.fromObject(object.serviceRevision); - } - if (object.description != null) - message.description = String(object.description); + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1beta.ListMetadataImportsRequest} ListMetadataImportsRequest + */ + ListMetadataImportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.ListMetadataImportsRequest) + return object; + var message = new $root.google.cloud.metastore.v1beta.ListMetadataImportsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. + * Creates a plain object from a ListMetadataImportsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.Backup + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest * @static - * @param {google.cloud.metastore.v1beta.Backup} message Backup + * @param {google.cloud.metastore.v1beta.ListMetadataImportsRequest} message ListMetadataImportsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Backup.toObject = function toObject(message, options) { + ListMetadataImportsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.createTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.serviceRevision = null; - object.description = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.metastore.v1beta.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1beta.Backup.State[message.state] : message.state; - if (message.serviceRevision != null && message.hasOwnProperty("serviceRevision")) - object.serviceRevision = $root.google.cloud.metastore.v1beta.Service.toObject(message.serviceRevision, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this Backup to JSON. + * Converts this ListMetadataImportsRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.Backup + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest * @instance * @returns {Object.} JSON object */ - Backup.prototype.toJSON = function toJSON() { + ListMetadataImportsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Backup + * Gets the default type url for ListMetadataImportsRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.Backup + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListMetadataImportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.Backup"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.ListMetadataImportsRequest"; }; - /** - * State enum. - * @name google.cloud.metastore.v1beta.Backup.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} DELETING=2 DELETING value - * @property {number} ACTIVE=3 ACTIVE value - * @property {number} FAILED=4 FAILED value - */ - Backup.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "DELETING"] = 2; - values[valuesById[3] = "ACTIVE"] = 3; - values[valuesById[4] = "FAILED"] = 4; - return values; - })(); - - return Backup; + return ListMetadataImportsRequest; })(); - v1beta.Restore = (function() { + v1beta.ListMetadataImportsResponse = (function() { /** - * Properties of a Restore. + * Properties of a ListMetadataImportsResponse. * @memberof google.cloud.metastore.v1beta - * @interface IRestore - * @property {google.protobuf.ITimestamp|null} [startTime] Restore startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Restore endTime - * @property {google.cloud.metastore.v1beta.Restore.State|null} [state] Restore state - * @property {string|null} [backup] Restore backup - * @property {google.cloud.metastore.v1beta.Restore.RestoreType|null} [type] Restore type - * @property {string|null} [details] Restore details + * @interface IListMetadataImportsResponse + * @property {Array.|null} [metadataImports] ListMetadataImportsResponse metadataImports + * @property {string|null} [nextPageToken] ListMetadataImportsResponse nextPageToken + * @property {Array.|null} [unreachable] ListMetadataImportsResponse unreachable */ /** - * Constructs a new Restore. + * Constructs a new ListMetadataImportsResponse. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a Restore. - * @implements IRestore + * @classdesc Represents a ListMetadataImportsResponse. + * @implements IListMetadataImportsResponse * @constructor - * @param {google.cloud.metastore.v1beta.IRestore=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IListMetadataImportsResponse=} [properties] Properties to set */ - function Restore(properties) { + function ListMetadataImportsResponse(properties) { + this.metadataImports = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27683,145 +38488,109 @@ } /** - * Restore startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.metastore.v1beta.Restore - * @instance - */ - Restore.prototype.startTime = null; - - /** - * Restore endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.metastore.v1beta.Restore - * @instance - */ - Restore.prototype.endTime = null; - - /** - * Restore state. - * @member {google.cloud.metastore.v1beta.Restore.State} state - * @memberof google.cloud.metastore.v1beta.Restore - * @instance - */ - Restore.prototype.state = 0; - - /** - * Restore backup. - * @member {string} backup - * @memberof google.cloud.metastore.v1beta.Restore + * ListMetadataImportsResponse metadataImports. + * @member {Array.} metadataImports + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse * @instance */ - Restore.prototype.backup = ""; + ListMetadataImportsResponse.prototype.metadataImports = $util.emptyArray; /** - * Restore type. - * @member {google.cloud.metastore.v1beta.Restore.RestoreType} type - * @memberof google.cloud.metastore.v1beta.Restore + * ListMetadataImportsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse * @instance */ - Restore.prototype.type = 0; + ListMetadataImportsResponse.prototype.nextPageToken = ""; /** - * Restore details. - * @member {string} details - * @memberof google.cloud.metastore.v1beta.Restore + * ListMetadataImportsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse * @instance */ - Restore.prototype.details = ""; + ListMetadataImportsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new Restore instance using the specified properties. + * Creates a new ListMetadataImportsResponse instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.Restore + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse * @static - * @param {google.cloud.metastore.v1beta.IRestore=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.Restore} Restore instance + * @param {google.cloud.metastore.v1beta.IListMetadataImportsResponse=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.ListMetadataImportsResponse} ListMetadataImportsResponse instance */ - Restore.create = function create(properties) { - return new Restore(properties); + ListMetadataImportsResponse.create = function create(properties) { + return new ListMetadataImportsResponse(properties); }; /** - * Encodes the specified Restore message. Does not implicitly {@link google.cloud.metastore.v1beta.Restore.verify|verify} messages. + * Encodes the specified ListMetadataImportsResponse message. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.Restore + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse * @static - * @param {google.cloud.metastore.v1beta.IRestore} message Restore message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListMetadataImportsResponse} message ListMetadataImportsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Restore.encode = function encode(message, writer) { + ListMetadataImportsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.backup); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.details != null && Object.hasOwnProperty.call(message, "details")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.details); + if (message.metadataImports != null && message.metadataImports.length) + for (var i = 0; i < message.metadataImports.length; ++i) + $root.google.cloud.metastore.v1beta.MetadataImport.encode(message.metadataImports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified Restore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Restore.verify|verify} messages. + * Encodes the specified ListMetadataImportsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.Restore + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse * @static - * @param {google.cloud.metastore.v1beta.IRestore} message Restore message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListMetadataImportsResponse} message ListMetadataImportsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Restore.encodeDelimited = function encodeDelimited(message, writer) { + ListMetadataImportsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Restore message from the specified reader or buffer. + * Decodes a ListMetadataImportsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.Restore + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.Restore} Restore + * @returns {google.cloud.metastore.v1beta.ListMetadataImportsResponse} ListMetadataImportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Restore.decode = function decode(reader, length) { + ListMetadataImportsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.Restore(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ListMetadataImportsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.metadataImports && message.metadataImports.length)) + message.metadataImports = []; + message.metadataImports.push($root.google.cloud.metastore.v1beta.MetadataImport.decode(reader, reader.uint32())); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } case 3: { - message.state = reader.int32(); - break; - } - case 4: { - message.backup = reader.string(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.details = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -27833,271 +38602,169 @@ }; /** - * Decodes a Restore message from the specified reader or buffer, length delimited. + * Decodes a ListMetadataImportsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.Restore + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.Restore} Restore + * @returns {google.cloud.metastore.v1beta.ListMetadataImportsResponse} ListMetadataImportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Restore.decodeDelimited = function decodeDelimited(reader) { + ListMetadataImportsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Restore message. + * Verifies a ListMetadataImportsResponse message. * @function verify - * @memberof google.cloud.metastore.v1beta.Restore + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Restore.verify = function verify(message) { + ListMetadataImportsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; + if (message.metadataImports != null && message.hasOwnProperty("metadataImports")) { + if (!Array.isArray(message.metadataImports)) + return "metadataImports: array expected"; + for (var i = 0; i < message.metadataImports.length; ++i) { + var error = $root.google.cloud.metastore.v1beta.MetadataImport.verify(message.metadataImports[i]); + if (error) + return "metadataImports." + error; + } } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.backup != null && message.hasOwnProperty("backup")) - if (!$util.isString(message.backup)) - return "backup: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.details != null && message.hasOwnProperty("details")) - if (!$util.isString(message.details)) - return "details: string expected"; return null; }; /** - * Creates a Restore message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetadataImportsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.Restore + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.Restore} Restore + * @returns {google.cloud.metastore.v1beta.ListMetadataImportsResponse} ListMetadataImportsResponse */ - Restore.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.Restore) + ListMetadataImportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.ListMetadataImportsResponse) return object; - var message = new $root.google.cloud.metastore.v1beta.Restore(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.metastore.v1beta.Restore.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.metastore.v1beta.Restore.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; + var message = new $root.google.cloud.metastore.v1beta.ListMetadataImportsResponse(); + if (object.metadataImports) { + if (!Array.isArray(object.metadataImports)) + throw TypeError(".google.cloud.metastore.v1beta.ListMetadataImportsResponse.metadataImports: array expected"); + message.metadataImports = []; + for (var i = 0; i < object.metadataImports.length; ++i) { + if (typeof object.metadataImports[i] !== "object") + throw TypeError(".google.cloud.metastore.v1beta.ListMetadataImportsResponse.metadataImports: object expected"); + message.metadataImports[i] = $root.google.cloud.metastore.v1beta.MetadataImport.fromObject(object.metadataImports[i]); } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "RUNNING": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - case "CANCELLED": - case 4: - message.state = 4; - break; } - if (object.backup != null) - message.backup = String(object.backup); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "RESTORE_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "FULL": - case 1: - message.type = 1; - break; - case "METADATA_ONLY": - case 2: - message.type = 2; - break; + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.metastore.v1beta.ListMetadataImportsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.details != null) - message.details = String(object.details); return message; }; /** - * Creates a plain object from a Restore message. Also converts values to other types if specified. + * Creates a plain object from a ListMetadataImportsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.Restore + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse * @static - * @param {google.cloud.metastore.v1beta.Restore} message Restore + * @param {google.cloud.metastore.v1beta.ListMetadataImportsResponse} message ListMetadataImportsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Restore.toObject = function toObject(message, options) { + ListMetadataImportsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.startTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.backup = ""; - object.type = options.enums === String ? "RESTORE_TYPE_UNSPECIFIED" : 0; - object.details = ""; + if (options.arrays || options.defaults) { + object.metadataImports = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.metadataImports && message.metadataImports.length) { + object.metadataImports = []; + for (var j = 0; j < message.metadataImports.length; ++j) + object.metadataImports[j] = $root.google.cloud.metastore.v1beta.MetadataImport.toObject(message.metadataImports[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.metastore.v1beta.Restore.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1beta.Restore.State[message.state] : message.state; - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = message.backup; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.metastore.v1beta.Restore.RestoreType[message.type] === undefined ? message.type : $root.google.cloud.metastore.v1beta.Restore.RestoreType[message.type] : message.type; - if (message.details != null && message.hasOwnProperty("details")) - object.details = message.details; return object; }; /** - * Converts this Restore to JSON. + * Converts this ListMetadataImportsResponse to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.Restore + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse * @instance * @returns {Object.} JSON object */ - Restore.prototype.toJSON = function toJSON() { + ListMetadataImportsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Restore + * Gets the default type url for ListMetadataImportsResponse * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.Restore + * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Restore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListMetadataImportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.Restore"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.ListMetadataImportsResponse"; }; - /** - * State enum. - * @name google.cloud.metastore.v1beta.Restore.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - * @property {number} CANCELLED=4 CANCELLED value - */ - Restore.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "CANCELLED"] = 4; - return values; - })(); - - /** - * RestoreType enum. - * @name google.cloud.metastore.v1beta.Restore.RestoreType - * @enum {number} - * @property {number} RESTORE_TYPE_UNSPECIFIED=0 RESTORE_TYPE_UNSPECIFIED value - * @property {number} FULL=1 FULL value - * @property {number} METADATA_ONLY=2 METADATA_ONLY value - */ - Restore.RestoreType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESTORE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FULL"] = 1; - values[valuesById[2] = "METADATA_ONLY"] = 2; - return values; - })(); - - return Restore; + return ListMetadataImportsResponse; })(); - v1beta.ListServicesRequest = (function() { + v1beta.GetMetadataImportRequest = (function() { /** - * Properties of a ListServicesRequest. + * Properties of a GetMetadataImportRequest. * @memberof google.cloud.metastore.v1beta - * @interface IListServicesRequest - * @property {string|null} [parent] ListServicesRequest parent - * @property {number|null} [pageSize] ListServicesRequest pageSize - * @property {string|null} [pageToken] ListServicesRequest pageToken - * @property {string|null} [filter] ListServicesRequest filter - * @property {string|null} [orderBy] ListServicesRequest orderBy + * @interface IGetMetadataImportRequest + * @property {string|null} [name] GetMetadataImportRequest name */ /** - * Constructs a new ListServicesRequest. + * Constructs a new GetMetadataImportRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a ListServicesRequest. - * @implements IListServicesRequest + * @classdesc Represents a GetMetadataImportRequest. + * @implements IGetMetadataImportRequest * @constructor - * @param {google.cloud.metastore.v1beta.IListServicesRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IGetMetadataImportRequest=} [properties] Properties to set */ - function ListServicesRequest(properties) { + function GetMetadataImportRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28105,131 +38772,75 @@ } /** - * ListServicesRequest parent. - * @member {string} parent - * @memberof google.cloud.metastore.v1beta.ListServicesRequest - * @instance - */ - ListServicesRequest.prototype.parent = ""; - - /** - * ListServicesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.metastore.v1beta.ListServicesRequest - * @instance - */ - ListServicesRequest.prototype.pageSize = 0; - - /** - * ListServicesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.metastore.v1beta.ListServicesRequest - * @instance - */ - ListServicesRequest.prototype.pageToken = ""; - - /** - * ListServicesRequest filter. - * @member {string} filter - * @memberof google.cloud.metastore.v1beta.ListServicesRequest - * @instance - */ - ListServicesRequest.prototype.filter = ""; - - /** - * ListServicesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.metastore.v1beta.ListServicesRequest + * GetMetadataImportRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest * @instance */ - ListServicesRequest.prototype.orderBy = ""; + GetMetadataImportRequest.prototype.name = ""; /** - * Creates a new ListServicesRequest instance using the specified properties. + * Creates a new GetMetadataImportRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.ListServicesRequest + * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest * @static - * @param {google.cloud.metastore.v1beta.IListServicesRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.ListServicesRequest} ListServicesRequest instance + * @param {google.cloud.metastore.v1beta.IGetMetadataImportRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.GetMetadataImportRequest} GetMetadataImportRequest instance */ - ListServicesRequest.create = function create(properties) { - return new ListServicesRequest(properties); + GetMetadataImportRequest.create = function create(properties) { + return new GetMetadataImportRequest(properties); }; /** - * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesRequest.verify|verify} messages. + * Encodes the specified GetMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.GetMetadataImportRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.ListServicesRequest + * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest * @static - * @param {google.cloud.metastore.v1beta.IListServicesRequest} message ListServicesRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IGetMetadataImportRequest} message GetMetadataImportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesRequest.encode = function encode(message, writer) { + GetMetadataImportRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesRequest.verify|verify} messages. + * Encodes the specified GetMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.GetMetadataImportRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.ListServicesRequest + * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest * @static - * @param {google.cloud.metastore.v1beta.IListServicesRequest} message ListServicesRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IGetMetadataImportRequest} message GetMetadataImportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListServicesRequest message from the specified reader or buffer. + * Decodes a GetMetadataImportRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.ListServicesRequest + * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.ListServicesRequest} ListServicesRequest + * @returns {google.cloud.metastore.v1beta.GetMetadataImportRequest} GetMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesRequest.decode = function decode(reader, length) { + GetMetadataImportRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ListServicesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.GetMetadataImportRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.name = reader.string(); break; } default: @@ -28241,159 +38852,125 @@ }; /** - * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetMetadataImportRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.ListServicesRequest + * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.ListServicesRequest} ListServicesRequest + * @returns {google.cloud.metastore.v1beta.GetMetadataImportRequest} GetMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesRequest.decodeDelimited = function decodeDelimited(reader) { + GetMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListServicesRequest message. + * Verifies a GetMetadataImportRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.ListServicesRequest + * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListServicesRequest.verify = function verify(message) { + GetMetadataImportRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.ListServicesRequest + * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.ListServicesRequest} ListServicesRequest + * @returns {google.cloud.metastore.v1beta.GetMetadataImportRequest} GetMetadataImportRequest */ - ListServicesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.ListServicesRequest) + GetMetadataImportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.GetMetadataImportRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.ListServicesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.metastore.v1beta.GetMetadataImportRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetMetadataImportRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.ListServicesRequest + * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest * @static - * @param {google.cloud.metastore.v1beta.ListServicesRequest} message ListServicesRequest + * @param {google.cloud.metastore.v1beta.GetMetadataImportRequest} message GetMetadataImportRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListServicesRequest.toObject = function toObject(message, options) { + GetMetadataImportRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListServicesRequest to JSON. + * Converts this GetMetadataImportRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.ListServicesRequest + * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest * @instance * @returns {Object.} JSON object */ - ListServicesRequest.prototype.toJSON = function toJSON() { + GetMetadataImportRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListServicesRequest + * Gets the default type url for GetMetadataImportRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.ListServicesRequest + * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListServicesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.ListServicesRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.GetMetadataImportRequest"; }; - return ListServicesRequest; + return GetMetadataImportRequest; })(); - v1beta.ListServicesResponse = (function() { + v1beta.CreateMetadataImportRequest = (function() { /** - * Properties of a ListServicesResponse. + * Properties of a CreateMetadataImportRequest. * @memberof google.cloud.metastore.v1beta - * @interface IListServicesResponse - * @property {Array.|null} [services] ListServicesResponse services - * @property {string|null} [nextPageToken] ListServicesResponse nextPageToken - * @property {Array.|null} [unreachable] ListServicesResponse unreachable + * @interface ICreateMetadataImportRequest + * @property {string|null} [parent] CreateMetadataImportRequest parent + * @property {string|null} [metadataImportId] CreateMetadataImportRequest metadataImportId + * @property {google.cloud.metastore.v1beta.IMetadataImport|null} [metadataImport] CreateMetadataImportRequest metadataImport + * @property {string|null} [requestId] CreateMetadataImportRequest requestId */ /** - * Constructs a new ListServicesResponse. + * Constructs a new CreateMetadataImportRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a ListServicesResponse. - * @implements IListServicesResponse + * @classdesc Represents a CreateMetadataImportRequest. + * @implements ICreateMetadataImportRequest * @constructor - * @param {google.cloud.metastore.v1beta.IListServicesResponse=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.ICreateMetadataImportRequest=} [properties] Properties to set */ - function ListServicesResponse(properties) { - this.services = []; - this.unreachable = []; + function CreateMetadataImportRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28401,109 +38978,117 @@ } /** - * ListServicesResponse services. - * @member {Array.} services - * @memberof google.cloud.metastore.v1beta.ListServicesResponse + * CreateMetadataImportRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest * @instance */ - ListServicesResponse.prototype.services = $util.emptyArray; + CreateMetadataImportRequest.prototype.parent = ""; /** - * ListServicesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.metastore.v1beta.ListServicesResponse + * CreateMetadataImportRequest metadataImportId. + * @member {string} metadataImportId + * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest * @instance */ - ListServicesResponse.prototype.nextPageToken = ""; + CreateMetadataImportRequest.prototype.metadataImportId = ""; /** - * ListServicesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.metastore.v1beta.ListServicesResponse + * CreateMetadataImportRequest metadataImport. + * @member {google.cloud.metastore.v1beta.IMetadataImport|null|undefined} metadataImport + * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest * @instance */ - ListServicesResponse.prototype.unreachable = $util.emptyArray; + CreateMetadataImportRequest.prototype.metadataImport = null; /** - * Creates a new ListServicesResponse instance using the specified properties. + * CreateMetadataImportRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + * @instance + */ + CreateMetadataImportRequest.prototype.requestId = ""; + + /** + * Creates a new CreateMetadataImportRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.ListServicesResponse + * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1beta.IListServicesResponse=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.ListServicesResponse} ListServicesResponse instance + * @param {google.cloud.metastore.v1beta.ICreateMetadataImportRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.CreateMetadataImportRequest} CreateMetadataImportRequest instance */ - ListServicesResponse.create = function create(properties) { - return new ListServicesResponse(properties); + CreateMetadataImportRequest.create = function create(properties) { + return new CreateMetadataImportRequest(properties); }; /** - * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesResponse.verify|verify} messages. + * Encodes the specified CreateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.CreateMetadataImportRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.ListServicesResponse + * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1beta.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {google.cloud.metastore.v1beta.ICreateMetadataImportRequest} message CreateMetadataImportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesResponse.encode = function encode(message, writer) { + CreateMetadataImportRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.services != null && message.services.length) - for (var i = 0; i < message.services.length; ++i) - $root.google.cloud.metastore.v1beta.Service.encode(message.services[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.metadataImportId != null && Object.hasOwnProperty.call(message, "metadataImportId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataImportId); + if (message.metadataImport != null && Object.hasOwnProperty.call(message, "metadataImport")) + $root.google.cloud.metastore.v1beta.MetadataImport.encode(message.metadataImport, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; /** - * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListServicesResponse.verify|verify} messages. + * Encodes the specified CreateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.CreateMetadataImportRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.ListServicesResponse + * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1beta.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {google.cloud.metastore.v1beta.ICreateMetadataImportRequest} message CreateMetadataImportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListServicesResponse message from the specified reader or buffer. + * Decodes a CreateMetadataImportRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.ListServicesResponse + * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.ListServicesResponse} ListServicesResponse + * @returns {google.cloud.metastore.v1beta.CreateMetadataImportRequest} CreateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesResponse.decode = function decode(reader, length) { + CreateMetadataImportRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ListServicesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.CreateMetadataImportRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.services && message.services.length)) - message.services = []; - message.services.push($root.google.cloud.metastore.v1beta.Service.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.metadataImportId = reader.string(); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.metadataImport = $root.google.cloud.metastore.v1beta.MetadataImport.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); break; } default: @@ -28515,169 +39100,154 @@ }; /** - * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateMetadataImportRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.ListServicesResponse + * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.ListServicesResponse} ListServicesResponse + * @returns {google.cloud.metastore.v1beta.CreateMetadataImportRequest} CreateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesResponse.decodeDelimited = function decodeDelimited(reader) { + CreateMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListServicesResponse message. + * Verifies a CreateMetadataImportRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.ListServicesResponse + * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListServicesResponse.verify = function verify(message) { + CreateMetadataImportRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.services != null && message.hasOwnProperty("services")) { - if (!Array.isArray(message.services)) - return "services: array expected"; - for (var i = 0; i < message.services.length; ++i) { - var error = $root.google.cloud.metastore.v1beta.Service.verify(message.services[i]); - if (error) - return "services." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.metadataImportId != null && message.hasOwnProperty("metadataImportId")) + if (!$util.isString(message.metadataImportId)) + return "metadataImportId: string expected"; + if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) { + var error = $root.google.cloud.metastore.v1beta.MetadataImport.verify(message.metadataImport); + if (error) + return "metadataImport." + error; } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.ListServicesResponse + * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.ListServicesResponse} ListServicesResponse + * @returns {google.cloud.metastore.v1beta.CreateMetadataImportRequest} CreateMetadataImportRequest */ - ListServicesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.ListServicesResponse) + CreateMetadataImportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.CreateMetadataImportRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.ListServicesResponse(); - if (object.services) { - if (!Array.isArray(object.services)) - throw TypeError(".google.cloud.metastore.v1beta.ListServicesResponse.services: array expected"); - message.services = []; - for (var i = 0; i < object.services.length; ++i) { - if (typeof object.services[i] !== "object") - throw TypeError(".google.cloud.metastore.v1beta.ListServicesResponse.services: object expected"); - message.services[i] = $root.google.cloud.metastore.v1beta.Service.fromObject(object.services[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.metastore.v1beta.ListServicesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); + var message = new $root.google.cloud.metastore.v1beta.CreateMetadataImportRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.metadataImportId != null) + message.metadataImportId = String(object.metadataImportId); + if (object.metadataImport != null) { + if (typeof object.metadataImport !== "object") + throw TypeError(".google.cloud.metastore.v1beta.CreateMetadataImportRequest.metadataImport: object expected"); + message.metadataImport = $root.google.cloud.metastore.v1beta.MetadataImport.fromObject(object.metadataImport); } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateMetadataImportRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.ListServicesResponse + * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1beta.ListServicesResponse} message ListServicesResponse + * @param {google.cloud.metastore.v1beta.CreateMetadataImportRequest} message CreateMetadataImportRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListServicesResponse.toObject = function toObject(message, options) { + CreateMetadataImportRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.services = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.services && message.services.length) { - object.services = []; - for (var j = 0; j < message.services.length; ++j) - object.services[j] = $root.google.cloud.metastore.v1beta.Service.toObject(message.services[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.parent = ""; + object.metadataImportId = ""; + object.metadataImport = null; + object.requestId = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.metadataImportId != null && message.hasOwnProperty("metadataImportId")) + object.metadataImportId = message.metadataImportId; + if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) + object.metadataImport = $root.google.cloud.metastore.v1beta.MetadataImport.toObject(message.metadataImport, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this ListServicesResponse to JSON. + * Converts this CreateMetadataImportRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.ListServicesResponse + * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest * @instance * @returns {Object.} JSON object */ - ListServicesResponse.prototype.toJSON = function toJSON() { + CreateMetadataImportRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListServicesResponse + * Gets the default type url for CreateMetadataImportRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.ListServicesResponse + * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListServicesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.ListServicesResponse"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.CreateMetadataImportRequest"; }; - return ListServicesResponse; + return CreateMetadataImportRequest; })(); - v1beta.GetServiceRequest = (function() { + v1beta.UpdateMetadataImportRequest = (function() { /** - * Properties of a GetServiceRequest. + * Properties of an UpdateMetadataImportRequest. * @memberof google.cloud.metastore.v1beta - * @interface IGetServiceRequest - * @property {string|null} [name] GetServiceRequest name + * @interface IUpdateMetadataImportRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMetadataImportRequest updateMask + * @property {google.cloud.metastore.v1beta.IMetadataImport|null} [metadataImport] UpdateMetadataImportRequest metadataImport + * @property {string|null} [requestId] UpdateMetadataImportRequest requestId */ /** - * Constructs a new GetServiceRequest. + * Constructs a new UpdateMetadataImportRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a GetServiceRequest. - * @implements IGetServiceRequest + * @classdesc Represents an UpdateMetadataImportRequest. + * @implements IUpdateMetadataImportRequest * @constructor - * @param {google.cloud.metastore.v1beta.IGetServiceRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IUpdateMetadataImportRequest=} [properties] Properties to set */ - function GetServiceRequest(properties) { + function UpdateMetadataImportRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28685,75 +39255,103 @@ } /** - * GetServiceRequest name. - * @member {string} name - * @memberof google.cloud.metastore.v1beta.GetServiceRequest + * UpdateMetadataImportRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * @instance + */ + UpdateMetadataImportRequest.prototype.updateMask = null; + + /** + * UpdateMetadataImportRequest metadataImport. + * @member {google.cloud.metastore.v1beta.IMetadataImport|null|undefined} metadataImport + * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * @instance + */ + UpdateMetadataImportRequest.prototype.metadataImport = null; + + /** + * UpdateMetadataImportRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest * @instance */ - GetServiceRequest.prototype.name = ""; + UpdateMetadataImportRequest.prototype.requestId = ""; /** - * Creates a new GetServiceRequest instance using the specified properties. + * Creates a new UpdateMetadataImportRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.GetServiceRequest + * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1beta.IGetServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.GetServiceRequest} GetServiceRequest instance + * @param {google.cloud.metastore.v1beta.IUpdateMetadataImportRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.UpdateMetadataImportRequest} UpdateMetadataImportRequest instance */ - GetServiceRequest.create = function create(properties) { - return new GetServiceRequest(properties); + UpdateMetadataImportRequest.create = function create(properties) { + return new UpdateMetadataImportRequest(properties); }; /** - * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.GetServiceRequest.verify|verify} messages. + * Encodes the specified UpdateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateMetadataImportRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.GetServiceRequest + * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1beta.IGetServiceRequest} message GetServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IUpdateMetadataImportRequest} message UpdateMetadataImportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetServiceRequest.encode = function encode(message, writer) { + UpdateMetadataImportRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metadataImport != null && Object.hasOwnProperty.call(message, "metadataImport")) + $root.google.cloud.metastore.v1beta.MetadataImport.encode(message.metadataImport, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.GetServiceRequest.verify|verify} messages. + * Encodes the specified UpdateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateMetadataImportRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.GetServiceRequest + * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1beta.IGetServiceRequest} message GetServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IUpdateMetadataImportRequest} message UpdateMetadataImportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetServiceRequest message from the specified reader or buffer. + * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.GetServiceRequest + * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.GetServiceRequest} GetServiceRequest + * @returns {google.cloud.metastore.v1beta.UpdateMetadataImportRequest} UpdateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetServiceRequest.decode = function decode(reader, length) { + UpdateMetadataImportRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.GetServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.UpdateMetadataImportRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.metadataImport = $root.google.cloud.metastore.v1beta.MetadataImport.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); break; } default: @@ -28765,125 +39363,153 @@ }; /** - * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.GetServiceRequest + * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.GetServiceRequest} GetServiceRequest + * @returns {google.cloud.metastore.v1beta.UpdateMetadataImportRequest} UpdateMetadataImportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetServiceRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetServiceRequest message. + * Verifies an UpdateMetadataImportRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.GetServiceRequest + * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetServiceRequest.verify = function verify(message) { + UpdateMetadataImportRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) { + var error = $root.google.cloud.metastore.v1beta.MetadataImport.verify(message.metadataImport); + if (error) + return "metadataImport." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.GetServiceRequest + * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.GetServiceRequest} GetServiceRequest + * @returns {google.cloud.metastore.v1beta.UpdateMetadataImportRequest} UpdateMetadataImportRequest */ - GetServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.GetServiceRequest) + UpdateMetadataImportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.UpdateMetadataImportRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.GetServiceRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.metastore.v1beta.UpdateMetadataImportRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.metastore.v1beta.UpdateMetadataImportRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.metadataImport != null) { + if (typeof object.metadataImport !== "object") + throw TypeError(".google.cloud.metastore.v1beta.UpdateMetadataImportRequest.metadataImport: object expected"); + message.metadataImport = $root.google.cloud.metastore.v1beta.MetadataImport.fromObject(object.metadataImport); + } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateMetadataImportRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.GetServiceRequest + * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest * @static - * @param {google.cloud.metastore.v1beta.GetServiceRequest} message GetServiceRequest + * @param {google.cloud.metastore.v1beta.UpdateMetadataImportRequest} message UpdateMetadataImportRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetServiceRequest.toObject = function toObject(message, options) { + UpdateMetadataImportRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.updateMask = null; + object.metadataImport = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) + object.metadataImport = $root.google.cloud.metastore.v1beta.MetadataImport.toObject(message.metadataImport, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this GetServiceRequest to JSON. + * Converts this UpdateMetadataImportRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.GetServiceRequest + * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest * @instance * @returns {Object.} JSON object */ - GetServiceRequest.prototype.toJSON = function toJSON() { + UpdateMetadataImportRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetServiceRequest + * Gets the default type url for UpdateMetadataImportRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.GetServiceRequest + * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.GetServiceRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.UpdateMetadataImportRequest"; }; - return GetServiceRequest; + return UpdateMetadataImportRequest; })(); - v1beta.CreateServiceRequest = (function() { + v1beta.ListBackupsRequest = (function() { /** - * Properties of a CreateServiceRequest. + * Properties of a ListBackupsRequest. * @memberof google.cloud.metastore.v1beta - * @interface ICreateServiceRequest - * @property {string|null} [parent] CreateServiceRequest parent - * @property {string|null} [serviceId] CreateServiceRequest serviceId - * @property {google.cloud.metastore.v1beta.IService|null} [service] CreateServiceRequest service - * @property {string|null} [requestId] CreateServiceRequest requestId + * @interface IListBackupsRequest + * @property {string|null} [parent] ListBackupsRequest parent + * @property {number|null} [pageSize] ListBackupsRequest pageSize + * @property {string|null} [pageToken] ListBackupsRequest pageToken + * @property {string|null} [filter] ListBackupsRequest filter + * @property {string|null} [orderBy] ListBackupsRequest orderBy */ /** - * Constructs a new CreateServiceRequest. + * Constructs a new ListBackupsRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a CreateServiceRequest. - * @implements ICreateServiceRequest + * @classdesc Represents a ListBackupsRequest. + * @implements IListBackupsRequest * @constructor - * @param {google.cloud.metastore.v1beta.ICreateServiceRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IListBackupsRequest=} [properties] Properties to set */ - function CreateServiceRequest(properties) { + function ListBackupsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28891,100 +39517,110 @@ } /** - * CreateServiceRequest parent. + * ListBackupsRequest parent. * @member {string} parent - * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest * @instance */ - CreateServiceRequest.prototype.parent = ""; + ListBackupsRequest.prototype.parent = ""; /** - * CreateServiceRequest serviceId. - * @member {string} serviceId - * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * ListBackupsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest * @instance */ - CreateServiceRequest.prototype.serviceId = ""; + ListBackupsRequest.prototype.pageSize = 0; /** - * CreateServiceRequest service. - * @member {google.cloud.metastore.v1beta.IService|null|undefined} service - * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * ListBackupsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest * @instance */ - CreateServiceRequest.prototype.service = null; + ListBackupsRequest.prototype.pageToken = ""; /** - * CreateServiceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * ListBackupsRequest filter. + * @member {string} filter + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest * @instance */ - CreateServiceRequest.prototype.requestId = ""; + ListBackupsRequest.prototype.filter = ""; /** - * Creates a new CreateServiceRequest instance using the specified properties. + * ListBackupsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListBackupsRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest * @static - * @param {google.cloud.metastore.v1beta.ICreateServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.CreateServiceRequest} CreateServiceRequest instance + * @param {google.cloud.metastore.v1beta.IListBackupsRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.ListBackupsRequest} ListBackupsRequest instance */ - CreateServiceRequest.create = function create(properties) { - return new CreateServiceRequest(properties); + ListBackupsRequest.create = function create(properties) { + return new ListBackupsRequest(properties); }; /** - * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.CreateServiceRequest.verify|verify} messages. + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest * @static - * @param {google.cloud.metastore.v1beta.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListBackupsRequest} message ListBackupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateServiceRequest.encode = function encode(message, writer) { + ListBackupsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.serviceId != null && Object.hasOwnProperty.call(message, "serviceId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceId); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - $root.google.cloud.metastore.v1beta.Service.encode(message.service, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.CreateServiceRequest.verify|verify} messages. + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest * @static - * @param {google.cloud.metastore.v1beta.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListBackupsRequest} message ListBackupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer. + * Decodes a ListBackupsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.CreateServiceRequest} CreateServiceRequest + * @returns {google.cloud.metastore.v1beta.ListBackupsRequest} ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateServiceRequest.decode = function decode(reader, length) { + ListBackupsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.CreateServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ListBackupsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -28993,15 +39629,19 @@ break; } case 2: { - message.serviceId = reader.string(); + message.pageSize = reader.int32(); break; } case 3: { - message.service = $root.google.cloud.metastore.v1beta.Service.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } case 4: { - message.requestId = reader.string(); + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -29013,154 +39653,159 @@ }; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.CreateServiceRequest} CreateServiceRequest + * @returns {google.cloud.metastore.v1beta.ListBackupsRequest} ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateServiceRequest.decodeDelimited = function decodeDelimited(reader) { + ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateServiceRequest message. + * Verifies a ListBackupsRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateServiceRequest.verify = function verify(message) { + ListBackupsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.serviceId != null && message.hasOwnProperty("serviceId")) - if (!$util.isString(message.serviceId)) - return "serviceId: string expected"; - if (message.service != null && message.hasOwnProperty("service")) { - var error = $root.google.cloud.metastore.v1beta.Service.verify(message.service); - if (error) - return "service." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.CreateServiceRequest} CreateServiceRequest + * @returns {google.cloud.metastore.v1beta.ListBackupsRequest} ListBackupsRequest */ - CreateServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.CreateServiceRequest) + ListBackupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.ListBackupsRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.CreateServiceRequest(); + var message = new $root.google.cloud.metastore.v1beta.ListBackupsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.serviceId != null) - message.serviceId = String(object.serviceId); - if (object.service != null) { - if (typeof object.service !== "object") - throw TypeError(".google.cloud.metastore.v1beta.CreateServiceRequest.service: object expected"); - message.service = $root.google.cloud.metastore.v1beta.Service.fromObject(object.service); - } - if (object.requestId != null) - message.requestId = String(object.requestId); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest * @static - * @param {google.cloud.metastore.v1beta.CreateServiceRequest} message CreateServiceRequest + * @param {google.cloud.metastore.v1beta.ListBackupsRequest} message ListBackupsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateServiceRequest.toObject = function toObject(message, options) { + ListBackupsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.serviceId = ""; - object.service = null; - object.requestId = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.serviceId != null && message.hasOwnProperty("serviceId")) - object.serviceId = message.serviceId; - if (message.service != null && message.hasOwnProperty("service")) - object.service = $root.google.cloud.metastore.v1beta.Service.toObject(message.service, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this CreateServiceRequest to JSON. + * Converts this ListBackupsRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest * @instance * @returns {Object.} JSON object */ - CreateServiceRequest.prototype.toJSON = function toJSON() { + ListBackupsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateServiceRequest + * Gets the default type url for ListBackupsRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.CreateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.CreateServiceRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.ListBackupsRequest"; }; - return CreateServiceRequest; + return ListBackupsRequest; })(); - v1beta.UpdateServiceRequest = (function() { + v1beta.ListBackupsResponse = (function() { /** - * Properties of an UpdateServiceRequest. + * Properties of a ListBackupsResponse. * @memberof google.cloud.metastore.v1beta - * @interface IUpdateServiceRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateServiceRequest updateMask - * @property {google.cloud.metastore.v1beta.IService|null} [service] UpdateServiceRequest service - * @property {string|null} [requestId] UpdateServiceRequest requestId + * @interface IListBackupsResponse + * @property {Array.|null} [backups] ListBackupsResponse backups + * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupsResponse unreachable */ /** - * Constructs a new UpdateServiceRequest. + * Constructs a new ListBackupsResponse. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents an UpdateServiceRequest. - * @implements IUpdateServiceRequest + * @classdesc Represents a ListBackupsResponse. + * @implements IListBackupsResponse * @constructor - * @param {google.cloud.metastore.v1beta.IUpdateServiceRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IListBackupsResponse=} [properties] Properties to set */ - function UpdateServiceRequest(properties) { + function ListBackupsResponse(properties) { + this.backups = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29168,103 +39813,109 @@ } /** - * UpdateServiceRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest + * ListBackupsResponse backups. + * @member {Array.} backups + * @memberof google.cloud.metastore.v1beta.ListBackupsResponse * @instance */ - UpdateServiceRequest.prototype.updateMask = null; + ListBackupsResponse.prototype.backups = $util.emptyArray; /** - * UpdateServiceRequest service. - * @member {google.cloud.metastore.v1beta.IService|null|undefined} service - * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest + * ListBackupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.metastore.v1beta.ListBackupsResponse * @instance */ - UpdateServiceRequest.prototype.service = null; + ListBackupsResponse.prototype.nextPageToken = ""; /** - * UpdateServiceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest + * ListBackupsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.metastore.v1beta.ListBackupsResponse * @instance */ - UpdateServiceRequest.prototype.requestId = ""; + ListBackupsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new UpdateServiceRequest instance using the specified properties. + * Creates a new ListBackupsResponse instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsResponse * @static - * @param {google.cloud.metastore.v1beta.IUpdateServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.UpdateServiceRequest} UpdateServiceRequest instance + * @param {google.cloud.metastore.v1beta.IListBackupsResponse=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.ListBackupsResponse} ListBackupsResponse instance */ - UpdateServiceRequest.create = function create(properties) { - return new UpdateServiceRequest(properties); + ListBackupsResponse.create = function create(properties) { + return new ListBackupsResponse(properties); }; /** - * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateServiceRequest.verify|verify} messages. + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsResponse * @static - * @param {google.cloud.metastore.v1beta.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListBackupsResponse} message ListBackupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateServiceRequest.encode = function encode(message, writer) { + ListBackupsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - $root.google.cloud.metastore.v1beta.Service.encode(message.service, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.backups != null && message.backups.length) + for (var i = 0; i < message.backups.length; ++i) + $root.google.cloud.metastore.v1beta.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateServiceRequest.verify|verify} messages. + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsResponse * @static - * @param {google.cloud.metastore.v1beta.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListBackupsResponse} message ListBackupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer. + * Decodes a ListBackupsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.UpdateServiceRequest} UpdateServiceRequest + * @returns {google.cloud.metastore.v1beta.ListBackupsResponse} ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateServiceRequest.decode = function decode(reader, length) { + ListBackupsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.UpdateServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ListBackupsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.google.cloud.metastore.v1beta.Backup.decode(reader, reader.uint32())); break; } case 2: { - message.service = $root.google.cloud.metastore.v1beta.Service.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } case 3: { - message.requestId = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -29276,150 +39927,169 @@ }; /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.UpdateServiceRequest} UpdateServiceRequest + * @returns {google.cloud.metastore.v1beta.ListBackupsResponse} ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateServiceRequest.decodeDelimited = function decodeDelimited(reader) { + ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateServiceRequest message. + * Verifies a ListBackupsResponse message. * @function verify - * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateServiceRequest.verify = function verify(message) { + ListBackupsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.backups != null && message.hasOwnProperty("backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (var i = 0; i < message.backups.length; ++i) { + var error = $root.google.cloud.metastore.v1beta.Backup.verify(message.backups[i]); + if (error) + return "backups." + error; + } } - if (message.service != null && message.hasOwnProperty("service")) { - var error = $root.google.cloud.metastore.v1beta.Service.verify(message.service); - if (error) - return "service." + error; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates an UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.UpdateServiceRequest} UpdateServiceRequest + * @returns {google.cloud.metastore.v1beta.ListBackupsResponse} ListBackupsResponse */ - UpdateServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.UpdateServiceRequest) + ListBackupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.ListBackupsResponse) return object; - var message = new $root.google.cloud.metastore.v1beta.UpdateServiceRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.metastore.v1beta.UpdateServiceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.metastore.v1beta.ListBackupsResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".google.cloud.metastore.v1beta.ListBackupsResponse.backups: array expected"); + message.backups = []; + for (var i = 0; i < object.backups.length; ++i) { + if (typeof object.backups[i] !== "object") + throw TypeError(".google.cloud.metastore.v1beta.ListBackupsResponse.backups: object expected"); + message.backups[i] = $root.google.cloud.metastore.v1beta.Backup.fromObject(object.backups[i]); + } } - if (object.service != null) { - if (typeof object.service !== "object") - throw TypeError(".google.cloud.metastore.v1beta.UpdateServiceRequest.service: object expected"); - message.service = $root.google.cloud.metastore.v1beta.Service.fromObject(object.service); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.metastore.v1beta.ListBackupsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsResponse * @static - * @param {google.cloud.metastore.v1beta.UpdateServiceRequest} message UpdateServiceRequest + * @param {google.cloud.metastore.v1beta.ListBackupsResponse} message ListBackupsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateServiceRequest.toObject = function toObject(message, options) { + ListBackupsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.service = null; - object.requestId = ""; + if (options.arrays || options.defaults) { + object.backups = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backups && message.backups.length) { + object.backups = []; + for (var j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.google.cloud.metastore.v1beta.Backup.toObject(message.backups[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.service != null && message.hasOwnProperty("service")) - object.service = $root.google.cloud.metastore.v1beta.Service.toObject(message.service, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; return object; }; /** - * Converts this UpdateServiceRequest to JSON. + * Converts this ListBackupsResponse to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsResponse * @instance * @returns {Object.} JSON object */ - UpdateServiceRequest.prototype.toJSON = function toJSON() { + ListBackupsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateServiceRequest + * Gets the default type url for ListBackupsResponse * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.UpdateServiceRequest + * @memberof google.cloud.metastore.v1beta.ListBackupsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.UpdateServiceRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.ListBackupsResponse"; }; - return UpdateServiceRequest; + return ListBackupsResponse; })(); - v1beta.DeleteServiceRequest = (function() { + v1beta.GetBackupRequest = (function() { /** - * Properties of a DeleteServiceRequest. + * Properties of a GetBackupRequest. * @memberof google.cloud.metastore.v1beta - * @interface IDeleteServiceRequest - * @property {string|null} [name] DeleteServiceRequest name - * @property {string|null} [requestId] DeleteServiceRequest requestId + * @interface IGetBackupRequest + * @property {string|null} [name] GetBackupRequest name */ /** - * Constructs a new DeleteServiceRequest. + * Constructs a new GetBackupRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a DeleteServiceRequest. - * @implements IDeleteServiceRequest + * @classdesc Represents a GetBackupRequest. + * @implements IGetBackupRequest * @constructor - * @param {google.cloud.metastore.v1beta.IDeleteServiceRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IGetBackupRequest=} [properties] Properties to set */ - function DeleteServiceRequest(properties) { + function GetBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29427,80 +40097,70 @@ } /** - * DeleteServiceRequest name. + * GetBackupRequest name. * @member {string} name - * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest - * @instance - */ - DeleteServiceRequest.prototype.name = ""; - - /** - * DeleteServiceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest + * @memberof google.cloud.metastore.v1beta.GetBackupRequest * @instance */ - DeleteServiceRequest.prototype.requestId = ""; + GetBackupRequest.prototype.name = ""; /** - * Creates a new DeleteServiceRequest instance using the specified properties. + * Creates a new GetBackupRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest + * @memberof google.cloud.metastore.v1beta.GetBackupRequest * @static - * @param {google.cloud.metastore.v1beta.IDeleteServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.DeleteServiceRequest} DeleteServiceRequest instance + * @param {google.cloud.metastore.v1beta.IGetBackupRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.GetBackupRequest} GetBackupRequest instance */ - DeleteServiceRequest.create = function create(properties) { - return new DeleteServiceRequest(properties); + GetBackupRequest.create = function create(properties) { + return new GetBackupRequest(properties); }; /** - * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteServiceRequest.verify|verify} messages. + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.GetBackupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest + * @memberof google.cloud.metastore.v1beta.GetBackupRequest * @static - * @param {google.cloud.metastore.v1beta.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IGetBackupRequest} message GetBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteServiceRequest.encode = function encode(message, writer) { + GetBackupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteServiceRequest.verify|verify} messages. + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.GetBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest + * @memberof google.cloud.metastore.v1beta.GetBackupRequest * @static - * @param {google.cloud.metastore.v1beta.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IGetBackupRequest} message GetBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * Decodes a GetBackupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest + * @memberof google.cloud.metastore.v1beta.GetBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.DeleteServiceRequest} DeleteServiceRequest + * @returns {google.cloud.metastore.v1beta.GetBackupRequest} GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteServiceRequest.decode = function decode(reader, length) { + GetBackupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.DeleteServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.GetBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -29508,10 +40168,6 @@ message.name = reader.string(); break; } - case 2: { - message.requestId = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -29521,135 +40177,125 @@ }; /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest + * @memberof google.cloud.metastore.v1beta.GetBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.DeleteServiceRequest} DeleteServiceRequest + * @returns {google.cloud.metastore.v1beta.GetBackupRequest} GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteServiceRequest.decodeDelimited = function decodeDelimited(reader) { + GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteServiceRequest message. + * Verifies a GetBackupRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest + * @memberof google.cloud.metastore.v1beta.GetBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteServiceRequest.verify = function verify(message) { + GetBackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest + * @memberof google.cloud.metastore.v1beta.GetBackupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.DeleteServiceRequest} DeleteServiceRequest + * @returns {google.cloud.metastore.v1beta.GetBackupRequest} GetBackupRequest */ - DeleteServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.DeleteServiceRequest) + GetBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.GetBackupRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.DeleteServiceRequest(); + var message = new $root.google.cloud.metastore.v1beta.GetBackupRequest(); if (object.name != null) message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest + * @memberof google.cloud.metastore.v1beta.GetBackupRequest * @static - * @param {google.cloud.metastore.v1beta.DeleteServiceRequest} message DeleteServiceRequest + * @param {google.cloud.metastore.v1beta.GetBackupRequest} message GetBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteServiceRequest.toObject = function toObject(message, options) { + GetBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.requestId = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; return object; }; /** - * Converts this DeleteServiceRequest to JSON. + * Converts this GetBackupRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest + * @memberof google.cloud.metastore.v1beta.GetBackupRequest * @instance * @returns {Object.} JSON object */ - DeleteServiceRequest.prototype.toJSON = function toJSON() { + GetBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteServiceRequest + * Gets the default type url for GetBackupRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.DeleteServiceRequest + * @memberof google.cloud.metastore.v1beta.GetBackupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.DeleteServiceRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.GetBackupRequest"; }; - return DeleteServiceRequest; + return GetBackupRequest; })(); - v1beta.ListMetadataImportsRequest = (function() { + v1beta.CreateBackupRequest = (function() { /** - * Properties of a ListMetadataImportsRequest. + * Properties of a CreateBackupRequest. * @memberof google.cloud.metastore.v1beta - * @interface IListMetadataImportsRequest - * @property {string|null} [parent] ListMetadataImportsRequest parent - * @property {number|null} [pageSize] ListMetadataImportsRequest pageSize - * @property {string|null} [pageToken] ListMetadataImportsRequest pageToken - * @property {string|null} [filter] ListMetadataImportsRequest filter - * @property {string|null} [orderBy] ListMetadataImportsRequest orderBy + * @interface ICreateBackupRequest + * @property {string|null} [parent] CreateBackupRequest parent + * @property {string|null} [backupId] CreateBackupRequest backupId + * @property {google.cloud.metastore.v1beta.IBackup|null} [backup] CreateBackupRequest backup + * @property {string|null} [requestId] CreateBackupRequest requestId */ /** - * Constructs a new ListMetadataImportsRequest. + * Constructs a new CreateBackupRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a ListMetadataImportsRequest. - * @implements IListMetadataImportsRequest + * @classdesc Represents a CreateBackupRequest. + * @implements ICreateBackupRequest * @constructor - * @param {google.cloud.metastore.v1beta.IListMetadataImportsRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.ICreateBackupRequest=} [properties] Properties to set */ - function ListMetadataImportsRequest(properties) { + function CreateBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29657,110 +40303,100 @@ } /** - * ListMetadataImportsRequest parent. + * CreateBackupRequest parent. * @member {string} parent - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest - * @instance - */ - ListMetadataImportsRequest.prototype.parent = ""; - - /** - * ListMetadataImportsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1beta.CreateBackupRequest * @instance */ - ListMetadataImportsRequest.prototype.pageSize = 0; + CreateBackupRequest.prototype.parent = ""; /** - * ListMetadataImportsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * CreateBackupRequest backupId. + * @member {string} backupId + * @memberof google.cloud.metastore.v1beta.CreateBackupRequest * @instance */ - ListMetadataImportsRequest.prototype.pageToken = ""; + CreateBackupRequest.prototype.backupId = ""; /** - * ListMetadataImportsRequest filter. - * @member {string} filter - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * CreateBackupRequest backup. + * @member {google.cloud.metastore.v1beta.IBackup|null|undefined} backup + * @memberof google.cloud.metastore.v1beta.CreateBackupRequest * @instance */ - ListMetadataImportsRequest.prototype.filter = ""; + CreateBackupRequest.prototype.backup = null; /** - * ListMetadataImportsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * CreateBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1beta.CreateBackupRequest * @instance */ - ListMetadataImportsRequest.prototype.orderBy = ""; + CreateBackupRequest.prototype.requestId = ""; /** - * Creates a new ListMetadataImportsRequest instance using the specified properties. + * Creates a new CreateBackupRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1beta.CreateBackupRequest * @static - * @param {google.cloud.metastore.v1beta.IListMetadataImportsRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.ListMetadataImportsRequest} ListMetadataImportsRequest instance + * @param {google.cloud.metastore.v1beta.ICreateBackupRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.CreateBackupRequest} CreateBackupRequest instance */ - ListMetadataImportsRequest.create = function create(properties) { - return new ListMetadataImportsRequest(properties); + CreateBackupRequest.create = function create(properties) { + return new CreateBackupRequest(properties); }; /** - * Encodes the specified ListMetadataImportsRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsRequest.verify|verify} messages. + * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.CreateBackupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1beta.CreateBackupRequest * @static - * @param {google.cloud.metastore.v1beta.IListMetadataImportsRequest} message ListMetadataImportsRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetadataImportsRequest.encode = function encode(message, writer) { + CreateBackupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupId); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + $root.google.cloud.metastore.v1beta.Backup.encode(message.backup, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; /** - * Encodes the specified ListMetadataImportsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsRequest.verify|verify} messages. + * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.CreateBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1beta.CreateBackupRequest * @static - * @param {google.cloud.metastore.v1beta.IListMetadataImportsRequest} message ListMetadataImportsRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetadataImportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMetadataImportsRequest message from the specified reader or buffer. + * Decodes a CreateBackupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1beta.CreateBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.ListMetadataImportsRequest} ListMetadataImportsRequest + * @returns {google.cloud.metastore.v1beta.CreateBackupRequest} CreateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetadataImportsRequest.decode = function decode(reader, length) { + CreateBackupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ListMetadataImportsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.CreateBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -29769,19 +40405,15 @@ break; } case 2: { - message.pageSize = reader.int32(); + message.backupId = reader.string(); break; } case 3: { - message.pageToken = reader.string(); + message.backup = $root.google.cloud.metastore.v1beta.Backup.decode(reader, reader.uint32()); break; } case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.requestId = reader.string(); break; } default: @@ -29793,159 +40425,153 @@ }; /** - * Decodes a ListMetadataImportsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1beta.CreateBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.ListMetadataImportsRequest} ListMetadataImportsRequest + * @returns {google.cloud.metastore.v1beta.CreateBackupRequest} CreateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetadataImportsRequest.decodeDelimited = function decodeDelimited(reader) { + CreateBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMetadataImportsRequest message. + * Verifies a CreateBackupRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1beta.CreateBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMetadataImportsRequest.verify = function verify(message) { + CreateBackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.backupId != null && message.hasOwnProperty("backupId")) + if (!$util.isString(message.backupId)) + return "backupId: string expected"; + if (message.backup != null && message.hasOwnProperty("backup")) { + var error = $root.google.cloud.metastore.v1beta.Backup.verify(message.backup); + if (error) + return "backup." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a ListMetadataImportsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1beta.CreateBackupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.ListMetadataImportsRequest} ListMetadataImportsRequest + * @returns {google.cloud.metastore.v1beta.CreateBackupRequest} CreateBackupRequest */ - ListMetadataImportsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.ListMetadataImportsRequest) + CreateBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.CreateBackupRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.ListMetadataImportsRequest(); + var message = new $root.google.cloud.metastore.v1beta.CreateBackupRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + if (object.backupId != null) + message.backupId = String(object.backupId); + if (object.backup != null) { + if (typeof object.backup !== "object") + throw TypeError(".google.cloud.metastore.v1beta.CreateBackupRequest.backup: object expected"); + message.backup = $root.google.cloud.metastore.v1beta.Backup.fromObject(object.backup); + } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a ListMetadataImportsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1beta.CreateBackupRequest * @static - * @param {google.cloud.metastore.v1beta.ListMetadataImportsRequest} message ListMetadataImportsRequest + * @param {google.cloud.metastore.v1beta.CreateBackupRequest} message CreateBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMetadataImportsRequest.toObject = function toObject(message, options) { + CreateBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + object.backupId = ""; + object.backup = null; + object.requestId = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (message.backupId != null && message.hasOwnProperty("backupId")) + object.backupId = message.backupId; + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = $root.google.cloud.metastore.v1beta.Backup.toObject(message.backup, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this ListMetadataImportsRequest to JSON. + * Converts this CreateBackupRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1beta.CreateBackupRequest * @instance * @returns {Object.} JSON object */ - ListMetadataImportsRequest.prototype.toJSON = function toJSON() { + CreateBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListMetadataImportsRequest + * Gets the default type url for CreateBackupRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsRequest + * @memberof google.cloud.metastore.v1beta.CreateBackupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListMetadataImportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.ListMetadataImportsRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.CreateBackupRequest"; }; - return ListMetadataImportsRequest; + return CreateBackupRequest; })(); - v1beta.ListMetadataImportsResponse = (function() { + v1beta.DeleteBackupRequest = (function() { /** - * Properties of a ListMetadataImportsResponse. - * @memberof google.cloud.metastore.v1beta - * @interface IListMetadataImportsResponse - * @property {Array.|null} [metadataImports] ListMetadataImportsResponse metadataImports - * @property {string|null} [nextPageToken] ListMetadataImportsResponse nextPageToken - * @property {Array.|null} [unreachable] ListMetadataImportsResponse unreachable + * Properties of a DeleteBackupRequest. + * @memberof google.cloud.metastore.v1beta + * @interface IDeleteBackupRequest + * @property {string|null} [name] DeleteBackupRequest name + * @property {string|null} [requestId] DeleteBackupRequest requestId */ /** - * Constructs a new ListMetadataImportsResponse. + * Constructs a new DeleteBackupRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a ListMetadataImportsResponse. - * @implements IListMetadataImportsResponse + * @classdesc Represents a DeleteBackupRequest. + * @implements IDeleteBackupRequest * @constructor - * @param {google.cloud.metastore.v1beta.IListMetadataImportsResponse=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IDeleteBackupRequest=} [properties] Properties to set */ - function ListMetadataImportsResponse(properties) { - this.metadataImports = []; - this.unreachable = []; + function DeleteBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29953,109 +40579,89 @@ } /** - * ListMetadataImportsResponse metadataImports. - * @member {Array.} metadataImports - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse - * @instance - */ - ListMetadataImportsResponse.prototype.metadataImports = $util.emptyArray; - - /** - * ListMetadataImportsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse + * DeleteBackupRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest * @instance */ - ListMetadataImportsResponse.prototype.nextPageToken = ""; + DeleteBackupRequest.prototype.name = ""; /** - * ListMetadataImportsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse + * DeleteBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest * @instance */ - ListMetadataImportsResponse.prototype.unreachable = $util.emptyArray; + DeleteBackupRequest.prototype.requestId = ""; /** - * Creates a new ListMetadataImportsResponse instance using the specified properties. + * Creates a new DeleteBackupRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest * @static - * @param {google.cloud.metastore.v1beta.IListMetadataImportsResponse=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.ListMetadataImportsResponse} ListMetadataImportsResponse instance + * @param {google.cloud.metastore.v1beta.IDeleteBackupRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.DeleteBackupRequest} DeleteBackupRequest instance */ - ListMetadataImportsResponse.create = function create(properties) { - return new ListMetadataImportsResponse(properties); + DeleteBackupRequest.create = function create(properties) { + return new DeleteBackupRequest(properties); }; /** - * Encodes the specified ListMetadataImportsResponse message. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsResponse.verify|verify} messages. + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteBackupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest * @static - * @param {google.cloud.metastore.v1beta.IListMetadataImportsResponse} message ListMetadataImportsResponse message or plain object to encode + * @param {google.cloud.metastore.v1beta.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetadataImportsResponse.encode = function encode(message, writer) { + DeleteBackupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metadataImports != null && message.metadataImports.length) - for (var i = 0; i < message.metadataImports.length; ++i) - $root.google.cloud.metastore.v1beta.MetadataImport.encode(message.metadataImports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified ListMetadataImportsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListMetadataImportsResponse.verify|verify} messages. + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest * @static - * @param {google.cloud.metastore.v1beta.IListMetadataImportsResponse} message ListMetadataImportsResponse message or plain object to encode + * @param {google.cloud.metastore.v1beta.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetadataImportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMetadataImportsResponse message from the specified reader or buffer. + * Decodes a DeleteBackupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.ListMetadataImportsResponse} ListMetadataImportsResponse + * @returns {google.cloud.metastore.v1beta.DeleteBackupRequest} DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetadataImportsResponse.decode = function decode(reader, length) { + DeleteBackupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ListMetadataImportsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.DeleteBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.metadataImports && message.metadataImports.length)) - message.metadataImports = []; - message.metadataImports.push($root.google.cloud.metastore.v1beta.MetadataImport.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.requestId = reader.string(); break; } default: @@ -30067,169 +40673,134 @@ }; /** - * Decodes a ListMetadataImportsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.ListMetadataImportsResponse} ListMetadataImportsResponse + * @returns {google.cloud.metastore.v1beta.DeleteBackupRequest} DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetadataImportsResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMetadataImportsResponse message. + * Verifies a DeleteBackupRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMetadataImportsResponse.verify = function verify(message) { + DeleteBackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metadataImports != null && message.hasOwnProperty("metadataImports")) { - if (!Array.isArray(message.metadataImports)) - return "metadataImports: array expected"; - for (var i = 0; i < message.metadataImports.length; ++i) { - var error = $root.google.cloud.metastore.v1beta.MetadataImport.verify(message.metadataImports[i]); - if (error) - return "metadataImports." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a ListMetadataImportsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.ListMetadataImportsResponse} ListMetadataImportsResponse + * @returns {google.cloud.metastore.v1beta.DeleteBackupRequest} DeleteBackupRequest */ - ListMetadataImportsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.ListMetadataImportsResponse) + DeleteBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.DeleteBackupRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.ListMetadataImportsResponse(); - if (object.metadataImports) { - if (!Array.isArray(object.metadataImports)) - throw TypeError(".google.cloud.metastore.v1beta.ListMetadataImportsResponse.metadataImports: array expected"); - message.metadataImports = []; - for (var i = 0; i < object.metadataImports.length; ++i) { - if (typeof object.metadataImports[i] !== "object") - throw TypeError(".google.cloud.metastore.v1beta.ListMetadataImportsResponse.metadataImports: object expected"); - message.metadataImports[i] = $root.google.cloud.metastore.v1beta.MetadataImport.fromObject(object.metadataImports[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.metastore.v1beta.ListMetadataImportsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + var message = new $root.google.cloud.metastore.v1beta.DeleteBackupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a ListMetadataImportsResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest * @static - * @param {google.cloud.metastore.v1beta.ListMetadataImportsResponse} message ListMetadataImportsResponse + * @param {google.cloud.metastore.v1beta.DeleteBackupRequest} message DeleteBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMetadataImportsResponse.toObject = function toObject(message, options) { + DeleteBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.metadataImports = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.metadataImports && message.metadataImports.length) { - object.metadataImports = []; - for (var j = 0; j < message.metadataImports.length; ++j) - object.metadataImports[j] = $root.google.cloud.metastore.v1beta.MetadataImport.toObject(message.metadataImports[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.name = ""; + object.requestId = ""; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this ListMetadataImportsResponse to JSON. + * Converts this DeleteBackupRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest * @instance * @returns {Object.} JSON object */ - ListMetadataImportsResponse.prototype.toJSON = function toJSON() { + DeleteBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListMetadataImportsResponse + * Gets the default type url for DeleteBackupRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.ListMetadataImportsResponse + * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListMetadataImportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.ListMetadataImportsResponse"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.DeleteBackupRequest"; }; - return ListMetadataImportsResponse; + return DeleteBackupRequest; })(); - v1beta.GetMetadataImportRequest = (function() { + v1beta.ExportMetadataRequest = (function() { /** - * Properties of a GetMetadataImportRequest. + * Properties of an ExportMetadataRequest. * @memberof google.cloud.metastore.v1beta - * @interface IGetMetadataImportRequest - * @property {string|null} [name] GetMetadataImportRequest name + * @interface IExportMetadataRequest + * @property {string|null} [destinationGcsFolder] ExportMetadataRequest destinationGcsFolder + * @property {string|null} [service] ExportMetadataRequest service + * @property {string|null} [requestId] ExportMetadataRequest requestId + * @property {google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|null} [databaseDumpType] ExportMetadataRequest databaseDumpType */ /** - * Constructs a new GetMetadataImportRequest. + * Constructs a new ExportMetadataRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a GetMetadataImportRequest. - * @implements IGetMetadataImportRequest + * @classdesc Represents an ExportMetadataRequest. + * @implements IExportMetadataRequest * @constructor - * @param {google.cloud.metastore.v1beta.IGetMetadataImportRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IExportMetadataRequest=} [properties] Properties to set */ - function GetMetadataImportRequest(properties) { + function ExportMetadataRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30237,75 +40808,131 @@ } /** - * GetMetadataImportRequest name. - * @member {string} name - * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest + * ExportMetadataRequest destinationGcsFolder. + * @member {string|null|undefined} destinationGcsFolder + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest * @instance */ - GetMetadataImportRequest.prototype.name = ""; + ExportMetadataRequest.prototype.destinationGcsFolder = null; /** - * Creates a new GetMetadataImportRequest instance using the specified properties. + * ExportMetadataRequest service. + * @member {string} service + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * @instance + */ + ExportMetadataRequest.prototype.service = ""; + + /** + * ExportMetadataRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * @instance + */ + ExportMetadataRequest.prototype.requestId = ""; + + /** + * ExportMetadataRequest databaseDumpType. + * @member {google.cloud.metastore.v1beta.DatabaseDumpSpec.Type} databaseDumpType + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * @instance + */ + ExportMetadataRequest.prototype.databaseDumpType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExportMetadataRequest destination. + * @member {"destinationGcsFolder"|undefined} destination + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * @instance + */ + Object.defineProperty(ExportMetadataRequest.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["destinationGcsFolder"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportMetadataRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest * @static - * @param {google.cloud.metastore.v1beta.IGetMetadataImportRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.GetMetadataImportRequest} GetMetadataImportRequest instance + * @param {google.cloud.metastore.v1beta.IExportMetadataRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.ExportMetadataRequest} ExportMetadataRequest instance */ - GetMetadataImportRequest.create = function create(properties) { - return new GetMetadataImportRequest(properties); + ExportMetadataRequest.create = function create(properties) { + return new ExportMetadataRequest(properties); }; /** - * Encodes the specified GetMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.GetMetadataImportRequest.verify|verify} messages. + * Encodes the specified ExportMetadataRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ExportMetadataRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest * @static - * @param {google.cloud.metastore.v1beta.IGetMetadataImportRequest} message GetMetadataImportRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IExportMetadataRequest} message ExportMetadataRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMetadataImportRequest.encode = function encode(message, writer) { + ExportMetadataRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.destinationGcsFolder != null && Object.hasOwnProperty.call(message, "destinationGcsFolder")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationGcsFolder); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.databaseDumpType != null && Object.hasOwnProperty.call(message, "databaseDumpType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.databaseDumpType); return writer; }; /** - * Encodes the specified GetMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.GetMetadataImportRequest.verify|verify} messages. + * Encodes the specified ExportMetadataRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ExportMetadataRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest * @static - * @param {google.cloud.metastore.v1beta.IGetMetadataImportRequest} message GetMetadataImportRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IExportMetadataRequest} message ExportMetadataRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExportMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetMetadataImportRequest message from the specified reader or buffer. + * Decodes an ExportMetadataRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.GetMetadataImportRequest} GetMetadataImportRequest + * @returns {google.cloud.metastore.v1beta.ExportMetadataRequest} ExportMetadataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetMetadataImportRequest.decode = function decode(reader, length) { + ExportMetadataRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.GetMetadataImportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ExportMetadataRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: { + message.destinationGcsFolder = reader.string(); + break; + } case 1: { - message.name = reader.string(); + message.service = reader.string(); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + case 4: { + message.databaseDumpType = reader.int32(); break; } default: @@ -30317,125 +40944,179 @@ }; /** - * Decodes a GetMetadataImportRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportMetadataRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.GetMetadataImportRequest} GetMetadataImportRequest + * @returns {google.cloud.metastore.v1beta.ExportMetadataRequest} ExportMetadataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { + ExportMetadataRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetMetadataImportRequest message. + * Verifies an ExportMetadataRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetMetadataImportRequest.verify = function verify(message) { + ExportMetadataRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + var properties = {}; + if (message.destinationGcsFolder != null && message.hasOwnProperty("destinationGcsFolder")) { + properties.destination = 1; + if (!$util.isString(message.destinationGcsFolder)) + return "destinationGcsFolder: string expected"; + } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) + switch (message.databaseDumpType) { + default: + return "databaseDumpType: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a GetMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportMetadataRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.GetMetadataImportRequest} GetMetadataImportRequest + * @returns {google.cloud.metastore.v1beta.ExportMetadataRequest} ExportMetadataRequest */ - GetMetadataImportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.GetMetadataImportRequest) + ExportMetadataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.ExportMetadataRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.GetMetadataImportRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.metastore.v1beta.ExportMetadataRequest(); + if (object.destinationGcsFolder != null) + message.destinationGcsFolder = String(object.destinationGcsFolder); + if (object.service != null) + message.service = String(object.service); + if (object.requestId != null) + message.requestId = String(object.requestId); + switch (object.databaseDumpType) { + default: + if (typeof object.databaseDumpType === "number") { + message.databaseDumpType = object.databaseDumpType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.databaseDumpType = 0; + break; + case "MYSQL": + case 1: + message.databaseDumpType = 1; + break; + case "AVRO": + case 2: + message.databaseDumpType = 2; + break; + } return message; }; /** - * Creates a plain object from a GetMetadataImportRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExportMetadataRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest * @static - * @param {google.cloud.metastore.v1beta.GetMetadataImportRequest} message GetMetadataImportRequest + * @param {google.cloud.metastore.v1beta.ExportMetadataRequest} message ExportMetadataRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetMetadataImportRequest.toObject = function toObject(message, options) { + ExportMetadataRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.service = ""; + object.requestId = ""; + object.databaseDumpType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.destinationGcsFolder != null && message.hasOwnProperty("destinationGcsFolder")) { + object.destinationGcsFolder = message.destinationGcsFolder; + if (options.oneofs) + object.destination = "destinationGcsFolder"; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) + object.databaseDumpType = options.enums === String ? $root.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type[message.databaseDumpType] === undefined ? message.databaseDumpType : $root.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type[message.databaseDumpType] : message.databaseDumpType; return object; }; /** - * Converts this GetMetadataImportRequest to JSON. + * Converts this ExportMetadataRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest * @instance * @returns {Object.} JSON object */ - GetMetadataImportRequest.prototype.toJSON = function toJSON() { + ExportMetadataRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetMetadataImportRequest + * Gets the default type url for ExportMetadataRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.GetMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportMetadataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.GetMetadataImportRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.ExportMetadataRequest"; }; - return GetMetadataImportRequest; + return ExportMetadataRequest; })(); - v1beta.CreateMetadataImportRequest = (function() { + v1beta.RestoreServiceRequest = (function() { /** - * Properties of a CreateMetadataImportRequest. + * Properties of a RestoreServiceRequest. * @memberof google.cloud.metastore.v1beta - * @interface ICreateMetadataImportRequest - * @property {string|null} [parent] CreateMetadataImportRequest parent - * @property {string|null} [metadataImportId] CreateMetadataImportRequest metadataImportId - * @property {google.cloud.metastore.v1beta.IMetadataImport|null} [metadataImport] CreateMetadataImportRequest metadataImport - * @property {string|null} [requestId] CreateMetadataImportRequest requestId + * @interface IRestoreServiceRequest + * @property {string|null} [service] RestoreServiceRequest service + * @property {string|null} [backup] RestoreServiceRequest backup + * @property {google.cloud.metastore.v1beta.Restore.RestoreType|null} [restoreType] RestoreServiceRequest restoreType + * @property {string|null} [requestId] RestoreServiceRequest requestId */ /** - * Constructs a new CreateMetadataImportRequest. + * Constructs a new RestoreServiceRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a CreateMetadataImportRequest. - * @implements ICreateMetadataImportRequest + * @classdesc Represents a RestoreServiceRequest. + * @implements IRestoreServiceRequest * @constructor - * @param {google.cloud.metastore.v1beta.ICreateMetadataImportRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IRestoreServiceRequest=} [properties] Properties to set */ - function CreateMetadataImportRequest(properties) { + function RestoreServiceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30443,113 +41124,113 @@ } /** - * CreateMetadataImportRequest parent. - * @member {string} parent - * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + * RestoreServiceRequest service. + * @member {string} service + * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest * @instance */ - CreateMetadataImportRequest.prototype.parent = ""; + RestoreServiceRequest.prototype.service = ""; - /** - * CreateMetadataImportRequest metadataImportId. - * @member {string} metadataImportId - * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + /** + * RestoreServiceRequest backup. + * @member {string} backup + * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest * @instance */ - CreateMetadataImportRequest.prototype.metadataImportId = ""; + RestoreServiceRequest.prototype.backup = ""; /** - * CreateMetadataImportRequest metadataImport. - * @member {google.cloud.metastore.v1beta.IMetadataImport|null|undefined} metadataImport - * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + * RestoreServiceRequest restoreType. + * @member {google.cloud.metastore.v1beta.Restore.RestoreType} restoreType + * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest * @instance */ - CreateMetadataImportRequest.prototype.metadataImport = null; + RestoreServiceRequest.prototype.restoreType = 0; /** - * CreateMetadataImportRequest requestId. + * RestoreServiceRequest requestId. * @member {string} requestId - * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest * @instance */ - CreateMetadataImportRequest.prototype.requestId = ""; + RestoreServiceRequest.prototype.requestId = ""; /** - * Creates a new CreateMetadataImportRequest instance using the specified properties. + * Creates a new RestoreServiceRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest * @static - * @param {google.cloud.metastore.v1beta.ICreateMetadataImportRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.CreateMetadataImportRequest} CreateMetadataImportRequest instance + * @param {google.cloud.metastore.v1beta.IRestoreServiceRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.RestoreServiceRequest} RestoreServiceRequest instance */ - CreateMetadataImportRequest.create = function create(properties) { - return new CreateMetadataImportRequest(properties); + RestoreServiceRequest.create = function create(properties) { + return new RestoreServiceRequest(properties); }; /** - * Encodes the specified CreateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.CreateMetadataImportRequest.verify|verify} messages. + * Encodes the specified RestoreServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.RestoreServiceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest * @static - * @param {google.cloud.metastore.v1beta.ICreateMetadataImportRequest} message CreateMetadataImportRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IRestoreServiceRequest} message RestoreServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMetadataImportRequest.encode = function encode(message, writer) { + RestoreServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.metadataImportId != null && Object.hasOwnProperty.call(message, "metadataImportId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataImportId); - if (message.metadataImport != null && Object.hasOwnProperty.call(message, "metadataImport")) - $root.google.cloud.metastore.v1beta.MetadataImport.encode(message.metadataImport, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backup); + if (message.restoreType != null && Object.hasOwnProperty.call(message, "restoreType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.restoreType); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; /** - * Encodes the specified CreateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.CreateMetadataImportRequest.verify|verify} messages. + * Encodes the specified RestoreServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.RestoreServiceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest * @static - * @param {google.cloud.metastore.v1beta.ICreateMetadataImportRequest} message CreateMetadataImportRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IRestoreServiceRequest} message RestoreServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { + RestoreServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateMetadataImportRequest message from the specified reader or buffer. + * Decodes a RestoreServiceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.CreateMetadataImportRequest} CreateMetadataImportRequest + * @returns {google.cloud.metastore.v1beta.RestoreServiceRequest} RestoreServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMetadataImportRequest.decode = function decode(reader, length) { + RestoreServiceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.CreateMetadataImportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.RestoreServiceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.service = reader.string(); break; } case 2: { - message.metadataImportId = reader.string(); + message.backup = reader.string(); break; } case 3: { - message.metadataImport = $root.google.cloud.metastore.v1beta.MetadataImport.decode(reader, reader.uint32()); + message.restoreType = reader.int32(); break; } case 4: { @@ -30565,43 +41246,47 @@ }; /** - * Decodes a CreateMetadataImportRequest message from the specified reader or buffer, length delimited. + * Decodes a RestoreServiceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.CreateMetadataImportRequest} CreateMetadataImportRequest + * @returns {google.cloud.metastore.v1beta.RestoreServiceRequest} RestoreServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { + RestoreServiceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateMetadataImportRequest message. + * Verifies a RestoreServiceRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateMetadataImportRequest.verify = function verify(message) { + RestoreServiceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.metadataImportId != null && message.hasOwnProperty("metadataImportId")) - if (!$util.isString(message.metadataImportId)) - return "metadataImportId: string expected"; - if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) { - var error = $root.google.cloud.metastore.v1beta.MetadataImport.verify(message.metadataImport); - if (error) - return "metadataImport." + error; - } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.backup != null && message.hasOwnProperty("backup")) + if (!$util.isString(message.backup)) + return "backup: string expected"; + if (message.restoreType != null && message.hasOwnProperty("restoreType")) + switch (message.restoreType) { + default: + return "restoreType: enum value expected"; + case 0: + case 1: + case 2: + break; + } if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; @@ -30609,25 +41294,40 @@ }; /** - * Creates a CreateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreServiceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.CreateMetadataImportRequest} CreateMetadataImportRequest + * @returns {google.cloud.metastore.v1beta.RestoreServiceRequest} RestoreServiceRequest */ - CreateMetadataImportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.CreateMetadataImportRequest) + RestoreServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.RestoreServiceRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.CreateMetadataImportRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.metadataImportId != null) - message.metadataImportId = String(object.metadataImportId); - if (object.metadataImport != null) { - if (typeof object.metadataImport !== "object") - throw TypeError(".google.cloud.metastore.v1beta.CreateMetadataImportRequest.metadataImport: object expected"); - message.metadataImport = $root.google.cloud.metastore.v1beta.MetadataImport.fromObject(object.metadataImport); + var message = new $root.google.cloud.metastore.v1beta.RestoreServiceRequest(); + if (object.service != null) + message.service = String(object.service); + if (object.backup != null) + message.backup = String(object.backup); + switch (object.restoreType) { + default: + if (typeof object.restoreType === "number") { + message.restoreType = object.restoreType; + break; + } + break; + case "RESTORE_TYPE_UNSPECIFIED": + case 0: + message.restoreType = 0; + break; + case "FULL": + case 1: + message.restoreType = 1; + break; + case "METADATA_ONLY": + case 2: + message.restoreType = 2; + break; } if (object.requestId != null) message.requestId = String(object.requestId); @@ -30635,84 +41335,88 @@ }; /** - * Creates a plain object from a CreateMetadataImportRequest message. Also converts values to other types if specified. + * Creates a plain object from a RestoreServiceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest * @static - * @param {google.cloud.metastore.v1beta.CreateMetadataImportRequest} message CreateMetadataImportRequest + * @param {google.cloud.metastore.v1beta.RestoreServiceRequest} message RestoreServiceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateMetadataImportRequest.toObject = function toObject(message, options) { + RestoreServiceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.metadataImportId = ""; - object.metadataImport = null; + object.service = ""; + object.backup = ""; + object.restoreType = options.enums === String ? "RESTORE_TYPE_UNSPECIFIED" : 0; object.requestId = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.metadataImportId != null && message.hasOwnProperty("metadataImportId")) - object.metadataImportId = message.metadataImportId; - if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) - object.metadataImport = $root.google.cloud.metastore.v1beta.MetadataImport.toObject(message.metadataImport, options); + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = message.backup; + if (message.restoreType != null && message.hasOwnProperty("restoreType")) + object.restoreType = options.enums === String ? $root.google.cloud.metastore.v1beta.Restore.RestoreType[message.restoreType] === undefined ? message.restoreType : $root.google.cloud.metastore.v1beta.Restore.RestoreType[message.restoreType] : message.restoreType; if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; return object; }; /** - * Converts this CreateMetadataImportRequest to JSON. + * Converts this RestoreServiceRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest * @instance * @returns {Object.} JSON object */ - CreateMetadataImportRequest.prototype.toJSON = function toJSON() { + RestoreServiceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateMetadataImportRequest + * Gets the default type url for RestoreServiceRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.CreateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RestoreServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.CreateMetadataImportRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.RestoreServiceRequest"; }; - return CreateMetadataImportRequest; + return RestoreServiceRequest; })(); - v1beta.UpdateMetadataImportRequest = (function() { + v1beta.OperationMetadata = (function() { /** - * Properties of an UpdateMetadataImportRequest. + * Properties of an OperationMetadata. * @memberof google.cloud.metastore.v1beta - * @interface IUpdateMetadataImportRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMetadataImportRequest updateMask - * @property {google.cloud.metastore.v1beta.IMetadataImport|null} [metadataImport] UpdateMetadataImportRequest metadataImport - * @property {string|null} [requestId] UpdateMetadataImportRequest requestId + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion */ /** - * Constructs a new UpdateMetadataImportRequest. + * Constructs a new OperationMetadata. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents an UpdateMetadataImportRequest. - * @implements IUpdateMetadataImportRequest + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata * @constructor - * @param {google.cloud.metastore.v1beta.IUpdateMetadataImportRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IOperationMetadata=} [properties] Properties to set */ - function UpdateMetadataImportRequest(properties) { + function OperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30720,103 +41424,159 @@ } /** - * UpdateMetadataImportRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.metastore.v1beta.OperationMetadata * @instance */ - UpdateMetadataImportRequest.prototype.updateMask = null; + OperationMetadata.prototype.createTime = null; /** - * UpdateMetadataImportRequest metadataImport. - * @member {google.cloud.metastore.v1beta.IMetadataImport|null|undefined} metadataImport - * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.metastore.v1beta.OperationMetadata * @instance */ - UpdateMetadataImportRequest.prototype.metadataImport = null; + OperationMetadata.prototype.endTime = null; /** - * UpdateMetadataImportRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.metastore.v1beta.OperationMetadata * @instance */ - UpdateMetadataImportRequest.prototype.requestId = ""; + OperationMetadata.prototype.target = ""; /** - * Creates a new UpdateMetadataImportRequest instance using the specified properties. + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.metastore.v1beta.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.metastore.v1beta.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.metastore.v1beta.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.metastore.v1beta.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.OperationMetadata * @static - * @param {google.cloud.metastore.v1beta.IUpdateMetadataImportRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.UpdateMetadataImportRequest} UpdateMetadataImportRequest instance + * @param {google.cloud.metastore.v1beta.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.OperationMetadata} OperationMetadata instance */ - UpdateMetadataImportRequest.create = function create(properties) { - return new UpdateMetadataImportRequest(properties); + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); }; /** - * Encodes the specified UpdateMetadataImportRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateMetadataImportRequest.verify|verify} messages. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.metastore.v1beta.OperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.OperationMetadata * @static - * @param {google.cloud.metastore.v1beta.IUpdateMetadataImportRequest} message UpdateMetadataImportRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateMetadataImportRequest.encode = function encode(message, writer) { + OperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metadataImport != null && Object.hasOwnProperty.call(message, "metadataImport")) - $root.google.cloud.metastore.v1beta.MetadataImport.encode(message.metadataImport, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); return writer; }; /** - * Encodes the specified UpdateMetadataImportRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateMetadataImportRequest.verify|verify} messages. + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.OperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.OperationMetadata * @static - * @param {google.cloud.metastore.v1beta.IUpdateMetadataImportRequest} message UpdateMetadataImportRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateMetadataImportRequest.encodeDelimited = function encodeDelimited(message, writer) { + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.UpdateMetadataImportRequest} UpdateMetadataImportRequest + * @returns {google.cloud.metastore.v1beta.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateMetadataImportRequest.decode = function decode(reader, length) { + OperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.UpdateMetadataImportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.OperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.metadataImport = $root.google.cloud.metastore.v1beta.MetadataImport.decode(reader, reader.uint32()); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.requestId = reader.string(); + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); break; } default: @@ -30828,153 +41588,182 @@ }; /** - * Decodes an UpdateMetadataImportRequest message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.UpdateMetadataImportRequest} UpdateMetadataImportRequest + * @returns {google.cloud.metastore.v1beta.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateMetadataImportRequest.decodeDelimited = function decodeDelimited(reader) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateMetadataImportRequest message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateMetadataImportRequest.verify = function verify(message) { + OperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "updateMask." + error; + return "createTime." + error; } - if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) { - var error = $root.google.cloud.metastore.v1beta.MetadataImport.verify(message.metadataImport); + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); if (error) - return "metadataImport." + error; + return "endTime." + error; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; return null; }; /** - * Creates an UpdateMetadataImportRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.UpdateMetadataImportRequest} UpdateMetadataImportRequest + * @returns {google.cloud.metastore.v1beta.OperationMetadata} OperationMetadata */ - UpdateMetadataImportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.UpdateMetadataImportRequest) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.OperationMetadata) return object; - var message = new $root.google.cloud.metastore.v1beta.UpdateMetadataImportRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.metastore.v1beta.UpdateMetadataImportRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.metastore.v1beta.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.metastore.v1beta.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.metadataImport != null) { - if (typeof object.metadataImport !== "object") - throw TypeError(".google.cloud.metastore.v1beta.UpdateMetadataImportRequest.metadataImport: object expected"); - message.metadataImport = $root.google.cloud.metastore.v1beta.MetadataImport.fromObject(object.metadataImport); + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.metastore.v1beta.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } - if (object.requestId != null) - message.requestId = String(object.requestId); + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); return message; }; /** - * Creates a plain object from an UpdateMetadataImportRequest message. Also converts values to other types if specified. + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.OperationMetadata * @static - * @param {google.cloud.metastore.v1beta.UpdateMetadataImportRequest} message UpdateMetadataImportRequest + * @param {google.cloud.metastore.v1beta.OperationMetadata} message OperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateMetadataImportRequest.toObject = function toObject(message, options) { + OperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.updateMask = null; - object.metadataImport = null; - object.requestId = ""; + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.metadataImport != null && message.hasOwnProperty("metadataImport")) - object.metadataImport = $root.google.cloud.metastore.v1beta.MetadataImport.toObject(message.metadataImport, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; return object; }; /** - * Converts this UpdateMetadataImportRequest to JSON. + * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.OperationMetadata * @instance * @returns {Object.} JSON object */ - UpdateMetadataImportRequest.prototype.toJSON = function toJSON() { + OperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateMetadataImportRequest + * Gets the default type url for OperationMetadata * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.UpdateMetadataImportRequest + * @memberof google.cloud.metastore.v1beta.OperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateMetadataImportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.UpdateMetadataImportRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.OperationMetadata"; }; - return UpdateMetadataImportRequest; + return OperationMetadata; })(); - v1beta.ListBackupsRequest = (function() { + v1beta.LocationMetadata = (function() { /** - * Properties of a ListBackupsRequest. + * Properties of a LocationMetadata. * @memberof google.cloud.metastore.v1beta - * @interface IListBackupsRequest - * @property {string|null} [parent] ListBackupsRequest parent - * @property {number|null} [pageSize] ListBackupsRequest pageSize - * @property {string|null} [pageToken] ListBackupsRequest pageToken - * @property {string|null} [filter] ListBackupsRequest filter - * @property {string|null} [orderBy] ListBackupsRequest orderBy + * @interface ILocationMetadata + * @property {Array.|null} [supportedHiveMetastoreVersions] LocationMetadata supportedHiveMetastoreVersions */ /** - * Constructs a new ListBackupsRequest. + * Constructs a new LocationMetadata. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a ListBackupsRequest. - * @implements IListBackupsRequest + * @classdesc Represents a LocationMetadata. + * @implements ILocationMetadata * @constructor - * @param {google.cloud.metastore.v1beta.IListBackupsRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.ILocationMetadata=} [properties] Properties to set */ - function ListBackupsRequest(properties) { + function LocationMetadata(properties) { + this.supportedHiveMetastoreVersions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30982,131 +41771,78 @@ } /** - * ListBackupsRequest parent. - * @member {string} parent - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.parent = ""; - - /** - * ListBackupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.pageSize = 0; - - /** - * ListBackupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.pageToken = ""; - - /** - * ListBackupsRequest filter. - * @member {string} filter - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.filter = ""; - - /** - * ListBackupsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest + * LocationMetadata supportedHiveMetastoreVersions. + * @member {Array.} supportedHiveMetastoreVersions + * @memberof google.cloud.metastore.v1beta.LocationMetadata * @instance */ - ListBackupsRequest.prototype.orderBy = ""; + LocationMetadata.prototype.supportedHiveMetastoreVersions = $util.emptyArray; /** - * Creates a new ListBackupsRequest instance using the specified properties. + * Creates a new LocationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.LocationMetadata * @static - * @param {google.cloud.metastore.v1beta.IListBackupsRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.ListBackupsRequest} ListBackupsRequest instance + * @param {google.cloud.metastore.v1beta.ILocationMetadata=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.LocationMetadata} LocationMetadata instance */ - ListBackupsRequest.create = function create(properties) { - return new ListBackupsRequest(properties); + LocationMetadata.create = function create(properties) { + return new LocationMetadata(properties); }; /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsRequest.verify|verify} messages. + * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.LocationMetadata * @static - * @param {google.cloud.metastore.v1beta.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.ILocationMetadata} message LocationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsRequest.encode = function encode(message, writer) { + LocationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.supportedHiveMetastoreVersions != null && message.supportedHiveMetastoreVersions.length) + for (var i = 0; i < message.supportedHiveMetastoreVersions.length; ++i) + $root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.encode(message.supportedHiveMetastoreVersions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsRequest.verify|verify} messages. + * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.LocationMetadata * @static - * @param {google.cloud.metastore.v1beta.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.ILocationMetadata} message LocationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + LocationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. + * Decodes a LocationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.LocationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.metastore.v1beta.LocationMetadata} LocationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsRequest.decode = function decode(reader, length) { + LocationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ListBackupsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.LocationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + if (!(message.supportedHiveMetastoreVersions && message.supportedHiveMetastoreVersions.length)) + message.supportedHiveMetastoreVersions = []; + message.supportedHiveMetastoreVersions.push($root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.decode(reader, reader.uint32())); break; } default: @@ -31118,271 +41854,429 @@ }; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.LocationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.metastore.v1beta.LocationMetadata} LocationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { + LocationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBackupsRequest message. + * Verifies a LocationMetadata message. * @function verify - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.LocationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBackupsRequest.verify = function verify(message) { + LocationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.supportedHiveMetastoreVersions != null && message.hasOwnProperty("supportedHiveMetastoreVersions")) { + if (!Array.isArray(message.supportedHiveMetastoreVersions)) + return "supportedHiveMetastoreVersions: array expected"; + for (var i = 0; i < message.supportedHiveMetastoreVersions.length; ++i) { + var error = $root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.verify(message.supportedHiveMetastoreVersions[i]); + if (error) + return "supportedHiveMetastoreVersions." + error; + } + } return null; }; /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.LocationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.metastore.v1beta.LocationMetadata} LocationMetadata */ - ListBackupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.ListBackupsRequest) + LocationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.LocationMetadata) return object; - var message = new $root.google.cloud.metastore.v1beta.ListBackupsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.metastore.v1beta.LocationMetadata(); + if (object.supportedHiveMetastoreVersions) { + if (!Array.isArray(object.supportedHiveMetastoreVersions)) + throw TypeError(".google.cloud.metastore.v1beta.LocationMetadata.supportedHiveMetastoreVersions: array expected"); + message.supportedHiveMetastoreVersions = []; + for (var i = 0; i < object.supportedHiveMetastoreVersions.length; ++i) { + if (typeof object.supportedHiveMetastoreVersions[i] !== "object") + throw TypeError(".google.cloud.metastore.v1beta.LocationMetadata.supportedHiveMetastoreVersions: object expected"); + message.supportedHiveMetastoreVersions[i] = $root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.fromObject(object.supportedHiveMetastoreVersions[i]); + } + } return message; }; /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.LocationMetadata * @static - * @param {google.cloud.metastore.v1beta.ListBackupsRequest} message ListBackupsRequest + * @param {google.cloud.metastore.v1beta.LocationMetadata} message LocationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBackupsRequest.toObject = function toObject(message, options) { + LocationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + if (options.arrays || options.defaults) + object.supportedHiveMetastoreVersions = []; + if (message.supportedHiveMetastoreVersions && message.supportedHiveMetastoreVersions.length) { + object.supportedHiveMetastoreVersions = []; + for (var j = 0; j < message.supportedHiveMetastoreVersions.length; ++j) + object.supportedHiveMetastoreVersions[j] = $root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.toObject(message.supportedHiveMetastoreVersions[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; return object; }; /** - * Converts this ListBackupsRequest to JSON. + * Converts this LocationMetadata to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.LocationMetadata * @instance * @returns {Object.} JSON object */ - ListBackupsRequest.prototype.toJSON = function toJSON() { + LocationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBackupsRequest + * Gets the default type url for LocationMetadata * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.ListBackupsRequest + * @memberof google.cloud.metastore.v1beta.LocationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LocationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.ListBackupsRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.LocationMetadata"; }; - return ListBackupsRequest; - })(); + LocationMetadata.HiveMetastoreVersion = (function() { - v1beta.ListBackupsResponse = (function() { + /** + * Properties of a HiveMetastoreVersion. + * @memberof google.cloud.metastore.v1beta.LocationMetadata + * @interface IHiveMetastoreVersion + * @property {string|null} [version] HiveMetastoreVersion version + * @property {boolean|null} [isDefault] HiveMetastoreVersion isDefault + */ - /** - * Properties of a ListBackupsResponse. - * @memberof google.cloud.metastore.v1beta - * @interface IListBackupsResponse - * @property {Array.|null} [backups] ListBackupsResponse backups - * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupsResponse unreachable - */ + /** + * Constructs a new HiveMetastoreVersion. + * @memberof google.cloud.metastore.v1beta.LocationMetadata + * @classdesc Represents a HiveMetastoreVersion. + * @implements IHiveMetastoreVersion + * @constructor + * @param {google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion=} [properties] Properties to set + */ + function HiveMetastoreVersion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ListBackupsResponse. - * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a ListBackupsResponse. - * @implements IListBackupsResponse - * @constructor - * @param {google.cloud.metastore.v1beta.IListBackupsResponse=} [properties] Properties to set - */ - function ListBackupsResponse(properties) { - this.backups = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * HiveMetastoreVersion version. + * @member {string} version + * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion + * @instance + */ + HiveMetastoreVersion.prototype.version = ""; - /** - * ListBackupsResponse backups. - * @member {Array.} backups - * @memberof google.cloud.metastore.v1beta.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.backups = $util.emptyArray; + /** + * HiveMetastoreVersion isDefault. + * @member {boolean} isDefault + * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion + * @instance + */ + HiveMetastoreVersion.prototype.isDefault = false; + + /** + * Creates a new HiveMetastoreVersion instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion + * @static + * @param {google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion instance + */ + HiveMetastoreVersion.create = function create(properties) { + return new HiveMetastoreVersion(properties); + }; + + /** + * Encodes the specified HiveMetastoreVersion message. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion + * @static + * @param {google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion} message HiveMetastoreVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HiveMetastoreVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDefault); + return writer; + }; + + /** + * Encodes the specified HiveMetastoreVersion message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion + * @static + * @param {google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion} message HiveMetastoreVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HiveMetastoreVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HiveMetastoreVersion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HiveMetastoreVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.isDefault = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HiveMetastoreVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HiveMetastoreVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HiveMetastoreVersion message. + * @function verify + * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HiveMetastoreVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + if (typeof message.isDefault !== "boolean") + return "isDefault: boolean expected"; + return null; + }; + + /** + * Creates a HiveMetastoreVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion + */ + HiveMetastoreVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) + return object; + var message = new $root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion(); + if (object.version != null) + message.version = String(object.version); + if (object.isDefault != null) + message.isDefault = Boolean(object.isDefault); + return message; + }; + + /** + * Creates a plain object from a HiveMetastoreVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion + * @static + * @param {google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion} message HiveMetastoreVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HiveMetastoreVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.isDefault = false; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + object.isDefault = message.isDefault; + return object; + }; + + /** + * Converts this HiveMetastoreVersion to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion + * @instance + * @returns {Object.} JSON object + */ + HiveMetastoreVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HiveMetastoreVersion + * @function getTypeUrl + * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HiveMetastoreVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion"; + }; + + return HiveMetastoreVersion; + })(); + + return LocationMetadata; + })(); + + v1beta.DatabaseDumpSpec = (function() { /** - * ListBackupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.metastore.v1beta.ListBackupsResponse - * @instance + * Properties of a DatabaseDumpSpec. + * @memberof google.cloud.metastore.v1beta + * @interface IDatabaseDumpSpec */ - ListBackupsResponse.prototype.nextPageToken = ""; /** - * ListBackupsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.metastore.v1beta.ListBackupsResponse - * @instance + * Constructs a new DatabaseDumpSpec. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a DatabaseDumpSpec. + * @implements IDatabaseDumpSpec + * @constructor + * @param {google.cloud.metastore.v1beta.IDatabaseDumpSpec=} [properties] Properties to set */ - ListBackupsResponse.prototype.unreachable = $util.emptyArray; + function DatabaseDumpSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Creates a new ListBackupsResponse instance using the specified properties. + * Creates a new DatabaseDumpSpec instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec * @static - * @param {google.cloud.metastore.v1beta.IListBackupsResponse=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.ListBackupsResponse} ListBackupsResponse instance + * @param {google.cloud.metastore.v1beta.IDatabaseDumpSpec=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.DatabaseDumpSpec} DatabaseDumpSpec instance */ - ListBackupsResponse.create = function create(properties) { - return new ListBackupsResponse(properties); + DatabaseDumpSpec.create = function create(properties) { + return new DatabaseDumpSpec(properties); }; /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsResponse.verify|verify} messages. + * Encodes the specified DatabaseDumpSpec message. Does not implicitly {@link google.cloud.metastore.v1beta.DatabaseDumpSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec * @static - * @param {google.cloud.metastore.v1beta.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {google.cloud.metastore.v1beta.IDatabaseDumpSpec} message DatabaseDumpSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsResponse.encode = function encode(message, writer) { + DatabaseDumpSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.backups != null && message.backups.length) - for (var i = 0; i < message.backups.length; ++i) - $root.google.cloud.metastore.v1beta.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListBackupsResponse.verify|verify} messages. + * Encodes the specified DatabaseDumpSpec message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DatabaseDumpSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec * @static - * @param {google.cloud.metastore.v1beta.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {google.cloud.metastore.v1beta.IDatabaseDumpSpec} message DatabaseDumpSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + DatabaseDumpSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. + * Decodes a DatabaseDumpSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.ListBackupsResponse} ListBackupsResponse + * @returns {google.cloud.metastore.v1beta.DatabaseDumpSpec} DatabaseDumpSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsResponse.decode = function decode(reader, length) { + DatabaseDumpSpec.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ListBackupsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.DatabaseDumpSpec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (!(message.backups && message.backups.length)) - message.backups = []; - message.backups.push($root.google.cloud.metastore.v1beta.Backup.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } default: reader.skipType(tag & 7); break; @@ -31392,169 +42286,336 @@ }; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * Decodes a DatabaseDumpSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.ListBackupsResponse} ListBackupsResponse + * @returns {google.cloud.metastore.v1beta.DatabaseDumpSpec} DatabaseDumpSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { + DatabaseDumpSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBackupsResponse message. + * Verifies a DatabaseDumpSpec message. * @function verify - * @memberof google.cloud.metastore.v1beta.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBackupsResponse.verify = function verify(message) { + DatabaseDumpSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.backups != null && message.hasOwnProperty("backups")) { - if (!Array.isArray(message.backups)) - return "backups: array expected"; - for (var i = 0; i < message.backups.length; ++i) { - var error = $root.google.cloud.metastore.v1beta.Backup.verify(message.backups[i]); - if (error) - return "backups." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } return null; }; /** - * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DatabaseDumpSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.ListBackupsResponse} ListBackupsResponse + * @returns {google.cloud.metastore.v1beta.DatabaseDumpSpec} DatabaseDumpSpec */ - ListBackupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.ListBackupsResponse) + DatabaseDumpSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.DatabaseDumpSpec) return object; - var message = new $root.google.cloud.metastore.v1beta.ListBackupsResponse(); - if (object.backups) { - if (!Array.isArray(object.backups)) - throw TypeError(".google.cloud.metastore.v1beta.ListBackupsResponse.backups: array expected"); - message.backups = []; - for (var i = 0; i < object.backups.length; ++i) { - if (typeof object.backups[i] !== "object") - throw TypeError(".google.cloud.metastore.v1beta.ListBackupsResponse.backups: object expected"); - message.backups[i] = $root.google.cloud.metastore.v1beta.Backup.fromObject(object.backups[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.metastore.v1beta.ListBackupsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; + return new $root.google.cloud.metastore.v1beta.DatabaseDumpSpec(); }; /** - * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * Creates a plain object from a DatabaseDumpSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec * @static - * @param {google.cloud.metastore.v1beta.ListBackupsResponse} message ListBackupsResponse + * @param {google.cloud.metastore.v1beta.DatabaseDumpSpec} message DatabaseDumpSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBackupsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backups = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backups && message.backups.length) { - object.backups = []; - for (var j = 0; j < message.backups.length; ++j) - object.backups[j] = $root.google.cloud.metastore.v1beta.Backup.toObject(message.backups[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; + DatabaseDumpSpec.toObject = function toObject() { + return {}; }; /** - * Converts this ListBackupsResponse to JSON. + * Converts this DatabaseDumpSpec to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec * @instance * @returns {Object.} JSON object */ - ListBackupsResponse.prototype.toJSON = function toJSON() { + DatabaseDumpSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBackupsResponse + * Gets the default type url for DatabaseDumpSpec * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.ListBackupsResponse + * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DatabaseDumpSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.ListBackupsResponse"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.DatabaseDumpSpec"; }; - return ListBackupsResponse; + /** + * Type enum. + * @name google.cloud.metastore.v1beta.DatabaseDumpSpec.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} MYSQL=1 MYSQL value + * @property {number} AVRO=2 AVRO value + */ + DatabaseDumpSpec.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MYSQL"] = 1; + values[valuesById[2] = "AVRO"] = 2; + return values; + })(); + + return DatabaseDumpSpec; })(); - v1beta.GetBackupRequest = (function() { + v1beta.DataprocMetastoreFederation = (function() { /** - * Properties of a GetBackupRequest. + * Constructs a new DataprocMetastoreFederation service. * @memberof google.cloud.metastore.v1beta - * @interface IGetBackupRequest - * @property {string|null} [name] GetBackupRequest name + * @classdesc Represents a DataprocMetastoreFederation + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function DataprocMetastoreFederation(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataprocMetastoreFederation.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataprocMetastoreFederation; /** - * Constructs a new GetBackupRequest. + * Creates new DataprocMetastoreFederation service using the specified rpc implementation. + * @function create + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {DataprocMetastoreFederation} RPC service. Useful where requests and/or responses are streamed. + */ + DataprocMetastoreFederation.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastoreFederation|listFederations}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @typedef ListFederationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1beta.ListFederationsResponse} [response] ListFederationsResponse + */ + + /** + * Calls ListFederations. + * @function listFederations + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1beta.IListFederationsRequest} request ListFederationsRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastoreFederation.ListFederationsCallback} callback Node-style callback called with the error, if any, and ListFederationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastoreFederation.prototype.listFederations = function listFederations(request, callback) { + return this.rpcCall(listFederations, $root.google.cloud.metastore.v1beta.ListFederationsRequest, $root.google.cloud.metastore.v1beta.ListFederationsResponse, request, callback); + }, "name", { value: "ListFederations" }); + + /** + * Calls ListFederations. + * @function listFederations + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1beta.IListFederationsRequest} request ListFederationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastoreFederation|getFederation}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @typedef GetFederationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.metastore.v1beta.Federation} [response] Federation + */ + + /** + * Calls GetFederation. + * @function getFederation + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1beta.IGetFederationRequest} request GetFederationRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastoreFederation.GetFederationCallback} callback Node-style callback called with the error, if any, and Federation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastoreFederation.prototype.getFederation = function getFederation(request, callback) { + return this.rpcCall(getFederation, $root.google.cloud.metastore.v1beta.GetFederationRequest, $root.google.cloud.metastore.v1beta.Federation, request, callback); + }, "name", { value: "GetFederation" }); + + /** + * Calls GetFederation. + * @function getFederation + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1beta.IGetFederationRequest} request GetFederationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastoreFederation|createFederation}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @typedef CreateFederationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateFederation. + * @function createFederation + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1beta.ICreateFederationRequest} request CreateFederationRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastoreFederation.CreateFederationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastoreFederation.prototype.createFederation = function createFederation(request, callback) { + return this.rpcCall(createFederation, $root.google.cloud.metastore.v1beta.CreateFederationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateFederation" }); + + /** + * Calls CreateFederation. + * @function createFederation + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1beta.ICreateFederationRequest} request CreateFederationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastoreFederation|updateFederation}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @typedef UpdateFederationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateFederation. + * @function updateFederation + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1beta.IUpdateFederationRequest} request UpdateFederationRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastoreFederation.UpdateFederationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastoreFederation.prototype.updateFederation = function updateFederation(request, callback) { + return this.rpcCall(updateFederation, $root.google.cloud.metastore.v1beta.UpdateFederationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateFederation" }); + + /** + * Calls UpdateFederation. + * @function updateFederation + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1beta.IUpdateFederationRequest} request UpdateFederationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.metastore.v1beta.DataprocMetastoreFederation|deleteFederation}. + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @typedef DeleteFederationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteFederation. + * @function deleteFederation + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1beta.IDeleteFederationRequest} request DeleteFederationRequest message or plain object + * @param {google.cloud.metastore.v1beta.DataprocMetastoreFederation.DeleteFederationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataprocMetastoreFederation.prototype.deleteFederation = function deleteFederation(request, callback) { + return this.rpcCall(deleteFederation, $root.google.cloud.metastore.v1beta.DeleteFederationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteFederation" }); + + /** + * Calls DeleteFederation. + * @function deleteFederation + * @memberof google.cloud.metastore.v1beta.DataprocMetastoreFederation + * @instance + * @param {google.cloud.metastore.v1beta.IDeleteFederationRequest} request DeleteFederationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataprocMetastoreFederation; + })(); + + v1beta.Federation = (function() { + + /** + * Properties of a Federation. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a GetBackupRequest. - * @implements IGetBackupRequest + * @interface IFederation + * @property {string|null} [name] Federation name + * @property {google.protobuf.ITimestamp|null} [createTime] Federation createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Federation updateTime + * @property {Object.|null} [labels] Federation labels + * @property {string|null} [version] Federation version + * @property {Object.|null} [backendMetastores] Federation backendMetastores + * @property {string|null} [endpointUri] Federation endpointUri + * @property {google.cloud.metastore.v1beta.Federation.State|null} [state] Federation state + * @property {string|null} [stateMessage] Federation stateMessage + * @property {string|null} [uid] Federation uid + */ + + /** + * Constructs a new Federation. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a Federation. + * @implements IFederation * @constructor - * @param {google.cloud.metastore.v1beta.IGetBackupRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IFederation=} [properties] Properties to set */ - function GetBackupRequest(properties) { + function Federation(properties) { + this.labels = {}; + this.backendMetastores = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31562,70 +42623,164 @@ } /** - * GetBackupRequest name. + * Federation name. * @member {string} name - * @memberof google.cloud.metastore.v1beta.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.Federation * @instance */ - GetBackupRequest.prototype.name = ""; + Federation.prototype.name = ""; /** - * Creates a new GetBackupRequest instance using the specified properties. + * Federation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.metastore.v1beta.Federation + * @instance + */ + Federation.prototype.createTime = null; + + /** + * Federation updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.metastore.v1beta.Federation + * @instance + */ + Federation.prototype.updateTime = null; + + /** + * Federation labels. + * @member {Object.} labels + * @memberof google.cloud.metastore.v1beta.Federation + * @instance + */ + Federation.prototype.labels = $util.emptyObject; + + /** + * Federation version. + * @member {string} version + * @memberof google.cloud.metastore.v1beta.Federation + * @instance + */ + Federation.prototype.version = ""; + + /** + * Federation backendMetastores. + * @member {Object.} backendMetastores + * @memberof google.cloud.metastore.v1beta.Federation + * @instance + */ + Federation.prototype.backendMetastores = $util.emptyObject; + + /** + * Federation endpointUri. + * @member {string} endpointUri + * @memberof google.cloud.metastore.v1beta.Federation + * @instance + */ + Federation.prototype.endpointUri = ""; + + /** + * Federation state. + * @member {google.cloud.metastore.v1beta.Federation.State} state + * @memberof google.cloud.metastore.v1beta.Federation + * @instance + */ + Federation.prototype.state = 0; + + /** + * Federation stateMessage. + * @member {string} stateMessage + * @memberof google.cloud.metastore.v1beta.Federation + * @instance + */ + Federation.prototype.stateMessage = ""; + + /** + * Federation uid. + * @member {string} uid + * @memberof google.cloud.metastore.v1beta.Federation + * @instance + */ + Federation.prototype.uid = ""; + + /** + * Creates a new Federation instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.Federation * @static - * @param {google.cloud.metastore.v1beta.IGetBackupRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.GetBackupRequest} GetBackupRequest instance + * @param {google.cloud.metastore.v1beta.IFederation=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.Federation} Federation instance */ - GetBackupRequest.create = function create(properties) { - return new GetBackupRequest(properties); + Federation.create = function create(properties) { + return new Federation(properties); }; /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.GetBackupRequest.verify|verify} messages. + * Encodes the specified Federation message. Does not implicitly {@link google.cloud.metastore.v1beta.Federation.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.Federation * @static - * @param {google.cloud.metastore.v1beta.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IFederation} message Federation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupRequest.encode = function encode(message, writer) { + Federation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + if (message.backendMetastores != null && Object.hasOwnProperty.call(message, "backendMetastores")) + for (var keys = Object.keys(message.backendMetastores), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); + $root.google.cloud.metastore.v1beta.BackendMetastore.encode(message.backendMetastores[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.endpointUri != null && Object.hasOwnProperty.call(message, "endpointUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.endpointUri); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.stateMessage != null && Object.hasOwnProperty.call(message, "stateMessage")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.stateMessage); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.uid); return writer; }; /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.GetBackupRequest.verify|verify} messages. + * Encodes the specified Federation message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.Federation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.Federation * @static - * @param {google.cloud.metastore.v1beta.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IFederation} message Federation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + Federation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBackupRequest message from the specified reader or buffer. + * Decodes a Federation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.Federation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.GetBackupRequest} GetBackupRequest + * @returns {google.cloud.metastore.v1beta.Federation} Federation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupRequest.decode = function decode(reader, length) { + Federation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.GetBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.Federation(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -31633,6 +42788,80 @@ message.name = reader.string(); break; } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 5: { + message.version = reader.string(); + break; + } + case 6: { + if (message.backendMetastores === $util.emptyObject) + message.backendMetastores = {}; + var end2 = reader.uint32() + reader.pos; + key = 0; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.int32(); + break; + case 2: + value = $root.google.cloud.metastore.v1beta.BackendMetastore.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.backendMetastores[key] = value; + break; + } + case 7: { + message.endpointUri = reader.string(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 9: { + message.stateMessage = reader.string(); + break; + } + case 10: { + message.uid = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31642,125 +42871,305 @@ }; /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a Federation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.Federation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.GetBackupRequest} GetBackupRequest + * @returns {google.cloud.metastore.v1beta.Federation} Federation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { + Federation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBackupRequest message. + * Verifies a Federation message. * @function verify - * @memberof google.cloud.metastore.v1beta.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.Federation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBackupRequest.verify = function verify(message) { + Federation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.backendMetastores != null && message.hasOwnProperty("backendMetastores")) { + if (!$util.isObject(message.backendMetastores)) + return "backendMetastores: object expected"; + var key = Object.keys(message.backendMetastores); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "backendMetastores: integer key{k:int32} expected"; + { + var error = $root.google.cloud.metastore.v1beta.BackendMetastore.verify(message.backendMetastores[key[i]]); + if (error) + return "backendMetastores." + error; + } + } + } + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + if (!$util.isString(message.endpointUri)) + return "endpointUri: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) + if (!$util.isString(message.stateMessage)) + return "stateMessage: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; return null; }; /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Federation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.Federation * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.GetBackupRequest} GetBackupRequest + * @returns {google.cloud.metastore.v1beta.Federation} Federation */ - GetBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.GetBackupRequest) + Federation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.Federation) return object; - var message = new $root.google.cloud.metastore.v1beta.GetBackupRequest(); + var message = new $root.google.cloud.metastore.v1beta.Federation(); if (object.name != null) message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Federation.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Federation.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Federation.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.version != null) + message.version = String(object.version); + if (object.backendMetastores) { + if (typeof object.backendMetastores !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Federation.backendMetastores: object expected"); + message.backendMetastores = {}; + for (var keys = Object.keys(object.backendMetastores), i = 0; i < keys.length; ++i) { + if (typeof object.backendMetastores[keys[i]] !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Federation.backendMetastores: object expected"); + message.backendMetastores[keys[i]] = $root.google.cloud.metastore.v1beta.BackendMetastore.fromObject(object.backendMetastores[keys[i]]); + } + } + if (object.endpointUri != null) + message.endpointUri = String(object.endpointUri); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "DELETING": + case 4: + message.state = 4; + break; + case "ERROR": + case 5: + message.state = 5; + break; + } + if (object.stateMessage != null) + message.stateMessage = String(object.stateMessage); + if (object.uid != null) + message.uid = String(object.uid); return message; }; /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a Federation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.Federation * @static - * @param {google.cloud.metastore.v1beta.GetBackupRequest} message GetBackupRequest + * @param {google.cloud.metastore.v1beta.Federation} message Federation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBackupRequest.toObject = function toObject(message, options) { + Federation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.objects || options.defaults) { + object.labels = {}; + object.backendMetastores = {}; + } + if (options.defaults) { object.name = ""; + object.createTime = null; + object.updateTime = null; + object.version = ""; + object.endpointUri = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateMessage = ""; + object.uid = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.backendMetastores && (keys2 = Object.keys(message.backendMetastores)).length) { + object.backendMetastores = {}; + for (var j = 0; j < keys2.length; ++j) + object.backendMetastores[keys2[j]] = $root.google.cloud.metastore.v1beta.BackendMetastore.toObject(message.backendMetastores[keys2[j]], options); + } + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + object.endpointUri = message.endpointUri; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.metastore.v1beta.Federation.State[message.state] === undefined ? message.state : $root.google.cloud.metastore.v1beta.Federation.State[message.state] : message.state; + if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) + object.stateMessage = message.stateMessage; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; return object; }; /** - * Converts this GetBackupRequest to JSON. + * Converts this Federation to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.Federation * @instance * @returns {Object.} JSON object */ - GetBackupRequest.prototype.toJSON = function toJSON() { + Federation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetBackupRequest + * Gets the default type url for Federation * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.GetBackupRequest + * @memberof google.cloud.metastore.v1beta.Federation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Federation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.GetBackupRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.Federation"; }; - return GetBackupRequest; + /** + * State enum. + * @name google.cloud.metastore.v1beta.Federation.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} UPDATING=3 UPDATING value + * @property {number} DELETING=4 DELETING value + * @property {number} ERROR=5 ERROR value + */ + Federation.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "DELETING"] = 4; + values[valuesById[5] = "ERROR"] = 5; + return values; + })(); + + return Federation; })(); - v1beta.CreateBackupRequest = (function() { + v1beta.BackendMetastore = (function() { /** - * Properties of a CreateBackupRequest. + * Properties of a BackendMetastore. * @memberof google.cloud.metastore.v1beta - * @interface ICreateBackupRequest - * @property {string|null} [parent] CreateBackupRequest parent - * @property {string|null} [backupId] CreateBackupRequest backupId - * @property {google.cloud.metastore.v1beta.IBackup|null} [backup] CreateBackupRequest backup - * @property {string|null} [requestId] CreateBackupRequest requestId + * @interface IBackendMetastore + * @property {string|null} [name] BackendMetastore name + * @property {google.cloud.metastore.v1beta.BackendMetastore.MetastoreType|null} [metastoreType] BackendMetastore metastoreType */ /** - * Constructs a new CreateBackupRequest. + * Constructs a new BackendMetastore. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a CreateBackupRequest. - * @implements ICreateBackupRequest + * @classdesc Represents a BackendMetastore. + * @implements IBackendMetastore * @constructor - * @param {google.cloud.metastore.v1beta.ICreateBackupRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IBackendMetastore=} [properties] Properties to set */ - function CreateBackupRequest(properties) { + function BackendMetastore(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31768,117 +43177,89 @@ } /** - * CreateBackupRequest parent. - * @member {string} parent - * @memberof google.cloud.metastore.v1beta.CreateBackupRequest - * @instance - */ - CreateBackupRequest.prototype.parent = ""; - - /** - * CreateBackupRequest backupId. - * @member {string} backupId - * @memberof google.cloud.metastore.v1beta.CreateBackupRequest - * @instance - */ - CreateBackupRequest.prototype.backupId = ""; - - /** - * CreateBackupRequest backup. - * @member {google.cloud.metastore.v1beta.IBackup|null|undefined} backup - * @memberof google.cloud.metastore.v1beta.CreateBackupRequest + * BackendMetastore name. + * @member {string} name + * @memberof google.cloud.metastore.v1beta.BackendMetastore * @instance */ - CreateBackupRequest.prototype.backup = null; + BackendMetastore.prototype.name = ""; /** - * CreateBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1beta.CreateBackupRequest + * BackendMetastore metastoreType. + * @member {google.cloud.metastore.v1beta.BackendMetastore.MetastoreType} metastoreType + * @memberof google.cloud.metastore.v1beta.BackendMetastore * @instance */ - CreateBackupRequest.prototype.requestId = ""; + BackendMetastore.prototype.metastoreType = 0; /** - * Creates a new CreateBackupRequest instance using the specified properties. + * Creates a new BackendMetastore instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.BackendMetastore * @static - * @param {google.cloud.metastore.v1beta.ICreateBackupRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.CreateBackupRequest} CreateBackupRequest instance + * @param {google.cloud.metastore.v1beta.IBackendMetastore=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.BackendMetastore} BackendMetastore instance */ - CreateBackupRequest.create = function create(properties) { - return new CreateBackupRequest(properties); + BackendMetastore.create = function create(properties) { + return new BackendMetastore(properties); }; /** - * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.CreateBackupRequest.verify|verify} messages. + * Encodes the specified BackendMetastore message. Does not implicitly {@link google.cloud.metastore.v1beta.BackendMetastore.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.BackendMetastore * @static - * @param {google.cloud.metastore.v1beta.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IBackendMetastore} message BackendMetastore message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBackupRequest.encode = function encode(message, writer) { + BackendMetastore.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupId); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - $root.google.cloud.metastore.v1beta.Backup.encode(message.backup, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metastoreType != null && Object.hasOwnProperty.call(message, "metastoreType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.metastoreType); return writer; }; /** - * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.CreateBackupRequest.verify|verify} messages. + * Encodes the specified BackendMetastore message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.BackendMetastore.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.BackendMetastore * @static - * @param {google.cloud.metastore.v1beta.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IBackendMetastore} message BackendMetastore message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + BackendMetastore.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateBackupRequest message from the specified reader or buffer. + * Decodes a BackendMetastore message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.BackendMetastore * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.CreateBackupRequest} CreateBackupRequest + * @returns {google.cloud.metastore.v1beta.BackendMetastore} BackendMetastore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBackupRequest.decode = function decode(reader, length) { + BackendMetastore.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.CreateBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.BackendMetastore(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.backupId = reader.string(); - break; - } - case 3: { - message.backup = $root.google.cloud.metastore.v1beta.Backup.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); + message.metastoreType = reader.int32(); break; } default: @@ -31890,153 +43271,175 @@ }; /** - * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a BackendMetastore message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.BackendMetastore * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.CreateBackupRequest} CreateBackupRequest + * @returns {google.cloud.metastore.v1beta.BackendMetastore} BackendMetastore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + BackendMetastore.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateBackupRequest message. + * Verifies a BackendMetastore message. * @function verify - * @memberof google.cloud.metastore.v1beta.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.BackendMetastore * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateBackupRequest.verify = function verify(message) { + BackendMetastore.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.backupId != null && message.hasOwnProperty("backupId")) - if (!$util.isString(message.backupId)) - return "backupId: string expected"; - if (message.backup != null && message.hasOwnProperty("backup")) { - var error = $root.google.cloud.metastore.v1beta.Backup.verify(message.backup); - if (error) - return "backup." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metastoreType != null && message.hasOwnProperty("metastoreType")) + switch (message.metastoreType) { + default: + return "metastoreType: enum value expected"; + case 0: + case 2: + case 3: + break; + } return null; }; /** - * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BackendMetastore message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.BackendMetastore * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.CreateBackupRequest} CreateBackupRequest + * @returns {google.cloud.metastore.v1beta.BackendMetastore} BackendMetastore */ - CreateBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.CreateBackupRequest) + BackendMetastore.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.BackendMetastore) return object; - var message = new $root.google.cloud.metastore.v1beta.CreateBackupRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.backupId != null) - message.backupId = String(object.backupId); - if (object.backup != null) { - if (typeof object.backup !== "object") - throw TypeError(".google.cloud.metastore.v1beta.CreateBackupRequest.backup: object expected"); - message.backup = $root.google.cloud.metastore.v1beta.Backup.fromObject(object.backup); + var message = new $root.google.cloud.metastore.v1beta.BackendMetastore(); + if (object.name != null) + message.name = String(object.name); + switch (object.metastoreType) { + default: + if (typeof object.metastoreType === "number") { + message.metastoreType = object.metastoreType; + break; + } + break; + case "METASTORE_TYPE_UNSPECIFIED": + case 0: + message.metastoreType = 0; + break; + case "BIGQUERY": + case 2: + message.metastoreType = 2; + break; + case "DATAPROC_METASTORE": + case 3: + message.metastoreType = 3; + break; } - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a BackendMetastore message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.BackendMetastore * @static - * @param {google.cloud.metastore.v1beta.CreateBackupRequest} message CreateBackupRequest + * @param {google.cloud.metastore.v1beta.BackendMetastore} message BackendMetastore * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateBackupRequest.toObject = function toObject(message, options) { + BackendMetastore.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.backupId = ""; - object.backup = null; - object.requestId = ""; + object.name = ""; + object.metastoreType = options.enums === String ? "METASTORE_TYPE_UNSPECIFIED" : 0; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupId != null && message.hasOwnProperty("backupId")) - object.backupId = message.backupId; - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = $root.google.cloud.metastore.v1beta.Backup.toObject(message.backup, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metastoreType != null && message.hasOwnProperty("metastoreType")) + object.metastoreType = options.enums === String ? $root.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType[message.metastoreType] === undefined ? message.metastoreType : $root.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType[message.metastoreType] : message.metastoreType; return object; }; /** - * Converts this CreateBackupRequest to JSON. + * Converts this BackendMetastore to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.BackendMetastore * @instance * @returns {Object.} JSON object */ - CreateBackupRequest.prototype.toJSON = function toJSON() { + BackendMetastore.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateBackupRequest + * Gets the default type url for BackendMetastore * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.CreateBackupRequest + * @memberof google.cloud.metastore.v1beta.BackendMetastore * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BackendMetastore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.CreateBackupRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.BackendMetastore"; }; - return CreateBackupRequest; + /** + * MetastoreType enum. + * @name google.cloud.metastore.v1beta.BackendMetastore.MetastoreType + * @enum {number} + * @property {number} METASTORE_TYPE_UNSPECIFIED=0 METASTORE_TYPE_UNSPECIFIED value + * @property {number} BIGQUERY=2 BIGQUERY value + * @property {number} DATAPROC_METASTORE=3 DATAPROC_METASTORE value + */ + BackendMetastore.MetastoreType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METASTORE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[2] = "BIGQUERY"] = 2; + values[valuesById[3] = "DATAPROC_METASTORE"] = 3; + return values; + })(); + + return BackendMetastore; })(); - v1beta.DeleteBackupRequest = (function() { + v1beta.ListFederationsRequest = (function() { /** - * Properties of a DeleteBackupRequest. + * Properties of a ListFederationsRequest. * @memberof google.cloud.metastore.v1beta - * @interface IDeleteBackupRequest - * @property {string|null} [name] DeleteBackupRequest name - * @property {string|null} [requestId] DeleteBackupRequest requestId + * @interface IListFederationsRequest + * @property {string|null} [parent] ListFederationsRequest parent + * @property {number|null} [pageSize] ListFederationsRequest pageSize + * @property {string|null} [pageToken] ListFederationsRequest pageToken + * @property {string|null} [filter] ListFederationsRequest filter + * @property {string|null} [orderBy] ListFederationsRequest orderBy */ /** - * Constructs a new DeleteBackupRequest. + * Constructs a new ListFederationsRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a DeleteBackupRequest. - * @implements IDeleteBackupRequest + * @classdesc Represents a ListFederationsRequest. + * @implements IListFederationsRequest * @constructor - * @param {google.cloud.metastore.v1beta.IDeleteBackupRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IListFederationsRequest=} [properties] Properties to set */ - function DeleteBackupRequest(properties) { + function ListFederationsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32044,89 +43447,131 @@ } /** - * DeleteBackupRequest name. - * @member {string} name - * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest + * ListFederationsRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest * @instance */ - DeleteBackupRequest.prototype.name = ""; + ListFederationsRequest.prototype.parent = ""; /** - * DeleteBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest + * ListFederationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest * @instance */ - DeleteBackupRequest.prototype.requestId = ""; + ListFederationsRequest.prototype.pageSize = 0; /** - * Creates a new DeleteBackupRequest instance using the specified properties. + * ListFederationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest + * @instance + */ + ListFederationsRequest.prototype.pageToken = ""; + + /** + * ListFederationsRequest filter. + * @member {string} filter + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest + * @instance + */ + ListFederationsRequest.prototype.filter = ""; + + /** + * ListFederationsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest + * @instance + */ + ListFederationsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListFederationsRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest * @static - * @param {google.cloud.metastore.v1beta.IDeleteBackupRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.DeleteBackupRequest} DeleteBackupRequest instance + * @param {google.cloud.metastore.v1beta.IListFederationsRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.ListFederationsRequest} ListFederationsRequest instance */ - DeleteBackupRequest.create = function create(properties) { - return new DeleteBackupRequest(properties); + ListFederationsRequest.create = function create(properties) { + return new ListFederationsRequest(properties); }; /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteBackupRequest.verify|verify} messages. + * Encodes the specified ListFederationsRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ListFederationsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest * @static - * @param {google.cloud.metastore.v1beta.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListFederationsRequest} message ListFederationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBackupRequest.encode = function encode(message, writer) { + ListFederationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteBackupRequest.verify|verify} messages. + * Encodes the specified ListFederationsRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListFederationsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest * @static - * @param {google.cloud.metastore.v1beta.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListFederationsRequest} message ListFederationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListFederationsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * Decodes a ListFederationsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.DeleteBackupRequest} DeleteBackupRequest + * @returns {google.cloud.metastore.v1beta.ListFederationsRequest} ListFederationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBackupRequest.decode = function decode(reader, length) { + ListFederationsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.DeleteBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ListFederationsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.requestId = reader.string(); + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -32138,134 +43583,159 @@ }; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFederationsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.DeleteBackupRequest} DeleteBackupRequest + * @returns {google.cloud.metastore.v1beta.ListFederationsRequest} ListFederationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { + ListFederationsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteBackupRequest message. + * Verifies a ListFederationsRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteBackupRequest.verify = function verify(message) { + ListFederationsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFederationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.DeleteBackupRequest} DeleteBackupRequest + * @returns {google.cloud.metastore.v1beta.ListFederationsRequest} ListFederationsRequest */ - DeleteBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.DeleteBackupRequest) + ListFederationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.ListFederationsRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.DeleteBackupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); + var message = new $root.google.cloud.metastore.v1beta.ListFederationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListFederationsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest * @static - * @param {google.cloud.metastore.v1beta.DeleteBackupRequest} message DeleteBackupRequest + * @param {google.cloud.metastore.v1beta.ListFederationsRequest} message ListFederationsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteBackupRequest.toObject = function toObject(message, options) { + ListFederationsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.requestId = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this DeleteBackupRequest to JSON. + * Converts this ListFederationsRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest * @instance * @returns {Object.} JSON object */ - DeleteBackupRequest.prototype.toJSON = function toJSON() { + ListFederationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteBackupRequest + * Gets the default type url for ListFederationsRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.DeleteBackupRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListFederationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.DeleteBackupRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.ListFederationsRequest"; }; - return DeleteBackupRequest; + return ListFederationsRequest; })(); - v1beta.ExportMetadataRequest = (function() { + v1beta.ListFederationsResponse = (function() { /** - * Properties of an ExportMetadataRequest. + * Properties of a ListFederationsResponse. * @memberof google.cloud.metastore.v1beta - * @interface IExportMetadataRequest - * @property {string|null} [destinationGcsFolder] ExportMetadataRequest destinationGcsFolder - * @property {string|null} [service] ExportMetadataRequest service - * @property {string|null} [requestId] ExportMetadataRequest requestId - * @property {google.cloud.metastore.v1beta.DatabaseDumpSpec.Type|null} [databaseDumpType] ExportMetadataRequest databaseDumpType + * @interface IListFederationsResponse + * @property {Array.|null} [federations] ListFederationsResponse federations + * @property {string|null} [nextPageToken] ListFederationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListFederationsResponse unreachable */ /** - * Constructs a new ExportMetadataRequest. + * Constructs a new ListFederationsResponse. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents an ExportMetadataRequest. - * @implements IExportMetadataRequest + * @classdesc Represents a ListFederationsResponse. + * @implements IListFederationsResponse * @constructor - * @param {google.cloud.metastore.v1beta.IExportMetadataRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IListFederationsResponse=} [properties] Properties to set */ - function ExportMetadataRequest(properties) { + function ListFederationsResponse(properties) { + this.federations = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32273,131 +43743,109 @@ } /** - * ExportMetadataRequest destinationGcsFolder. - * @member {string|null|undefined} destinationGcsFolder - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest - * @instance - */ - ExportMetadataRequest.prototype.destinationGcsFolder = null; - - /** - * ExportMetadataRequest service. - * @member {string} service - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest - * @instance - */ - ExportMetadataRequest.prototype.service = ""; - - /** - * ExportMetadataRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * ListFederationsResponse federations. + * @member {Array.} federations + * @memberof google.cloud.metastore.v1beta.ListFederationsResponse * @instance */ - ExportMetadataRequest.prototype.requestId = ""; + ListFederationsResponse.prototype.federations = $util.emptyArray; /** - * ExportMetadataRequest databaseDumpType. - * @member {google.cloud.metastore.v1beta.DatabaseDumpSpec.Type} databaseDumpType - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * ListFederationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.metastore.v1beta.ListFederationsResponse * @instance */ - ExportMetadataRequest.prototype.databaseDumpType = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListFederationsResponse.prototype.nextPageToken = ""; /** - * ExportMetadataRequest destination. - * @member {"destinationGcsFolder"|undefined} destination - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * ListFederationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.metastore.v1beta.ListFederationsResponse * @instance */ - Object.defineProperty(ExportMetadataRequest.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["destinationGcsFolder"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListFederationsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new ExportMetadataRequest instance using the specified properties. + * Creates a new ListFederationsResponse instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsResponse * @static - * @param {google.cloud.metastore.v1beta.IExportMetadataRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.ExportMetadataRequest} ExportMetadataRequest instance + * @param {google.cloud.metastore.v1beta.IListFederationsResponse=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.ListFederationsResponse} ListFederationsResponse instance */ - ExportMetadataRequest.create = function create(properties) { - return new ExportMetadataRequest(properties); + ListFederationsResponse.create = function create(properties) { + return new ListFederationsResponse(properties); }; /** - * Encodes the specified ExportMetadataRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.ExportMetadataRequest.verify|verify} messages. + * Encodes the specified ListFederationsResponse message. Does not implicitly {@link google.cloud.metastore.v1beta.ListFederationsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsResponse * @static - * @param {google.cloud.metastore.v1beta.IExportMetadataRequest} message ExportMetadataRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListFederationsResponse} message ListFederationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportMetadataRequest.encode = function encode(message, writer) { + ListFederationsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - if (message.destinationGcsFolder != null && Object.hasOwnProperty.call(message, "destinationGcsFolder")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationGcsFolder); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - if (message.databaseDumpType != null && Object.hasOwnProperty.call(message, "databaseDumpType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.databaseDumpType); + if (message.federations != null && message.federations.length) + for (var i = 0; i < message.federations.length; ++i) + $root.google.cloud.metastore.v1beta.Federation.encode(message.federations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified ExportMetadataRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ExportMetadataRequest.verify|verify} messages. + * Encodes the specified ListFederationsResponse message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ListFederationsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsResponse * @static - * @param {google.cloud.metastore.v1beta.IExportMetadataRequest} message ExportMetadataRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IListFederationsResponse} message ListFederationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListFederationsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportMetadataRequest message from the specified reader or buffer. + * Decodes a ListFederationsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.ExportMetadataRequest} ExportMetadataRequest + * @returns {google.cloud.metastore.v1beta.ListFederationsResponse} ListFederationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportMetadataRequest.decode = function decode(reader, length) { + ListFederationsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ExportMetadataRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ListFederationsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.destinationGcsFolder = reader.string(); - break; - } case 1: { - message.service = reader.string(); + if (!(message.federations && message.federations.length)) + message.federations = []; + message.federations.push($root.google.cloud.metastore.v1beta.Federation.decode(reader, reader.uint32())); break; } - case 3: { - message.requestId = reader.string(); + case 2: { + message.nextPageToken = reader.string(); break; } - case 4: { - message.databaseDumpType = reader.int32(); + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -32409,174 +43857,169 @@ }; /** - * Decodes an ExportMetadataRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFederationsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.ExportMetadataRequest} ExportMetadataRequest + * @returns {google.cloud.metastore.v1beta.ListFederationsResponse} ListFederationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportMetadataRequest.decodeDelimited = function decodeDelimited(reader) { + ListFederationsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportMetadataRequest message. + * Verifies a ListFederationsResponse message. * @function verify - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportMetadataRequest.verify = function verify(message) { + ListFederationsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.destinationGcsFolder != null && message.hasOwnProperty("destinationGcsFolder")) { - properties.destination = 1; - if (!$util.isString(message.destinationGcsFolder)) - return "destinationGcsFolder: string expected"; - } - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) - switch (message.databaseDumpType) { - default: - return "databaseDumpType: enum value expected"; - case 0: - case 1: - break; + if (message.federations != null && message.hasOwnProperty("federations")) { + if (!Array.isArray(message.federations)) + return "federations: array expected"; + for (var i = 0; i < message.federations.length; ++i) { + var error = $root.google.cloud.metastore.v1beta.Federation.verify(message.federations[i]); + if (error) + return "federations." + error; } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } return null; }; /** - * Creates an ExportMetadataRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFederationsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.ExportMetadataRequest} ExportMetadataRequest + * @returns {google.cloud.metastore.v1beta.ListFederationsResponse} ListFederationsResponse */ - ExportMetadataRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.ExportMetadataRequest) + ListFederationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.ListFederationsResponse) return object; - var message = new $root.google.cloud.metastore.v1beta.ExportMetadataRequest(); - if (object.destinationGcsFolder != null) - message.destinationGcsFolder = String(object.destinationGcsFolder); - if (object.service != null) - message.service = String(object.service); - if (object.requestId != null) - message.requestId = String(object.requestId); - switch (object.databaseDumpType) { - default: - if (typeof object.databaseDumpType === "number") { - message.databaseDumpType = object.databaseDumpType; - break; + var message = new $root.google.cloud.metastore.v1beta.ListFederationsResponse(); + if (object.federations) { + if (!Array.isArray(object.federations)) + throw TypeError(".google.cloud.metastore.v1beta.ListFederationsResponse.federations: array expected"); + message.federations = []; + for (var i = 0; i < object.federations.length; ++i) { + if (typeof object.federations[i] !== "object") + throw TypeError(".google.cloud.metastore.v1beta.ListFederationsResponse.federations: object expected"); + message.federations[i] = $root.google.cloud.metastore.v1beta.Federation.fromObject(object.federations[i]); } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.databaseDumpType = 0; - break; - case "MYSQL": - case 1: - message.databaseDumpType = 1; - break; + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.metastore.v1beta.ListFederationsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } return message; }; /** - * Creates a plain object from an ExportMetadataRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListFederationsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsResponse * @static - * @param {google.cloud.metastore.v1beta.ExportMetadataRequest} message ExportMetadataRequest + * @param {google.cloud.metastore.v1beta.ListFederationsResponse} message ListFederationsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportMetadataRequest.toObject = function toObject(message, options) { + ListFederationsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.service = ""; - object.requestId = ""; - object.databaseDumpType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + if (options.arrays || options.defaults) { + object.federations = []; + object.unreachable = []; } - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.destinationGcsFolder != null && message.hasOwnProperty("destinationGcsFolder")) { - object.destinationGcsFolder = message.destinationGcsFolder; - if (options.oneofs) - object.destination = "destinationGcsFolder"; + if (options.defaults) + object.nextPageToken = ""; + if (message.federations && message.federations.length) { + object.federations = []; + for (var j = 0; j < message.federations.length; ++j) + object.federations[j] = $root.google.cloud.metastore.v1beta.Federation.toObject(message.federations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.databaseDumpType != null && message.hasOwnProperty("databaseDumpType")) - object.databaseDumpType = options.enums === String ? $root.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type[message.databaseDumpType] === undefined ? message.databaseDumpType : $root.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type[message.databaseDumpType] : message.databaseDumpType; return object; }; /** - * Converts this ExportMetadataRequest to JSON. + * Converts this ListFederationsResponse to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsResponse * @instance * @returns {Object.} JSON object */ - ExportMetadataRequest.prototype.toJSON = function toJSON() { + ListFederationsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportMetadataRequest + * Gets the default type url for ListFederationsResponse * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.ExportMetadataRequest + * @memberof google.cloud.metastore.v1beta.ListFederationsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportMetadataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListFederationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.ExportMetadataRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.ListFederationsResponse"; }; - return ExportMetadataRequest; + return ListFederationsResponse; })(); - v1beta.RestoreServiceRequest = (function() { + v1beta.GetFederationRequest = (function() { /** - * Properties of a RestoreServiceRequest. + * Properties of a GetFederationRequest. * @memberof google.cloud.metastore.v1beta - * @interface IRestoreServiceRequest - * @property {string|null} [service] RestoreServiceRequest service - * @property {string|null} [backup] RestoreServiceRequest backup - * @property {google.cloud.metastore.v1beta.Restore.RestoreType|null} [restoreType] RestoreServiceRequest restoreType - * @property {string|null} [requestId] RestoreServiceRequest requestId + * @interface IGetFederationRequest + * @property {string|null} [name] GetFederationRequest name */ /** - * Constructs a new RestoreServiceRequest. + * Constructs a new GetFederationRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a RestoreServiceRequest. - * @implements IRestoreServiceRequest + * @classdesc Represents a GetFederationRequest. + * @implements IGetFederationRequest * @constructor - * @param {google.cloud.metastore.v1beta.IRestoreServiceRequest=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IGetFederationRequest=} [properties] Properties to set */ - function RestoreServiceRequest(properties) { + function GetFederationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32584,117 +44027,75 @@ } /** - * RestoreServiceRequest service. - * @member {string} service - * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest - * @instance - */ - RestoreServiceRequest.prototype.service = ""; - - /** - * RestoreServiceRequest backup. - * @member {string} backup - * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest - * @instance - */ - RestoreServiceRequest.prototype.backup = ""; - - /** - * RestoreServiceRequest restoreType. - * @member {google.cloud.metastore.v1beta.Restore.RestoreType} restoreType - * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest - * @instance - */ - RestoreServiceRequest.prototype.restoreType = 0; - - /** - * RestoreServiceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest + * GetFederationRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1beta.GetFederationRequest * @instance */ - RestoreServiceRequest.prototype.requestId = ""; + GetFederationRequest.prototype.name = ""; /** - * Creates a new RestoreServiceRequest instance using the specified properties. + * Creates a new GetFederationRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.GetFederationRequest * @static - * @param {google.cloud.metastore.v1beta.IRestoreServiceRequest=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.RestoreServiceRequest} RestoreServiceRequest instance + * @param {google.cloud.metastore.v1beta.IGetFederationRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.GetFederationRequest} GetFederationRequest instance */ - RestoreServiceRequest.create = function create(properties) { - return new RestoreServiceRequest(properties); + GetFederationRequest.create = function create(properties) { + return new GetFederationRequest(properties); }; /** - * Encodes the specified RestoreServiceRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.RestoreServiceRequest.verify|verify} messages. + * Encodes the specified GetFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.GetFederationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.GetFederationRequest * @static - * @param {google.cloud.metastore.v1beta.IRestoreServiceRequest} message RestoreServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IGetFederationRequest} message GetFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreServiceRequest.encode = function encode(message, writer) { + GetFederationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backup); - if (message.restoreType != null && Object.hasOwnProperty.call(message, "restoreType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.restoreType); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified RestoreServiceRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.RestoreServiceRequest.verify|verify} messages. + * Encodes the specified GetFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.GetFederationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.GetFederationRequest * @static - * @param {google.cloud.metastore.v1beta.IRestoreServiceRequest} message RestoreServiceRequest message or plain object to encode + * @param {google.cloud.metastore.v1beta.IGetFederationRequest} message GetFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetFederationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RestoreServiceRequest message from the specified reader or buffer. + * Decodes a GetFederationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.GetFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.RestoreServiceRequest} RestoreServiceRequest + * @returns {google.cloud.metastore.v1beta.GetFederationRequest} GetFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreServiceRequest.decode = function decode(reader, length) { + GetFederationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.RestoreServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.GetFederationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.service = reader.string(); - break; - } - case 2: { - message.backup = reader.string(); - break; - } - case 3: { - message.restoreType = reader.int32(); - break; - } - case 4: { - message.requestId = reader.string(); + message.name = reader.string(); break; } default: @@ -32706,177 +44107,125 @@ }; /** - * Decodes a RestoreServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a GetFederationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.GetFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.RestoreServiceRequest} RestoreServiceRequest + * @returns {google.cloud.metastore.v1beta.GetFederationRequest} GetFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreServiceRequest.decodeDelimited = function decodeDelimited(reader) { + GetFederationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RestoreServiceRequest message. + * Verifies a GetFederationRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.GetFederationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RestoreServiceRequest.verify = function verify(message) { + GetFederationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.backup != null && message.hasOwnProperty("backup")) - if (!$util.isString(message.backup)) - return "backup: string expected"; - if (message.restoreType != null && message.hasOwnProperty("restoreType")) - switch (message.restoreType) { - default: - return "restoreType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a RestoreServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetFederationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.GetFederationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.RestoreServiceRequest} RestoreServiceRequest + * @returns {google.cloud.metastore.v1beta.GetFederationRequest} GetFederationRequest */ - RestoreServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.RestoreServiceRequest) + GetFederationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.GetFederationRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.RestoreServiceRequest(); - if (object.service != null) - message.service = String(object.service); - if (object.backup != null) - message.backup = String(object.backup); - switch (object.restoreType) { - default: - if (typeof object.restoreType === "number") { - message.restoreType = object.restoreType; - break; - } - break; - case "RESTORE_TYPE_UNSPECIFIED": - case 0: - message.restoreType = 0; - break; - case "FULL": - case 1: - message.restoreType = 1; - break; - case "METADATA_ONLY": - case 2: - message.restoreType = 2; - break; - } - if (object.requestId != null) - message.requestId = String(object.requestId); + var message = new $root.google.cloud.metastore.v1beta.GetFederationRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a RestoreServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetFederationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.GetFederationRequest * @static - * @param {google.cloud.metastore.v1beta.RestoreServiceRequest} message RestoreServiceRequest + * @param {google.cloud.metastore.v1beta.GetFederationRequest} message GetFederationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestoreServiceRequest.toObject = function toObject(message, options) { + GetFederationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.service = ""; - object.backup = ""; - object.restoreType = options.enums === String ? "RESTORE_TYPE_UNSPECIFIED" : 0; - object.requestId = ""; - } - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = message.backup; - if (message.restoreType != null && message.hasOwnProperty("restoreType")) - object.restoreType = options.enums === String ? $root.google.cloud.metastore.v1beta.Restore.RestoreType[message.restoreType] === undefined ? message.restoreType : $root.google.cloud.metastore.v1beta.Restore.RestoreType[message.restoreType] : message.restoreType; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this RestoreServiceRequest to JSON. + * Converts this GetFederationRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.GetFederationRequest * @instance * @returns {Object.} JSON object */ - RestoreServiceRequest.prototype.toJSON = function toJSON() { + GetFederationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RestoreServiceRequest + * Gets the default type url for GetFederationRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.RestoreServiceRequest + * @memberof google.cloud.metastore.v1beta.GetFederationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RestoreServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetFederationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.RestoreServiceRequest"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.GetFederationRequest"; }; - return RestoreServiceRequest; + return GetFederationRequest; })(); - v1beta.OperationMetadata = (function() { + v1beta.CreateFederationRequest = (function() { /** - * Properties of an OperationMetadata. + * Properties of a CreateFederationRequest. * @memberof google.cloud.metastore.v1beta - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion + * @interface ICreateFederationRequest + * @property {string|null} [parent] CreateFederationRequest parent + * @property {string|null} [federationId] CreateFederationRequest federationId + * @property {google.cloud.metastore.v1beta.IFederation|null} [federation] CreateFederationRequest federation + * @property {string|null} [requestId] CreateFederationRequest requestId */ /** - * Constructs a new OperationMetadata. + * Constructs a new CreateFederationRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata + * @classdesc Represents a CreateFederationRequest. + * @implements ICreateFederationRequest * @constructor - * @param {google.cloud.metastore.v1beta.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.ICreateFederationRequest=} [properties] Properties to set */ - function OperationMetadata(properties) { + function CreateFederationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32884,159 +44233,117 @@ } /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.metastore.v1beta.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.metastore.v1beta.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.metastore.v1beta.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.metastore.v1beta.OperationMetadata + * CreateFederationRequest parent. + * @member {string} parent + * @memberof google.cloud.metastore.v1beta.CreateFederationRequest * @instance */ - OperationMetadata.prototype.verb = ""; + CreateFederationRequest.prototype.parent = ""; /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.metastore.v1beta.OperationMetadata + * CreateFederationRequest federationId. + * @member {string} federationId + * @memberof google.cloud.metastore.v1beta.CreateFederationRequest * @instance */ - OperationMetadata.prototype.statusMessage = ""; + CreateFederationRequest.prototype.federationId = ""; /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.metastore.v1beta.OperationMetadata + * CreateFederationRequest federation. + * @member {google.cloud.metastore.v1beta.IFederation|null|undefined} federation + * @memberof google.cloud.metastore.v1beta.CreateFederationRequest * @instance */ - OperationMetadata.prototype.requestedCancellation = false; + CreateFederationRequest.prototype.federation = null; /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.metastore.v1beta.OperationMetadata + * CreateFederationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1beta.CreateFederationRequest * @instance */ - OperationMetadata.prototype.apiVersion = ""; + CreateFederationRequest.prototype.requestId = ""; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new CreateFederationRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.OperationMetadata + * @memberof google.cloud.metastore.v1beta.CreateFederationRequest * @static - * @param {google.cloud.metastore.v1beta.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.OperationMetadata} OperationMetadata instance + * @param {google.cloud.metastore.v1beta.ICreateFederationRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.CreateFederationRequest} CreateFederationRequest instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + CreateFederationRequest.create = function create(properties) { + return new CreateFederationRequest(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.metastore.v1beta.OperationMetadata.verify|verify} messages. + * Encodes the specified CreateFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.CreateFederationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.OperationMetadata + * @memberof google.cloud.metastore.v1beta.CreateFederationRequest * @static - * @param {google.cloud.metastore.v1beta.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.metastore.v1beta.ICreateFederationRequest} message CreateFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + CreateFederationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.federationId != null && Object.hasOwnProperty.call(message, "federationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.federationId); + if (message.federation != null && Object.hasOwnProperty.call(message, "federation")) + $root.google.cloud.metastore.v1beta.Federation.encode(message.federation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.OperationMetadata.verify|verify} messages. + * Encodes the specified CreateFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.CreateFederationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.OperationMetadata + * @memberof google.cloud.metastore.v1beta.CreateFederationRequest * @static - * @param {google.cloud.metastore.v1beta.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.metastore.v1beta.ICreateFederationRequest} message CreateFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + CreateFederationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a CreateFederationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.OperationMetadata + * @memberof google.cloud.metastore.v1beta.CreateFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.OperationMetadata} OperationMetadata + * @returns {google.cloud.metastore.v1beta.CreateFederationRequest} CreateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decode = function decode(reader, length) { + CreateFederationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.CreateFederationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.federationId = reader.string(); break; } case 3: { - message.target = reader.string(); + message.federation = $root.google.cloud.metastore.v1beta.Federation.decode(reader, reader.uint32()); break; } case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.statusMessage = reader.string(); - break; - } - case 6: { - message.requestedCancellation = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); + message.requestId = reader.string(); break; } default: @@ -33048,182 +44355,154 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateFederationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.OperationMetadata + * @memberof google.cloud.metastore.v1beta.CreateFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.OperationMetadata} OperationMetadata + * @returns {google.cloud.metastore.v1beta.CreateFederationRequest} CreateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + CreateFederationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies a CreateFederationRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.OperationMetadata + * @memberof google.cloud.metastore.v1beta.CreateFederationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationMetadata.verify = function verify(message) { + CreateFederationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.federationId != null && message.hasOwnProperty("federationId")) + if (!$util.isString(message.federationId)) + return "federationId: string expected"; + if (message.federation != null && message.hasOwnProperty("federation")) { + var error = $root.google.cloud.metastore.v1beta.Federation.verify(message.federation); if (error) - return "endTime." + error; + return "federation." + error; } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFederationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.OperationMetadata + * @memberof google.cloud.metastore.v1beta.CreateFederationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.OperationMetadata} OperationMetadata + * @returns {google.cloud.metastore.v1beta.CreateFederationRequest} CreateFederationRequest */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.OperationMetadata) + CreateFederationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.CreateFederationRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.metastore.v1beta.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.metastore.v1beta.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); + var message = new $root.google.cloud.metastore.v1beta.CreateFederationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.federationId != null) + message.federationId = String(object.federationId); + if (object.federation != null) { + if (typeof object.federation !== "object") + throw TypeError(".google.cloud.metastore.v1beta.CreateFederationRequest.federation: object expected"); + message.federation = $root.google.cloud.metastore.v1beta.Federation.fromObject(object.federation); + } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a CreateFederationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.OperationMetadata + * @memberof google.cloud.metastore.v1beta.CreateFederationRequest * @static - * @param {google.cloud.metastore.v1beta.OperationMetadata} message OperationMetadata + * @param {google.cloud.metastore.v1beta.CreateFederationRequest} message CreateFederationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options) { + CreateFederationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; + object.parent = ""; + object.federationId = ""; + object.federation = null; + object.requestId = ""; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.federationId != null && message.hasOwnProperty("federationId")) + object.federationId = message.federationId; + if (message.federation != null && message.hasOwnProperty("federation")) + object.federation = $root.google.cloud.metastore.v1beta.Federation.toObject(message.federation, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this CreateFederationRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.OperationMetadata + * @memberof google.cloud.metastore.v1beta.CreateFederationRequest * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + CreateFederationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for CreateFederationRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.OperationMetadata + * @memberof google.cloud.metastore.v1beta.CreateFederationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateFederationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.OperationMetadata"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.CreateFederationRequest"; }; - return OperationMetadata; + return CreateFederationRequest; })(); - v1beta.LocationMetadata = (function() { + v1beta.UpdateFederationRequest = (function() { /** - * Properties of a LocationMetadata. + * Properties of an UpdateFederationRequest. * @memberof google.cloud.metastore.v1beta - * @interface ILocationMetadata - * @property {Array.|null} [supportedHiveMetastoreVersions] LocationMetadata supportedHiveMetastoreVersions + * @interface IUpdateFederationRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFederationRequest updateMask + * @property {google.cloud.metastore.v1beta.IFederation|null} [federation] UpdateFederationRequest federation + * @property {string|null} [requestId] UpdateFederationRequest requestId */ /** - * Constructs a new LocationMetadata. + * Constructs a new UpdateFederationRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a LocationMetadata. - * @implements ILocationMetadata + * @classdesc Represents an UpdateFederationRequest. + * @implements IUpdateFederationRequest * @constructor - * @param {google.cloud.metastore.v1beta.ILocationMetadata=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IUpdateFederationRequest=} [properties] Properties to set */ - function LocationMetadata(properties) { - this.supportedHiveMetastoreVersions = []; + function UpdateFederationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33231,78 +44510,103 @@ } /** - * LocationMetadata supportedHiveMetastoreVersions. - * @member {Array.} supportedHiveMetastoreVersions - * @memberof google.cloud.metastore.v1beta.LocationMetadata + * UpdateFederationRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.metastore.v1beta.UpdateFederationRequest * @instance */ - LocationMetadata.prototype.supportedHiveMetastoreVersions = $util.emptyArray; + UpdateFederationRequest.prototype.updateMask = null; /** - * Creates a new LocationMetadata instance using the specified properties. + * UpdateFederationRequest federation. + * @member {google.cloud.metastore.v1beta.IFederation|null|undefined} federation + * @memberof google.cloud.metastore.v1beta.UpdateFederationRequest + * @instance + */ + UpdateFederationRequest.prototype.federation = null; + + /** + * UpdateFederationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1beta.UpdateFederationRequest + * @instance + */ + UpdateFederationRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateFederationRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.LocationMetadata + * @memberof google.cloud.metastore.v1beta.UpdateFederationRequest * @static - * @param {google.cloud.metastore.v1beta.ILocationMetadata=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.LocationMetadata} LocationMetadata instance + * @param {google.cloud.metastore.v1beta.IUpdateFederationRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.UpdateFederationRequest} UpdateFederationRequest instance */ - LocationMetadata.create = function create(properties) { - return new LocationMetadata(properties); + UpdateFederationRequest.create = function create(properties) { + return new UpdateFederationRequest(properties); }; /** - * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.verify|verify} messages. + * Encodes the specified UpdateFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateFederationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.LocationMetadata + * @memberof google.cloud.metastore.v1beta.UpdateFederationRequest * @static - * @param {google.cloud.metastore.v1beta.ILocationMetadata} message LocationMetadata message or plain object to encode + * @param {google.cloud.metastore.v1beta.IUpdateFederationRequest} message UpdateFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LocationMetadata.encode = function encode(message, writer) { + UpdateFederationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.supportedHiveMetastoreVersions != null && message.supportedHiveMetastoreVersions.length) - for (var i = 0; i < message.supportedHiveMetastoreVersions.length; ++i) - $root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.encode(message.supportedHiveMetastoreVersions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.federation != null && Object.hasOwnProperty.call(message, "federation")) + $root.google.cloud.metastore.v1beta.Federation.encode(message.federation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.verify|verify} messages. + * Encodes the specified UpdateFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.UpdateFederationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.LocationMetadata + * @memberof google.cloud.metastore.v1beta.UpdateFederationRequest * @static - * @param {google.cloud.metastore.v1beta.ILocationMetadata} message LocationMetadata message or plain object to encode + * @param {google.cloud.metastore.v1beta.IUpdateFederationRequest} message UpdateFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LocationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + UpdateFederationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LocationMetadata message from the specified reader or buffer. + * Decodes an UpdateFederationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.LocationMetadata + * @memberof google.cloud.metastore.v1beta.UpdateFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.LocationMetadata} LocationMetadata + * @returns {google.cloud.metastore.v1beta.UpdateFederationRequest} UpdateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LocationMetadata.decode = function decode(reader, length) { + UpdateFederationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.LocationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.UpdateFederationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.supportedHiveMetastoreVersions && message.supportedHiveMetastoreVersions.length)) - message.supportedHiveMetastoreVersions = []; - message.supportedHiveMetastoreVersions.push($root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.decode(reader, reader.uint32())); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.federation = $root.google.cloud.metastore.v1beta.Federation.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); break; } default: @@ -33314,365 +44618,150 @@ }; /** - * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. + * Decodes an UpdateFederationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.LocationMetadata + * @memberof google.cloud.metastore.v1beta.UpdateFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.LocationMetadata} LocationMetadata + * @returns {google.cloud.metastore.v1beta.UpdateFederationRequest} UpdateFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LocationMetadata.decodeDelimited = function decodeDelimited(reader) { + UpdateFederationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LocationMetadata message. + * Verifies an UpdateFederationRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.LocationMetadata + * @memberof google.cloud.metastore.v1beta.UpdateFederationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LocationMetadata.verify = function verify(message) { + UpdateFederationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.supportedHiveMetastoreVersions != null && message.hasOwnProperty("supportedHiveMetastoreVersions")) { - if (!Array.isArray(message.supportedHiveMetastoreVersions)) - return "supportedHiveMetastoreVersions: array expected"; - for (var i = 0; i < message.supportedHiveMetastoreVersions.length; ++i) { - var error = $root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.verify(message.supportedHiveMetastoreVersions[i]); - if (error) - return "supportedHiveMetastoreVersions." + error; - } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.federation != null && message.hasOwnProperty("federation")) { + var error = $root.google.cloud.metastore.v1beta.Federation.verify(message.federation); + if (error) + return "federation." + error; } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFederationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.LocationMetadata + * @memberof google.cloud.metastore.v1beta.UpdateFederationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.LocationMetadata} LocationMetadata + * @returns {google.cloud.metastore.v1beta.UpdateFederationRequest} UpdateFederationRequest */ - LocationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.LocationMetadata) + UpdateFederationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.UpdateFederationRequest) return object; - var message = new $root.google.cloud.metastore.v1beta.LocationMetadata(); - if (object.supportedHiveMetastoreVersions) { - if (!Array.isArray(object.supportedHiveMetastoreVersions)) - throw TypeError(".google.cloud.metastore.v1beta.LocationMetadata.supportedHiveMetastoreVersions: array expected"); - message.supportedHiveMetastoreVersions = []; - for (var i = 0; i < object.supportedHiveMetastoreVersions.length; ++i) { - if (typeof object.supportedHiveMetastoreVersions[i] !== "object") - throw TypeError(".google.cloud.metastore.v1beta.LocationMetadata.supportedHiveMetastoreVersions: object expected"); - message.supportedHiveMetastoreVersions[i] = $root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.fromObject(object.supportedHiveMetastoreVersions[i]); - } + var message = new $root.google.cloud.metastore.v1beta.UpdateFederationRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.metastore.v1beta.UpdateFederationRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.federation != null) { + if (typeof object.federation !== "object") + throw TypeError(".google.cloud.metastore.v1beta.UpdateFederationRequest.federation: object expected"); + message.federation = $root.google.cloud.metastore.v1beta.Federation.fromObject(object.federation); } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. + * Creates a plain object from an UpdateFederationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.LocationMetadata + * @memberof google.cloud.metastore.v1beta.UpdateFederationRequest * @static - * @param {google.cloud.metastore.v1beta.LocationMetadata} message LocationMetadata + * @param {google.cloud.metastore.v1beta.UpdateFederationRequest} message UpdateFederationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LocationMetadata.toObject = function toObject(message, options) { + UpdateFederationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.supportedHiveMetastoreVersions = []; - if (message.supportedHiveMetastoreVersions && message.supportedHiveMetastoreVersions.length) { - object.supportedHiveMetastoreVersions = []; - for (var j = 0; j < message.supportedHiveMetastoreVersions.length; ++j) - object.supportedHiveMetastoreVersions[j] = $root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.toObject(message.supportedHiveMetastoreVersions[j], options); + if (options.defaults) { + object.updateMask = null; + object.federation = null; + object.requestId = ""; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.federation != null && message.hasOwnProperty("federation")) + object.federation = $root.google.cloud.metastore.v1beta.Federation.toObject(message.federation, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this LocationMetadata to JSON. + * Converts this UpdateFederationRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.LocationMetadata + * @memberof google.cloud.metastore.v1beta.UpdateFederationRequest * @instance * @returns {Object.} JSON object */ - LocationMetadata.prototype.toJSON = function toJSON() { + UpdateFederationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LocationMetadata + * Gets the default type url for UpdateFederationRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.LocationMetadata + * @memberof google.cloud.metastore.v1beta.UpdateFederationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LocationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateFederationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.LocationMetadata"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.UpdateFederationRequest"; }; - LocationMetadata.HiveMetastoreVersion = (function() { - - /** - * Properties of a HiveMetastoreVersion. - * @memberof google.cloud.metastore.v1beta.LocationMetadata - * @interface IHiveMetastoreVersion - * @property {string|null} [version] HiveMetastoreVersion version - * @property {boolean|null} [isDefault] HiveMetastoreVersion isDefault - */ - - /** - * Constructs a new HiveMetastoreVersion. - * @memberof google.cloud.metastore.v1beta.LocationMetadata - * @classdesc Represents a HiveMetastoreVersion. - * @implements IHiveMetastoreVersion - * @constructor - * @param {google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion=} [properties] Properties to set - */ - function HiveMetastoreVersion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HiveMetastoreVersion version. - * @member {string} version - * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - * @instance - */ - HiveMetastoreVersion.prototype.version = ""; - - /** - * HiveMetastoreVersion isDefault. - * @member {boolean} isDefault - * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - * @instance - */ - HiveMetastoreVersion.prototype.isDefault = false; - - /** - * Creates a new HiveMetastoreVersion instance using the specified properties. - * @function create - * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - * @static - * @param {google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion instance - */ - HiveMetastoreVersion.create = function create(properties) { - return new HiveMetastoreVersion(properties); - }; - - /** - * Encodes the specified HiveMetastoreVersion message. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. - * @function encode - * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - * @static - * @param {google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion} message HiveMetastoreVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HiveMetastoreVersion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDefault); - return writer; - }; - - /** - * Encodes the specified HiveMetastoreVersion message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - * @static - * @param {google.cloud.metastore.v1beta.LocationMetadata.IHiveMetastoreVersion} message HiveMetastoreVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HiveMetastoreVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HiveMetastoreVersion message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HiveMetastoreVersion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.isDefault = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HiveMetastoreVersion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HiveMetastoreVersion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HiveMetastoreVersion message. - * @function verify - * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HiveMetastoreVersion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.isDefault != null && message.hasOwnProperty("isDefault")) - if (typeof message.isDefault !== "boolean") - return "isDefault: boolean expected"; - return null; - }; - - /** - * Creates a HiveMetastoreVersion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion} HiveMetastoreVersion - */ - HiveMetastoreVersion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) - return object; - var message = new $root.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion(); - if (object.version != null) - message.version = String(object.version); - if (object.isDefault != null) - message.isDefault = Boolean(object.isDefault); - return message; - }; - - /** - * Creates a plain object from a HiveMetastoreVersion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - * @static - * @param {google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion} message HiveMetastoreVersion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HiveMetastoreVersion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.isDefault = false; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.isDefault != null && message.hasOwnProperty("isDefault")) - object.isDefault = message.isDefault; - return object; - }; - - /** - * Converts this HiveMetastoreVersion to JSON. - * @function toJSON - * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - * @instance - * @returns {Object.} JSON object - */ - HiveMetastoreVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HiveMetastoreVersion - * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HiveMetastoreVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion"; - }; - - return HiveMetastoreVersion; - })(); - - return LocationMetadata; + return UpdateFederationRequest; })(); - v1beta.DatabaseDumpSpec = (function() { + v1beta.DeleteFederationRequest = (function() { /** - * Properties of a DatabaseDumpSpec. + * Properties of a DeleteFederationRequest. * @memberof google.cloud.metastore.v1beta - * @interface IDatabaseDumpSpec + * @interface IDeleteFederationRequest + * @property {string|null} [name] DeleteFederationRequest name + * @property {string|null} [requestId] DeleteFederationRequest requestId */ /** - * Constructs a new DatabaseDumpSpec. + * Constructs a new DeleteFederationRequest. * @memberof google.cloud.metastore.v1beta - * @classdesc Represents a DatabaseDumpSpec. - * @implements IDatabaseDumpSpec + * @classdesc Represents a DeleteFederationRequest. + * @implements IDeleteFederationRequest * @constructor - * @param {google.cloud.metastore.v1beta.IDatabaseDumpSpec=} [properties] Properties to set + * @param {google.cloud.metastore.v1beta.IDeleteFederationRequest=} [properties] Properties to set */ - function DatabaseDumpSpec(properties) { + function DeleteFederationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33680,63 +44769,91 @@ } /** - * Creates a new DatabaseDumpSpec instance using the specified properties. + * DeleteFederationRequest name. + * @member {string} name + * @memberof google.cloud.metastore.v1beta.DeleteFederationRequest + * @instance + */ + DeleteFederationRequest.prototype.name = ""; + + /** + * DeleteFederationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.metastore.v1beta.DeleteFederationRequest + * @instance + */ + DeleteFederationRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteFederationRequest instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.DeleteFederationRequest * @static - * @param {google.cloud.metastore.v1beta.IDatabaseDumpSpec=} [properties] Properties to set - * @returns {google.cloud.metastore.v1beta.DatabaseDumpSpec} DatabaseDumpSpec instance + * @param {google.cloud.metastore.v1beta.IDeleteFederationRequest=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.DeleteFederationRequest} DeleteFederationRequest instance */ - DatabaseDumpSpec.create = function create(properties) { - return new DatabaseDumpSpec(properties); + DeleteFederationRequest.create = function create(properties) { + return new DeleteFederationRequest(properties); }; /** - * Encodes the specified DatabaseDumpSpec message. Does not implicitly {@link google.cloud.metastore.v1beta.DatabaseDumpSpec.verify|verify} messages. + * Encodes the specified DeleteFederationRequest message. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteFederationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.DeleteFederationRequest * @static - * @param {google.cloud.metastore.v1beta.IDatabaseDumpSpec} message DatabaseDumpSpec message or plain object to encode + * @param {google.cloud.metastore.v1beta.IDeleteFederationRequest} message DeleteFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseDumpSpec.encode = function encode(message, writer) { + DeleteFederationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified DatabaseDumpSpec message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DatabaseDumpSpec.verify|verify} messages. + * Encodes the specified DeleteFederationRequest message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.DeleteFederationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.DeleteFederationRequest * @static - * @param {google.cloud.metastore.v1beta.IDatabaseDumpSpec} message DatabaseDumpSpec message or plain object to encode + * @param {google.cloud.metastore.v1beta.IDeleteFederationRequest} message DeleteFederationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseDumpSpec.encodeDelimited = function encodeDelimited(message, writer) { + DeleteFederationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DatabaseDumpSpec message from the specified reader or buffer. + * Decodes a DeleteFederationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.DeleteFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.metastore.v1beta.DatabaseDumpSpec} DatabaseDumpSpec + * @returns {google.cloud.metastore.v1beta.DeleteFederationRequest} DeleteFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseDumpSpec.decode = function decode(reader, length) { + DeleteFederationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.DatabaseDumpSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.DeleteFederationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -33746,103 +44863,111 @@ }; /** - * Decodes a DatabaseDumpSpec message from the specified reader or buffer, length delimited. + * Decodes a DeleteFederationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.DeleteFederationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1beta.DatabaseDumpSpec} DatabaseDumpSpec + * @returns {google.cloud.metastore.v1beta.DeleteFederationRequest} DeleteFederationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseDumpSpec.decodeDelimited = function decodeDelimited(reader) { + DeleteFederationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DatabaseDumpSpec message. + * Verifies a DeleteFederationRequest message. * @function verify - * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.DeleteFederationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DatabaseDumpSpec.verify = function verify(message) { + DeleteFederationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a DatabaseDumpSpec message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFederationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.DeleteFederationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1beta.DatabaseDumpSpec} DatabaseDumpSpec + * @returns {google.cloud.metastore.v1beta.DeleteFederationRequest} DeleteFederationRequest */ - DatabaseDumpSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1beta.DatabaseDumpSpec) + DeleteFederationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.DeleteFederationRequest) return object; - return new $root.google.cloud.metastore.v1beta.DatabaseDumpSpec(); + var message = new $root.google.cloud.metastore.v1beta.DeleteFederationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; }; /** - * Creates a plain object from a DatabaseDumpSpec message. Also converts values to other types if specified. + * Creates a plain object from a DeleteFederationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.DeleteFederationRequest * @static - * @param {google.cloud.metastore.v1beta.DatabaseDumpSpec} message DatabaseDumpSpec + * @param {google.cloud.metastore.v1beta.DeleteFederationRequest} message DeleteFederationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DatabaseDumpSpec.toObject = function toObject() { - return {}; + DeleteFederationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; }; /** - * Converts this DatabaseDumpSpec to JSON. + * Converts this DeleteFederationRequest to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.DeleteFederationRequest * @instance * @returns {Object.} JSON object */ - DatabaseDumpSpec.prototype.toJSON = function toJSON() { + DeleteFederationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DatabaseDumpSpec + * Gets the default type url for DeleteFederationRequest * @function getTypeUrl - * @memberof google.cloud.metastore.v1beta.DatabaseDumpSpec + * @memberof google.cloud.metastore.v1beta.DeleteFederationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DatabaseDumpSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteFederationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.metastore.v1beta.DatabaseDumpSpec"; + return typeUrlPrefix + "/google.cloud.metastore.v1beta.DeleteFederationRequest"; }; - /** - * Type enum. - * @name google.cloud.metastore.v1beta.DatabaseDumpSpec.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} MYSQL=1 MYSQL value - */ - DatabaseDumpSpec.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MYSQL"] = 1; - return values; - })(); - - return DatabaseDumpSpec; + return DeleteFederationRequest; })(); return v1beta; diff --git a/packages/google-cloud-metastore/protos/protos.json b/packages/google-cloud-metastore/protos/protos.json index ce4ebacdacc..bce57a2ca19 100644 --- a/packages/google-cloud-metastore/protos/protos.json +++ b/packages/google-cloud-metastore/protos/protos.json @@ -10,10 +10,11 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/cloud/metastore/v1;metastore", "java_multiple_files": true, - "java_outer_classname": "MetastoreProto", + "java_outer_classname": "MetastoreFederationProto", "java_package": "com.google.cloud.metastore.v1", - "(google.api.resource_definition).type": "compute.googleapis.com/Network", - "(google.api.resource_definition).pattern": "projects/{project}/global/networks/{network}" + "php_namespace": "Google\\Cloud\\Metastore\\V1", + "(google.api.resource_definition).type": "compute.googleapis.com/Subnetwork", + "(google.api.resource_definition).pattern": "projects/{project}/regions/{region}/subnetworks/{subnetwork}" }, "nested": { "DataprocMetastore": { @@ -66,7 +67,7 @@ "(google.api.http).body": "service", "(google.api.method_signature)": "parent,service,service_id", "(google.longrunning.operation_info).response_type": "Service", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1.OperationMetadata" }, "parsedOptions": [ { @@ -81,7 +82,7 @@ { "(google.longrunning.operation_info)": { "response_type": "Service", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1.OperationMetadata" } } ] @@ -94,7 +95,7 @@ "(google.api.http).body": "service", "(google.api.method_signature)": "service,update_mask", "(google.longrunning.operation_info).response_type": "Service", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1.OperationMetadata" }, "parsedOptions": [ { @@ -109,7 +110,7 @@ { "(google.longrunning.operation_info)": { "response_type": "Service", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1.OperationMetadata" } } ] @@ -121,7 +122,7 @@ "(google.api.http).delete": "/v1/{name=projects/*/locations/*/services/*}", "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1.OperationMetadata" }, "parsedOptions": [ { @@ -135,7 +136,7 @@ { "(google.longrunning.operation_info)": { "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1.OperationMetadata" } } ] @@ -184,7 +185,7 @@ "(google.api.http).body": "metadata_import", "(google.api.method_signature)": "parent,metadata_import,metadata_import_id", "(google.longrunning.operation_info).response_type": "MetadataImport", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1.OperationMetadata" }, "parsedOptions": [ { @@ -199,7 +200,7 @@ { "(google.longrunning.operation_info)": { "response_type": "MetadataImport", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1.OperationMetadata" } } ] @@ -212,7 +213,7 @@ "(google.api.http).body": "metadata_import", "(google.api.method_signature)": "metadata_import,update_mask", "(google.longrunning.operation_info).response_type": "MetadataImport", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1.OperationMetadata" }, "parsedOptions": [ { @@ -227,7 +228,7 @@ { "(google.longrunning.operation_info)": { "response_type": "MetadataImport", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1.OperationMetadata" } } ] @@ -239,7 +240,7 @@ "(google.api.http).post": "/v1/{service=projects/*/locations/*/services/*}:exportMetadata", "(google.api.http).body": "*", "(google.longrunning.operation_info).response_type": "MetadataExport", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1.OperationMetadata" }, "parsedOptions": [ { @@ -251,7 +252,7 @@ { "(google.longrunning.operation_info)": { "response_type": "MetadataExport", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1.OperationMetadata" } } ] @@ -264,7 +265,7 @@ "(google.api.http).body": "*", "(google.api.method_signature)": "service,backup", "(google.longrunning.operation_info).response_type": "Restore", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1.OperationMetadata" }, "parsedOptions": [ { @@ -279,7 +280,7 @@ { "(google.longrunning.operation_info)": { "response_type": "Restore", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1.OperationMetadata" } } ] @@ -328,7 +329,7 @@ "(google.api.http).body": "backup", "(google.api.method_signature)": "parent,backup,backup_id", "(google.longrunning.operation_info).response_type": "Backup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1.OperationMetadata" }, "parsedOptions": [ { @@ -343,7 +344,7 @@ { "(google.longrunning.operation_info)": { "response_type": "Backup", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1.OperationMetadata" } } ] @@ -355,7 +356,7 @@ "(google.api.http).delete": "/v1/{name=projects/*/locations/*/services/*/backups/*}", "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1.OperationMetadata" }, "parsedOptions": [ { @@ -369,7 +370,7 @@ { "(google.longrunning.operation_info)": { "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1.OperationMetadata" } } ] @@ -487,6 +488,28 @@ "options": { "(google.api.field_behavior)": "IMMUTABLE" } + }, + "encryptionConfig": { + "type": "EncryptionConfig", + "id": 20, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "networkConfig": { + "type": "NetworkConfig", + "id": 21 + }, + "databaseType": { + "type": "DatabaseType", + "id": 22, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "telemetryConfig": { + "type": "TelemetryConfig", + "id": 23 } }, "nested": { @@ -515,6 +538,13 @@ "CANARY": 1, "STABLE": 2 } + }, + "DatabaseType": { + "values": { + "DATABASE_TYPE_UNSPECIFIED": 0, + "MYSQL": 1, + "SPANNER": 2 + } } } }, @@ -581,6 +611,71 @@ } } }, + "EncryptionConfig": { + "fields": { + "kmsKey": { + "type": "string", + "id": 1 + } + } + }, + "NetworkConfig": { + "fields": { + "consumers": { + "rule": "repeated", + "type": "Consumer", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + }, + "nested": { + "Consumer": { + "oneofs": { + "vpcResource": { + "oneof": [ + "subnetwork" + ] + } + }, + "fields": { + "subnetwork": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "compute.googleapis.com/Subnetwork" + } + }, + "endpointUri": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "TelemetryConfig": { + "fields": { + "logFormat": { + "type": "LogFormat", + "id": 1 + } + }, + "nested": { + "LogFormat": { + "values": { + "LOG_FORMAT_UNSPECIFIED": 0, + "LEGACY": 1, + "JSON": 2 + } + } + } + }, "MetadataManagementActivity": { "fields": { "metadataExports": { @@ -899,7 +994,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Service" } }, "pageSize": { @@ -969,7 +1064,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Service" } }, "serviceId": { @@ -1046,7 +1141,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.resource_reference).child_type": "metastore.googleapis.com/MetadataImport" } }, "pageSize": { @@ -1116,7 +1211,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.resource_reference).child_type": "metastore.googleapis.com/MetadataImport" } }, "metadataImportId": { @@ -1174,7 +1269,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Backup" } }, "pageSize": { @@ -1244,7 +1339,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Backup" } }, "backupId": { @@ -1447,37 +1542,24 @@ } } } - } - } - }, - "v1alpha": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/cloud/metastore/v1alpha;metastore", - "java_multiple_files": true, - "java_outer_classname": "MetastoreProto", - "java_package": "com.google.cloud.metastore.v1alpha", - "php_namespace": "Google\\Cloud\\Metastore\\V1alpha", - "(google.api.resource_definition).type": "dataplex.googleapis.com/Lake", - "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/lakes/{lake}" - }, - "nested": { - "DataprocMetastore": { + }, + "DataprocMetastoreFederation": { "options": { "(google.api.default_host)": "metastore.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" }, "methods": { - "ListServices": { - "requestType": "ListServicesRequest", - "responseType": "ListServicesResponse", + "ListFederations": { + "requestType": "ListFederationsRequest", + "responseType": "ListFederationsResponse", "options": { - "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*}/services", + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/federations", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1alpha/{parent=projects/*/locations/*}/services" + "get": "/v1/{parent=projects/*/locations/*}/federations" } }, { @@ -1485,17 +1567,17 @@ } ] }, - "GetService": { - "requestType": "GetServiceRequest", - "responseType": "Service", + "GetFederation": { + "requestType": "GetFederationRequest", + "responseType": "Federation", "options": { - "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/services/*}", + "(google.api.http).get": "/v1/{name=projects/*/locations/*/federations/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1alpha/{name=projects/*/locations/*/services/*}" + "get": "/v1/{name=projects/*/locations/*/federations/*}" } }, { @@ -1503,75 +1585,75 @@ } ] }, - "CreateService": { - "requestType": "CreateServiceRequest", + "CreateFederation": { + "requestType": "CreateFederationRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).post": "/v1alpha/{parent=projects/*/locations/*}/services", - "(google.api.http).body": "service", - "(google.api.method_signature)": "parent,service,service_id", - "(google.longrunning.operation_info).response_type": "Service", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/federations", + "(google.api.http).body": "federation", + "(google.api.method_signature)": "parent,federation,federation_id", + "(google.longrunning.operation_info).response_type": "Federation", + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1.OperationMetadata" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v1alpha/{parent=projects/*/locations/*}/services", - "body": "service" + "post": "/v1/{parent=projects/*/locations/*}/federations", + "body": "federation" } }, { - "(google.api.method_signature)": "parent,service,service_id" + "(google.api.method_signature)": "parent,federation,federation_id" }, { "(google.longrunning.operation_info)": { - "response_type": "Service", - "metadata_type": "OperationMetadata" + "response_type": "Federation", + "metadata_type": "google.cloud.metastore.v1.OperationMetadata" } } ] }, - "UpdateService": { - "requestType": "UpdateServiceRequest", + "UpdateFederation": { + "requestType": "UpdateFederationRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).patch": "/v1alpha/{service.name=projects/*/locations/*/services/*}", - "(google.api.http).body": "service", - "(google.api.method_signature)": "service,update_mask", - "(google.longrunning.operation_info).response_type": "Service", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.api.http).patch": "/v1/{federation.name=projects/*/locations/*/federations/*}", + "(google.api.http).body": "federation", + "(google.api.method_signature)": "federation,update_mask", + "(google.longrunning.operation_info).response_type": "Federation", + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1.OperationMetadata" }, "parsedOptions": [ { "(google.api.http)": { - "patch": "/v1alpha/{service.name=projects/*/locations/*/services/*}", - "body": "service" + "patch": "/v1/{federation.name=projects/*/locations/*/federations/*}", + "body": "federation" } }, { - "(google.api.method_signature)": "service,update_mask" + "(google.api.method_signature)": "federation,update_mask" }, { "(google.longrunning.operation_info)": { - "response_type": "Service", - "metadata_type": "OperationMetadata" + "response_type": "Federation", + "metadata_type": "google.cloud.metastore.v1.OperationMetadata" } } ] }, - "DeleteService": { - "requestType": "DeleteServiceRequest", + "DeleteFederation": { + "requestType": "DeleteFederationRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).delete": "/v1alpha/{name=projects/*/locations/*/services/*}", + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/federations/*}", "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1.OperationMetadata" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v1alpha/{name=projects/*/locations/*/services/*}" + "delete": "/v1/{name=projects/*/locations/*/federations/*}" } }, { @@ -1580,111 +1662,503 @@ { "(google.longrunning.operation_info)": { "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1.OperationMetadata" } } ] - }, - "ListMetadataImports": { - "requestType": "ListMetadataImportsRequest", - "responseType": "ListMetadataImportsResponse", + } + } + }, + "Federation": { + "options": { + "(google.api.resource).type": "metastore.googleapis.com/Federation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/federations/{federation}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + "(google.api.field_behavior)": "IMMUTABLE" + } }, - "GetMetadataImport": { - "requestType": "GetMetadataImportRequest", - "responseType": "MetadataImport", + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, "options": { - "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/services/*/metadataImports/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{name=projects/*/locations/*/services/*/metadataImports/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "CreateMetadataImport": { - "requestType": "CreateMetadataImportRequest", - "responseType": "google.longrunning.Operation", + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, "options": { - "(google.api.http).post": "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports", - "(google.api.http).body": "metadata_import", - "(google.api.method_signature)": "parent,metadata_import,metadata_import_id", - "(google.longrunning.operation_info).response_type": "MetadataImport", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports", - "body": "metadata_import" - } - }, - { - "(google.api.method_signature)": "parent,metadata_import,metadata_import_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "MetadataImport", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "UpdateMetadataImport": { - "requestType": "UpdateMetadataImportRequest", - "responseType": "google.longrunning.Operation", + "labels": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "version": { + "type": "string", + "id": 5, "options": { - "(google.api.http).patch": "/v1alpha/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}", - "(google.api.http).body": "metadata_import", - "(google.api.method_signature)": "metadata_import,update_mask", - "(google.longrunning.operation_info).response_type": "MetadataImport", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1alpha/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}", - "body": "metadata_import" - } - }, - { - "(google.api.method_signature)": "metadata_import,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "MetadataImport", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "IMMUTABLE" + } }, - "ExportMetadata": { - "requestType": "ExportMetadataRequest", - "responseType": "google.longrunning.Operation", + "backendMetastores": { + "keyType": "int32", + "type": "BackendMetastore", + "id": 6 + }, + "endpointUri": { + "type": "string", + "id": 7, "options": { - "(google.api.http).post": "/v1alpha/{service=projects/*/locations/*/services/*}:exportMetadata", + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateMessage": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "UPDATING": 3, + "DELETING": 4, + "ERROR": 5 + } + } + } + }, + "BackendMetastore": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metastoreType": { + "type": "MetastoreType", + "id": 2 + } + }, + "nested": { + "MetastoreType": { + "values": { + "METASTORE_TYPE_UNSPECIFIED": 0, + "DATAPROC_METASTORE": 3 + } + } + } + }, + "ListFederationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Federation" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListFederationsResponse": { + "fields": { + "federations": { + "rule": "repeated", + "type": "Federation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetFederationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/Federation" + } + } + } + }, + "CreateFederationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Federation" + } + }, + "federationId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "federation": { + "type": "Federation", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateFederationRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "federation": { + "type": "Federation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteFederationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/Federation" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "v1alpha": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/cloud/metastore/v1alpha;metastore", + "java_multiple_files": true, + "java_outer_classname": "MetastoreFederationProto", + "java_package": "com.google.cloud.metastore.v1alpha", + "php_namespace": "Google\\Cloud\\Metastore\\V1alpha", + "(google.api.resource_definition).type": "dataplex.googleapis.com/Lake", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/lakes/{lake}" + }, + "nested": { + "DataprocMetastore": { + "options": { + "(google.api.default_host)": "metastore.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListServices": { + "requestType": "ListServicesRequest", + "responseType": "ListServicesResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*}/services", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*}/services" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetService": { + "requestType": "GetServiceRequest", + "responseType": "Service", + "options": { + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/services/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/services/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateService": { + "requestType": "CreateServiceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1alpha/{parent=projects/*/locations/*}/services", + "(google.api.http).body": "service", + "(google.api.method_signature)": "parent,service,service_id", + "(google.longrunning.operation_info).response_type": "Service", + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=projects/*/locations/*}/services", + "body": "service" + } + }, + { + "(google.api.method_signature)": "parent,service,service_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Service", + "metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + } + } + ] + }, + "UpdateService": { + "requestType": "UpdateServiceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1alpha/{service.name=projects/*/locations/*/services/*}", + "(google.api.http).body": "service", + "(google.api.method_signature)": "service,update_mask", + "(google.longrunning.operation_info).response_type": "Service", + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{service.name=projects/*/locations/*/services/*}", + "body": "service" + } + }, + { + "(google.api.method_signature)": "service,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Service", + "metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + } + } + ] + }, + "DeleteService": { + "requestType": "DeleteServiceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1alpha/{name=projects/*/locations/*/services/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=projects/*/locations/*/services/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + } + } + ] + }, + "ListMetadataImports": { + "requestType": "ListMetadataImportsRequest", + "responseType": "ListMetadataImportsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetMetadataImport": { + "requestType": "GetMetadataImportRequest", + "responseType": "MetadataImport", + "options": { + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/services/*/metadataImports/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/services/*/metadataImports/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateMetadataImport": { + "requestType": "CreateMetadataImportRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports", + "(google.api.http).body": "metadata_import", + "(google.api.method_signature)": "parent,metadata_import,metadata_import_id", + "(google.longrunning.operation_info).response_type": "MetadataImport", + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports", + "body": "metadata_import" + } + }, + { + "(google.api.method_signature)": "parent,metadata_import,metadata_import_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "MetadataImport", + "metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + } + } + ] + }, + "UpdateMetadataImport": { + "requestType": "UpdateMetadataImportRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1alpha/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}", + "(google.api.http).body": "metadata_import", + "(google.api.method_signature)": "metadata_import,update_mask", + "(google.longrunning.operation_info).response_type": "MetadataImport", + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}", + "body": "metadata_import" + } + }, + { + "(google.api.method_signature)": "metadata_import,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "MetadataImport", + "metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + } + } + ] + }, + "ExportMetadata": { + "requestType": "ExportMetadataRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1alpha/{service=projects/*/locations/*/services/*}:exportMetadata", "(google.api.http).body": "*", "(google.longrunning.operation_info).response_type": "MetadataExport", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" }, "parsedOptions": [ { @@ -1696,7 +2170,7 @@ { "(google.longrunning.operation_info)": { "response_type": "MetadataExport", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" } } ] @@ -1709,7 +2183,7 @@ "(google.api.http).body": "*", "(google.api.method_signature)": "service,backup", "(google.longrunning.operation_info).response_type": "Restore", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" }, "parsedOptions": [ { @@ -1724,7 +2198,7 @@ { "(google.longrunning.operation_info)": { "response_type": "Restore", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" } } ] @@ -1773,7 +2247,7 @@ "(google.api.http).body": "backup", "(google.api.method_signature)": "parent,backup,backup_id", "(google.longrunning.operation_info).response_type": "Backup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" }, "parsedOptions": [ { @@ -1788,7 +2262,7 @@ { "(google.longrunning.operation_info)": { "response_type": "Backup", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" } } ] @@ -1800,7 +2274,7 @@ "(google.api.http).delete": "/v1alpha/{name=projects/*/locations/*/services/*/backups/*}", "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" }, "parsedOptions": [ { @@ -1814,7 +2288,7 @@ { "(google.longrunning.operation_info)": { "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" } } ] @@ -1946,10 +2420,7 @@ }, "networkConfig": { "type": "NetworkConfig", - "id": 21, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } + "id": 21 }, "databaseType": { "type": "DatabaseType", @@ -1957,6 +2428,10 @@ "options": { "(google.api.field_behavior)": "IMMUTABLE" } + }, + "telemetryConfig": { + "type": "TelemetryConfig", + "id": 23 } }, "nested": { @@ -2169,6 +2644,7 @@ "type": "string", "id": 1, "options": { + "(google.api.field_behavior)": "IMMUTABLE", "(google.api.resource_reference).type": "compute.googleapis.com/Subnetwork" } }, @@ -2183,6 +2659,23 @@ } } }, + "TelemetryConfig": { + "fields": { + "logFormat": { + "type": "LogFormat", + "id": 1 + } + }, + "nested": { + "LogFormat": { + "values": { + "LOG_FORMAT_UNSPECIFIED": 0, + "LEGACY": 1, + "JSON": 2 + } + } + } + }, "MetadataManagementActivity": { "fields": { "metadataExports": { @@ -2301,214 +2794,489 @@ } } }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "RUNNING": 1, - "SUCCEEDED": 2, - "UPDATING": 3, - "FAILED": 4 + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "SUCCEEDED": 2, + "UPDATING": 3, + "FAILED": 4 + } + } + } + }, + "MetadataExport": { + "oneofs": { + "destination": { + "oneof": [ + "destinationGcsUri" + ] + } + }, + "fields": { + "destinationGcsUri": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "databaseDumpType": { + "type": "DatabaseDumpSpec.Type", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "SUCCEEDED": 2, + "FAILED": 3, + "CANCELLED": 4 + } + } + } + }, + "Backup": { + "options": { + "(google.api.resource).type": "metastore.googleapis.com/Backup", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/services/{service}/backups/{backup}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceRevision": { + "type": "Service", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 6 + }, + "restoringServices": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "DELETING": 2, + "ACTIVE": 3, + "FAILED": 4, + "RESTORING": 5 + } + } + } + }, + "Restore": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backup": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" + } + }, + "type": { + "type": "RestoreType", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "details": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "SUCCEEDED": 2, + "FAILED": 3, + "CANCELLED": 4 + } + }, + "RestoreType": { + "values": { + "RESTORE_TYPE_UNSPECIFIED": 0, + "FULL": 1, + "METADATA_ONLY": 2 + } + } + } + }, + "ListServicesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Service" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "MetadataExport": { - "oneofs": { - "destination": { - "oneof": [ - "destinationGcsUri" - ] + "ListServicesResponse": { + "fields": { + "services": { + "rule": "repeated", + "type": "Service", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 } - }, + } + }, + "GetServiceRequest": { "fields": { - "destinationGcsUri": { + "name": { "type": "string", - "id": 4, + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/Service" } - }, - "startTime": { - "type": "google.protobuf.Timestamp", + } + } + }, + "CreateServiceRequest": { + "fields": { + "parent": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Service" } }, - "endTime": { - "type": "google.protobuf.Timestamp", + "serviceId": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "state": { - "type": "State", + "service": { + "type": "Service", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "databaseDumpType": { - "type": "DatabaseDumpSpec.Type", - "id": 5, + "requestId": { + "type": "string", + "id": 4, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "RUNNING": 1, - "SUCCEEDED": 2, - "FAILED": 3, - "CANCELLED": 4 + } + }, + "UpdateServiceRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "service": { + "type": "Service", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "Backup": { - "options": { - "(google.api.resource).type": "metastore.googleapis.com/Backup", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/services/{service}/backups/{backup}" - }, + "DeleteServiceRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/Service" } }, - "createTime": { - "type": "google.protobuf.Timestamp", + "requestId": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMetadataImportsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "metastore.googleapis.com/MetadataImport" } }, - "endTime": { - "type": "google.protobuf.Timestamp", + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "state": { - "type": "State", + "filter": { + "type": "string", "id": 4, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "serviceRevision": { - "type": "Service", + "orderBy": { + "type": "string", "id": 5, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } + } + } + }, + "ListMetadataImportsResponse": { + "fields": { + "metadataImports": { + "rule": "repeated", + "type": "MetadataImport", + "id": 1 }, - "description": { + "nextPageToken": { "type": "string", - "id": 6 + "id": 2 }, - "restoringServices": { + "unreachable": { "rule": "repeated", "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "id": 3 } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "DELETING": 2, - "ACTIVE": 3, - "FAILED": 4, - "RESTORING": 5 + } + }, + "GetMetadataImportRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/MetadataImport" } } } }, - "Restore": { + "CreateMetadataImportRequest": { "fields": { - "startTime": { - "type": "google.protobuf.Timestamp", + "parent": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "metastore.googleapis.com/MetadataImport" } }, - "endTime": { - "type": "google.protobuf.Timestamp", + "metadataImportId": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "state": { - "type": "State", + "metadataImport": { + "type": "MetadataImport", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "backup": { + "requestId": { "type": "string", "id": 4, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" + "(google.api.field_behavior)": "OPTIONAL" } - }, - "type": { - "type": "RestoreType", - "id": 5, + } + } + }, + "UpdateMetadataImportRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "details": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "RUNNING": 1, - "SUCCEEDED": 2, - "FAILED": 3, - "CANCELLED": 4 + "metadataImport": { + "type": "MetadataImport", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - "RestoreType": { - "values": { - "RESTORE_TYPE_UNSPECIFIED": 0, - "FULL": 1, - "METADATA_ONLY": 2 + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ListServicesRequest": { + "ListBackupsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Backup" } }, "pageSize": { @@ -2541,11 +3309,11 @@ } } }, - "ListServicesResponse": { + "ListBackupsResponse": { "fields": { - "services": { + "backups": { "rule": "repeated", - "type": "Service", + "type": "Backup", "id": 1 }, "nextPageToken": { @@ -2559,37 +3327,37 @@ } } }, - "GetServiceRequest": { + "GetBackupRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" } } } }, - "CreateServiceRequest": { + "CreateBackupRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Backup" } }, - "serviceId": { + "backupId": { "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "service": { - "type": "Service", + "backup": { + "type": "Backup", "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -2604,20 +3372,44 @@ } } }, - "UpdateServiceRequest": { + "DeleteBackupRequest": { "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", + "name": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" } }, - "service": { - "type": "Service", + "requestId": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ExportMetadataRequest": { + "oneofs": { + "destination": { + "oneof": [ + "destinationGcsFolder" + ] + } + }, + "fields": { + "destinationGcsFolder": { + "type": "string", + "id": 2 + }, + "service": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/Service" } }, "requestId": { @@ -2626,12 +3418,19 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "databaseDumpType": { + "type": "DatabaseDumpSpec.Type", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "DeleteServiceRequest": { + "RestoreServiceRequest": { "fields": { - "name": { + "service": { "type": "string", "id": 1, "options": { @@ -2639,151 +3438,359 @@ "(google.api.resource_reference).type": "metastore.googleapis.com/Service" } }, - "requestId": { - "type": "string", - "id": 2, + "backup": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" + } + }, + "restoreType": { + "type": "Restore.RestoreType", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "target": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verb": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "LocationMetadata": { + "fields": { + "supportedHiveMetastoreVersions": { + "rule": "repeated", + "type": "HiveMetastoreVersion", + "id": 1 + } + }, + "nested": { + "HiveMetastoreVersion": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "isDefault": { + "type": "bool", + "id": 2 + } + } + } + } + }, + "DatabaseDumpSpec": { + "fields": {}, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "MYSQL": 1, + "AVRO": 2 + } + } + } + }, + "DataprocMetastoreFederation": { + "options": { + "(google.api.default_host)": "metastore.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListFederations": { + "requestType": "ListFederationsRequest", + "responseType": "ListFederationsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*}/federations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*}/federations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetFederation": { + "requestType": "GetFederationRequest", + "responseType": "Federation", + "options": { + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/federations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/federations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateFederation": { + "requestType": "CreateFederationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1alpha/{parent=projects/*/locations/*}/federations", + "(google.api.http).body": "federation", + "(google.api.method_signature)": "parent,federation,federation_id", + "(google.longrunning.operation_info).response_type": "Federation", + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=projects/*/locations/*}/federations", + "body": "federation" + } + }, + { + "(google.api.method_signature)": "parent,federation,federation_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Federation", + "metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + } + } + ] + }, + "UpdateFederation": { + "requestType": "UpdateFederationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1alpha/{federation.name=projects/*/locations/*/federations/*}", + "(google.api.http).body": "federation", + "(google.api.method_signature)": "federation,update_mask", + "(google.longrunning.operation_info).response_type": "Federation", + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{federation.name=projects/*/locations/*/federations/*}", + "body": "federation" + } + }, + { + "(google.api.method_signature)": "federation,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Federation", + "metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + } + } + ] + }, + "DeleteFederation": { + "requestType": "DeleteFederationRequest", + "responseType": "google.longrunning.Operation", "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "(google.api.http).delete": "/v1alpha/{name=projects/*/locations/*/federations/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=projects/*/locations/*/federations/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.metastore.v1alpha.OperationMetadata" + } + } + ] } } }, - "ListMetadataImportsRequest": { + "Federation": { + "options": { + "(google.api.resource).type": "metastore.googleapis.com/Federation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/federations/{federation}" + }, "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.field_behavior)": "IMMUTABLE" } }, - "pageSize": { - "type": "int32", + "createTime": { + "type": "google.protobuf.Timestamp", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "pageToken": { - "type": "string", + "updateTime": { + "type": "google.protobuf.Timestamp", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "filter": { + "labels": { + "keyType": "string", "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "id": 4 }, - "orderBy": { + "version": { "type": "string", "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "IMMUTABLE" } - } - } - }, - "ListMetadataImportsResponse": { - "fields": { - "metadataImports": { - "rule": "repeated", - "type": "MetadataImport", - "id": 1 }, - "nextPageToken": { - "type": "string", - "id": 2 + "backendMetastores": { + "keyType": "int32", + "type": "BackendMetastore", + "id": 6 }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetMetadataImportRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/MetadataImport" - } - } - } - }, - "CreateMetadataImportRequest": { - "fields": { - "parent": { + "endpointUri": { "type": "string", - "id": 1, + "id": 7, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "metadataImportId": { - "type": "string", - "id": 2, + "state": { + "type": "State", + "id": 8, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "metadataImport": { - "type": "MetadataImport", - "id": 3, + "stateMessage": { + "type": "string", + "id": 9, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "requestId": { + "uid": { "type": "string", - "id": 4, + "id": 10, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "UPDATING": 3, + "DELETING": 4, + "ERROR": 5 } } } }, - "UpdateMetadataImportRequest": { + "BackendMetastore": { "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "metadataImport": { - "type": "MetadataImport", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { + "name": { "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "id": 1 + }, + "metastoreType": { + "type": "MetastoreType", + "id": 2 + } + }, + "nested": { + "MetastoreType": { + "values": { + "METASTORE_TYPE_UNSPECIFIED": 0, + "BIGQUERY": 2, + "DATAPROC_METASTORE": 3 } } } }, - "ListBackupsRequest": { + "ListFederationsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Federation" } }, "pageSize": { @@ -2816,11 +3823,11 @@ } } }, - "ListBackupsResponse": { + "ListFederationsResponse": { "fields": { - "backups": { + "federations": { "rule": "repeated", - "type": "Backup", + "type": "Federation", "id": 1 }, "nextPageToken": { @@ -2834,130 +3841,40 @@ } } }, - "GetBackupRequest": { + "GetFederationRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" + "(google.api.resource_reference).type": "metastore.googleapis.com/Federation" } } } }, - "CreateBackupRequest": { + "CreateFederationRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" - } - }, - "backupId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backup": { - "type": "Backup", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteBackupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ExportMetadataRequest": { - "oneofs": { - "destination": { - "oneof": [ - "destinationGcsFolder" - ] - } - }, - "fields": { - "destinationGcsFolder": { - "type": "string", - "id": 2 - }, - "service": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "databaseDumpType": { - "type": "DatabaseDumpSpec.Type", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RestoreServiceRequest": { - "fields": { - "service": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Federation" } }, - "backup": { + "federationId": { "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" + "(google.api.field_behavior)": "REQUIRED" } }, - "restoreType": { - "type": "Restore.RestoreType", + "federation": { + "type": "Federation", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, "requestId": { @@ -2969,90 +3886,46 @@ } } }, - "OperationMetadata": { + "UpdateFederationRequest": { "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", + "updateMask": { + "type": "google.protobuf.FieldMask", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "endTime": { - "type": "google.protobuf.Timestamp", + "federation": { + "type": "Federation", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "target": { + "requestId": { "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "verb": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } - }, - "statusMessage": { + } + } + }, + "DeleteFederationRequest": { + "fields": { + "name": { "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "requestedCancellation": { - "type": "bool", - "id": 6, + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/Federation" } }, - "apiVersion": { + "requestId": { "type": "string", - "id": 7, + "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "LocationMetadata": { - "fields": { - "supportedHiveMetastoreVersions": { - "rule": "repeated", - "type": "HiveMetastoreVersion", - "id": 1 - } - }, - "nested": { - "HiveMetastoreVersion": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "isDefault": { - "type": "bool", - "id": 2 - } - } - } - } - }, - "DatabaseDumpSpec": { - "fields": {}, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "MYSQL": 1, - "AVRO": 2 + "(google.api.field_behavior)": "OPTIONAL" } } } @@ -3062,12 +3935,12 @@ "v1beta": { "options": { "go_package": "google.golang.org/genproto/googleapis/cloud/metastore/v1beta;metastore", - "php_namespace": "Google\\Cloud\\Metastore\\V1beta", "java_multiple_files": true, - "java_outer_classname": "MetastoreProto", + "java_outer_classname": "MetastoreFederationProto", "java_package": "com.google.cloud.metastore.v1beta", - "(google.api.resource_definition).type": "compute.googleapis.com/Network", - "(google.api.resource_definition).pattern": "projects/{project}/global/networks/{network}" + "php_namespace": "Google\\Cloud\\Metastore\\V1beta", + "(google.api.resource_definition).type": "dataplex.googleapis.com/Lake", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/lakes/{lake}" }, "nested": { "DataprocMetastore": { @@ -3120,7 +3993,7 @@ "(google.api.http).body": "service", "(google.api.method_signature)": "parent,service,service_id", "(google.longrunning.operation_info).response_type": "Service", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" }, "parsedOptions": [ { @@ -3135,7 +4008,7 @@ { "(google.longrunning.operation_info)": { "response_type": "Service", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" } } ] @@ -3148,7 +4021,7 @@ "(google.api.http).body": "service", "(google.api.method_signature)": "service,update_mask", "(google.longrunning.operation_info).response_type": "Service", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" }, "parsedOptions": [ { @@ -3163,7 +4036,7 @@ { "(google.longrunning.operation_info)": { "response_type": "Service", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" } } ] @@ -3175,7 +4048,7 @@ "(google.api.http).delete": "/v1beta/{name=projects/*/locations/*/services/*}", "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" }, "parsedOptions": [ { @@ -3189,7 +4062,7 @@ { "(google.longrunning.operation_info)": { "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" } } ] @@ -3238,7 +4111,7 @@ "(google.api.http).body": "metadata_import", "(google.api.method_signature)": "parent,metadata_import,metadata_import_id", "(google.longrunning.operation_info).response_type": "MetadataImport", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" }, "parsedOptions": [ { @@ -3253,7 +4126,7 @@ { "(google.longrunning.operation_info)": { "response_type": "MetadataImport", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" } } ] @@ -3266,7 +4139,7 @@ "(google.api.http).body": "metadata_import", "(google.api.method_signature)": "metadata_import,update_mask", "(google.longrunning.operation_info).response_type": "MetadataImport", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" }, "parsedOptions": [ { @@ -3281,7 +4154,7 @@ { "(google.longrunning.operation_info)": { "response_type": "MetadataImport", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" } } ] @@ -3293,7 +4166,7 @@ "(google.api.http).post": "/v1beta/{service=projects/*/locations/*/services/*}:exportMetadata", "(google.api.http).body": "*", "(google.longrunning.operation_info).response_type": "MetadataExport", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" }, "parsedOptions": [ { @@ -3305,7 +4178,7 @@ { "(google.longrunning.operation_info)": { "response_type": "MetadataExport", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" } } ] @@ -3318,7 +4191,7 @@ "(google.api.http).body": "*", "(google.api.method_signature)": "service,backup", "(google.longrunning.operation_info).response_type": "Restore", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" }, "parsedOptions": [ { @@ -3333,7 +4206,7 @@ { "(google.longrunning.operation_info)": { "response_type": "Restore", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" } } ] @@ -3382,7 +4255,7 @@ "(google.api.http).body": "backup", "(google.api.method_signature)": "parent,backup,backup_id", "(google.longrunning.operation_info).response_type": "Backup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" }, "parsedOptions": [ { @@ -3397,7 +4270,7 @@ { "(google.longrunning.operation_info)": { "response_type": "Backup", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" } } ] @@ -3409,7 +4282,7 @@ "(google.api.http).delete": "/v1beta/{name=projects/*/locations/*/services/*/backups/*}", "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" }, "parsedOptions": [ { @@ -3423,7 +4296,7 @@ { "(google.longrunning.operation_info)": { "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" + "metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" } } ] @@ -3545,6 +4418,28 @@ "options": { "(google.api.field_behavior)": "IMMUTABLE" } + }, + "encryptionConfig": { + "type": "EncryptionConfig", + "id": 20, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "networkConfig": { + "type": "NetworkConfig", + "id": 21 + }, + "databaseType": { + "type": "DatabaseType", + "id": 22, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "telemetryConfig": { + "type": "TelemetryConfig", + "id": 23 } }, "nested": { @@ -3573,6 +4468,13 @@ "CANARY": 1, "STABLE": 2 } + }, + "DatabaseType": { + "values": { + "DATABASE_TYPE_UNSPECIFIED": 0, + "MYSQL": 1, + "SPANNER": 2 + } } } }, @@ -3581,6 +4483,10 @@ "dataCatalogConfig": { "type": "DataCatalogConfig", "id": 1 + }, + "dataplexConfig": { + "type": "DataplexConfig", + "id": 2 } } }, @@ -3592,6 +4498,26 @@ } } }, + "DataplexConfig": { + "fields": { + "lakeResources": { + "keyType": "string", + "type": "Lake", + "id": 1 + } + } + }, + "Lake": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + } + } + }, "MaintenanceWindow": { "fields": { "hourOfDay": { @@ -3621,37 +4547,140 @@ "kerberosConfig": { "type": "KerberosConfig", "id": 3 + }, + "endpointProtocol": { + "type": "EndpointProtocol", + "id": 4 + }, + "auxiliaryVersions": { + "keyType": "string", + "type": "AuxiliaryVersionConfig", + "id": 5 + } + }, + "nested": { + "EndpointProtocol": { + "values": { + "ENDPOINT_PROTOCOL_UNSPECIFIED": 0, + "THRIFT": 1, + "GRPC": 2 + } + } + } + }, + "KerberosConfig": { + "fields": { + "keytab": { + "type": "Secret", + "id": 1 + }, + "principal": { + "type": "string", + "id": 2 + }, + "krb5ConfigGcsUri": { + "type": "string", + "id": 3 + } + } + }, + "Secret": { + "oneofs": { + "value": { + "oneof": [ + "cloudSecret" + ] + } + }, + "fields": { + "cloudSecret": { + "type": "string", + "id": 2 + } + } + }, + "EncryptionConfig": { + "fields": { + "kmsKey": { + "type": "string", + "id": 1 + } + } + }, + "AuxiliaryVersionConfig": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "configOverrides": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "networkConfig": { + "type": "NetworkConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "NetworkConfig": { + "fields": { + "consumers": { + "rule": "repeated", + "type": "Consumer", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + }, + "nested": { + "Consumer": { + "oneofs": { + "vpcResource": { + "oneof": [ + "subnetwork" + ] + } + }, + "fields": { + "subnetwork": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "compute.googleapis.com/Subnetwork" + } + }, + "endpointUri": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } } } }, - "KerberosConfig": { + "TelemetryConfig": { "fields": { - "keytab": { - "type": "Secret", + "logFormat": { + "type": "LogFormat", "id": 1 - }, - "principal": { - "type": "string", - "id": 2 - }, - "krb5ConfigGcsUri": { - "type": "string", - "id": 3 - } - } - }, - "Secret": { - "oneofs": { - "value": { - "oneof": [ - "cloudSecret" - ] } }, - "fields": { - "cloudSecret": { - "type": "string", - "id": 2 + "nested": { + "LogFormat": { + "values": { + "LOG_FORMAT_UNSPECIFIED": 0, + "LEGACY": 1, + "JSON": 2 + } } } }, @@ -3720,6 +4749,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "state": { "type": "State", "id": 5, @@ -3777,194 +4813,478 @@ } } }, - "MetadataExport": { - "oneofs": { - "destination": { - "oneof": [ - "destinationGcsUri" - ] + "MetadataExport": { + "oneofs": { + "destination": { + "oneof": [ + "destinationGcsUri" + ] + } + }, + "fields": { + "destinationGcsUri": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "databaseDumpType": { + "type": "DatabaseDumpSpec.Type", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "SUCCEEDED": 2, + "FAILED": 3, + "CANCELLED": 4 + } + } + } + }, + "Backup": { + "options": { + "(google.api.resource).type": "metastore.googleapis.com/Backup", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/services/{service}/backups/{backup}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceRevision": { + "type": "Service", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 6 + }, + "restoringServices": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "DELETING": 2, + "ACTIVE": 3, + "FAILED": 4, + "RESTORING": 5 + } + } + } + }, + "Restore": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backup": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" + } + }, + "type": { + "type": "RestoreType", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "details": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "SUCCEEDED": 2, + "FAILED": 3, + "CANCELLED": 4 + } + }, + "RestoreType": { + "values": { + "RESTORE_TYPE_UNSPECIFIED": 0, + "FULL": 1, + "METADATA_ONLY": 2 + } + } + } + }, + "ListServicesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Service" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListServicesResponse": { + "fields": { + "services": { + "rule": "repeated", + "type": "Service", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 } - }, + } + }, + "GetServiceRequest": { "fields": { - "destinationGcsUri": { + "name": { "type": "string", - "id": 4, + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/Service" } - }, - "startTime": { - "type": "google.protobuf.Timestamp", + } + } + }, + "CreateServiceRequest": { + "fields": { + "parent": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Service" } }, - "endTime": { - "type": "google.protobuf.Timestamp", + "serviceId": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "state": { - "type": "State", + "service": { + "type": "Service", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "databaseDumpType": { - "type": "DatabaseDumpSpec.Type", - "id": 5, + "requestId": { + "type": "string", + "id": 4, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "RUNNING": 1, - "SUCCEEDED": 2, - "FAILED": 3, - "CANCELLED": 4 + } + }, + "UpdateServiceRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "service": { + "type": "Service", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "Backup": { - "options": { - "(google.api.resource).type": "metastore.googleapis.com/Backup", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/services/{service}/backups/{backup}" - }, + "DeleteServiceRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/Service" } }, - "createTime": { - "type": "google.protobuf.Timestamp", + "requestId": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMetadataImportsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "metastore.googleapis.com/MetadataImport" } }, - "endTime": { - "type": "google.protobuf.Timestamp", + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "state": { - "type": "State", + "filter": { + "type": "string", "id": 4, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "serviceRevision": { - "type": "Service", + "orderBy": { + "type": "string", "id": 5, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } + } + } + }, + "ListMetadataImportsResponse": { + "fields": { + "metadataImports": { + "rule": "repeated", + "type": "MetadataImport", + "id": 1 }, - "description": { + "nextPageToken": { "type": "string", - "id": 6 + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "DELETING": 2, - "ACTIVE": 3, - "FAILED": 4 + } + }, + "GetMetadataImportRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/MetadataImport" } } } }, - "Restore": { + "CreateMetadataImportRequest": { "fields": { - "startTime": { - "type": "google.protobuf.Timestamp", + "parent": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "metastore.googleapis.com/MetadataImport" } }, - "endTime": { - "type": "google.protobuf.Timestamp", + "metadataImportId": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "state": { - "type": "State", + "metadataImport": { + "type": "MetadataImport", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "backup": { + "requestId": { "type": "string", "id": 4, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" + "(google.api.field_behavior)": "OPTIONAL" } - }, - "type": { - "type": "RestoreType", - "id": 5, + } + } + }, + "UpdateMetadataImportRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "details": { - "type": "string", - "id": 6, + "metadataImport": { + "type": "MetadataImport", + "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "RUNNING": 1, - "SUCCEEDED": 2, - "FAILED": 3, - "CANCELLED": 4 + "(google.api.field_behavior)": "REQUIRED" } }, - "RestoreType": { - "values": { - "RESTORE_TYPE_UNSPECIFIED": 0, - "FULL": 1, - "METADATA_ONLY": 2 + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ListServicesRequest": { + "ListBackupsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Backup" } }, "pageSize": { @@ -3997,11 +5317,11 @@ } } }, - "ListServicesResponse": { + "ListBackupsResponse": { "fields": { - "services": { + "backups": { "rule": "repeated", - "type": "Service", + "type": "Backup", "id": 1 }, "nextPageToken": { @@ -4015,37 +5335,37 @@ } } }, - "GetServiceRequest": { + "GetBackupRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" } } } }, - "CreateServiceRequest": { + "CreateBackupRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Backup" } }, - "serviceId": { + "backupId": { "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "service": { - "type": "Service", + "backup": { + "type": "Backup", "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -4060,20 +5380,44 @@ } } }, - "UpdateServiceRequest": { + "DeleteBackupRequest": { "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", + "name": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" } }, - "service": { - "type": "Service", + "requestId": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ExportMetadataRequest": { + "oneofs": { + "destination": { + "oneof": [ + "destinationGcsFolder" + ] + } + }, + "fields": { + "destinationGcsFolder": { + "type": "string", + "id": 2 + }, + "service": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/Service" } }, "requestId": { @@ -4082,12 +5426,19 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "databaseDumpType": { + "type": "DatabaseDumpSpec.Type", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "DeleteServiceRequest": { + "RestoreServiceRequest": { "fields": { - "name": { + "service": { "type": "string", "id": 1, "options": { @@ -4095,151 +5446,359 @@ "(google.api.resource_reference).type": "metastore.googleapis.com/Service" } }, - "requestId": { + "backup": { "type": "string", "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" + } + }, + "restoreType": { + "type": "Restore.RestoreType", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "requestId": { + "type": "string", + "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ListMetadataImportsRequest": { + "OperationMetadata": { "fields": { - "parent": { - "type": "string", + "createTime": { + "type": "google.protobuf.Timestamp", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "pageSize": { - "type": "int32", + "endTime": { + "type": "google.protobuf.Timestamp", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "pageToken": { + "target": { "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "filter": { + "verb": { "type": "string", "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "orderBy": { + "statusMessage": { "type": "string", "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "ListMetadataImportsResponse": { + "LocationMetadata": { "fields": { - "metadataImports": { + "supportedHiveMetastoreVersions": { "rule": "repeated", - "type": "MetadataImport", + "type": "HiveMetastoreVersion", "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 + } + }, + "nested": { + "HiveMetastoreVersion": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "isDefault": { + "type": "bool", + "id": 2 + } + } } } }, - "GetMetadataImportRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/MetadataImport" + "DatabaseDumpSpec": { + "fields": {}, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "MYSQL": 1, + "AVRO": 2 } } } }, - "CreateMetadataImportRequest": { + "DataprocMetastoreFederation": { + "options": { + "(google.api.default_host)": "metastore.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListFederations": { + "requestType": "ListFederationsRequest", + "responseType": "ListFederationsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/federations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/federations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetFederation": { + "requestType": "GetFederationRequest", + "responseType": "Federation", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/federations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/federations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateFederation": { + "requestType": "CreateFederationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*}/federations", + "(google.api.http).body": "federation", + "(google.api.method_signature)": "parent,federation,federation_id", + "(google.longrunning.operation_info).response_type": "Federation", + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*}/federations", + "body": "federation" + } + }, + { + "(google.api.method_signature)": "parent,federation,federation_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Federation", + "metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" + } + } + ] + }, + "UpdateFederation": { + "requestType": "UpdateFederationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta/{federation.name=projects/*/locations/*/federations/*}", + "(google.api.http).body": "federation", + "(google.api.method_signature)": "federation,update_mask", + "(google.longrunning.operation_info).response_type": "Federation", + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{federation.name=projects/*/locations/*/federations/*}", + "body": "federation" + } + }, + { + "(google.api.method_signature)": "federation,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Federation", + "metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" + } + } + ] + }, + "DeleteFederation": { + "requestType": "DeleteFederationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta/{name=projects/*/locations/*/federations/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=projects/*/locations/*/federations/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.metastore.v1beta.OperationMetadata" + } + } + ] + } + } + }, + "Federation": { + "options": { + "(google.api.resource).type": "metastore.googleapis.com/Federation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/federations/{federation}" + }, "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.field_behavior)": "IMMUTABLE" } }, - "metadataImportId": { - "type": "string", + "createTime": { + "type": "google.protobuf.Timestamp", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "metadataImport": { - "type": "MetadataImport", + "updateTime": { + "type": "google.protobuf.Timestamp", "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "requestId": { + "labels": { + "keyType": "string", "type": "string", - "id": 4, + "id": 4 + }, + "version": { + "type": "string", + "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "IMMUTABLE" } - } - } - }, - "UpdateMetadataImportRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, + }, + "backendMetastores": { + "keyType": "int32", + "type": "BackendMetastore", + "id": 6 + }, + "endpointUri": { + "type": "string", + "id": 7, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "metadataImport": { - "type": "MetadataImport", - "id": 2, + "state": { + "type": "State", + "id": 8, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "requestId": { + "stateMessage": { "type": "string", - "id": 3, + "id": 9, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "UPDATING": 3, + "DELETING": 4, + "ERROR": 5 } } } }, - "ListBackupsRequest": { + "BackendMetastore": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metastoreType": { + "type": "MetastoreType", + "id": 2 + } + }, + "nested": { + "MetastoreType": { + "values": { + "METASTORE_TYPE_UNSPECIFIED": 0, + "BIGQUERY": 2, + "DATAPROC_METASTORE": 3 + } + } + } + }, + "ListFederationsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Federation" } }, "pageSize": { @@ -4272,11 +5831,11 @@ } } }, - "ListBackupsResponse": { + "ListFederationsResponse": { "fields": { - "backups": { + "federations": { "rule": "repeated", - "type": "Backup", + "type": "Federation", "id": 1 }, "nextPageToken": { @@ -4290,37 +5849,37 @@ } } }, - "GetBackupRequest": { + "GetFederationRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" + "(google.api.resource_reference).type": "metastore.googleapis.com/Federation" } } } }, - "CreateBackupRequest": { + "CreateFederationRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.resource_reference).child_type": "metastore.googleapis.com/Federation" } }, - "backupId": { + "federationId": { "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "backup": { - "type": "Backup", + "federation": { + "type": "Federation", "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -4335,44 +5894,20 @@ } } }, - "DeleteBackupRequest": { + "UpdateFederationRequest": { "fields": { - "name": { - "type": "string", + "updateMask": { + "type": "google.protobuf.FieldMask", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" + "(google.api.field_behavior)": "REQUIRED" } }, - "requestId": { - "type": "string", + "federation": { + "type": "Federation", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ExportMetadataRequest": { - "oneofs": { - "destination": { - "oneof": [ - "destinationGcsFolder" - ] - } - }, - "fields": { - "destinationGcsFolder": { - "type": "string", - "id": 2 - }, - "service": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" + "(google.api.field_behavior)": "REQUIRED" } }, "requestId": { @@ -4381,133 +5916,24 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } - }, - "databaseDumpType": { - "type": "DatabaseDumpSpec.Type", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } } } }, - "RestoreServiceRequest": { + "DeleteFederationRequest": { "fields": { - "service": { + "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Service" - } - }, - "backup": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "metastore.googleapis.com/Backup" - } - }, - "restoreType": { - "type": "Restore.RestoreType", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.resource_reference).type": "metastore.googleapis.com/Federation" } }, "requestId": { "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "OperationMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "target": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "verb": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "statusMessage": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "requestedCancellation": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "apiVersion": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "LocationMetadata": { - "fields": { - "supportedHiveMetastoreVersions": { - "rule": "repeated", - "type": "HiveMetastoreVersion", - "id": 1 - } - }, - "nested": { - "HiveMetastoreVersion": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "isDefault": { - "type": "bool", - "id": 2 - } - } - } - } - }, - "DatabaseDumpSpec": { - "fields": {}, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "MYSQL": 1 + "(google.api.field_behavior)": "OPTIONAL" } } } diff --git a/packages/google-cloud-metastore/samples/README.md b/packages/google-cloud-metastore/samples/README.md index 319e4516e95..4e1d9a4411b 100644 --- a/packages/google-cloud-metastore/samples/README.md +++ b/packages/google-cloud-metastore/samples/README.md @@ -27,6 +27,11 @@ * [Dataproc_metastore.restore_service](#dataproc_metastore.restore_service) * [Dataproc_metastore.update_metadata_import](#dataproc_metastore.update_metadata_import) * [Dataproc_metastore.update_service](#dataproc_metastore.update_service) + * [Dataproc_metastore_federation.create_federation](#dataproc_metastore_federation.create_federation) + * [Dataproc_metastore_federation.delete_federation](#dataproc_metastore_federation.delete_federation) + * [Dataproc_metastore_federation.get_federation](#dataproc_metastore_federation.get_federation) + * [Dataproc_metastore_federation.list_federations](#dataproc_metastore_federation.list_federations) + * [Dataproc_metastore_federation.update_federation](#dataproc_metastore_federation.update_federation) * [Dataproc_metastore.create_backup](#dataproc_metastore.create_backup) * [Dataproc_metastore.create_metadata_import](#dataproc_metastore.create_metadata_import) * [Dataproc_metastore.create_service](#dataproc_metastore.create_service) @@ -42,6 +47,11 @@ * [Dataproc_metastore.restore_service](#dataproc_metastore.restore_service) * [Dataproc_metastore.update_metadata_import](#dataproc_metastore.update_metadata_import) * [Dataproc_metastore.update_service](#dataproc_metastore.update_service) + * [Dataproc_metastore_federation.create_federation](#dataproc_metastore_federation.create_federation) + * [Dataproc_metastore_federation.delete_federation](#dataproc_metastore_federation.delete_federation) + * [Dataproc_metastore_federation.get_federation](#dataproc_metastore_federation.get_federation) + * [Dataproc_metastore_federation.list_federations](#dataproc_metastore_federation.list_federations) + * [Dataproc_metastore_federation.update_federation](#dataproc_metastore_federation.update_federation) * [Dataproc_metastore.create_backup](#dataproc_metastore.create_backup) * [Dataproc_metastore.create_metadata_import](#dataproc_metastore.create_metadata_import) * [Dataproc_metastore.create_service](#dataproc_metastore.create_service) @@ -57,6 +67,11 @@ * [Dataproc_metastore.restore_service](#dataproc_metastore.restore_service) * [Dataproc_metastore.update_metadata_import](#dataproc_metastore.update_metadata_import) * [Dataproc_metastore.update_service](#dataproc_metastore.update_service) + * [Dataproc_metastore_federation.create_federation](#dataproc_metastore_federation.create_federation) + * [Dataproc_metastore_federation.delete_federation](#dataproc_metastore_federation.delete_federation) + * [Dataproc_metastore_federation.get_federation](#dataproc_metastore_federation.get_federation) + * [Dataproc_metastore_federation.list_federations](#dataproc_metastore_federation.list_federations) + * [Dataproc_metastore_federation.update_federation](#dataproc_metastore_federation.update_federation) * [Quickstart](#quickstart) * [Quickstart](#quickstart) @@ -330,6 +345,91 @@ __Usage:__ +### Dataproc_metastore_federation.create_federation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.create_federation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.create_federation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.create_federation.js` + + +----- + + + + +### Dataproc_metastore_federation.delete_federation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.delete_federation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.delete_federation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.delete_federation.js` + + +----- + + + + +### Dataproc_metastore_federation.get_federation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.get_federation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.get_federation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.get_federation.js` + + +----- + + + + +### Dataproc_metastore_federation.list_federations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.list_federations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.list_federations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.list_federations.js` + + +----- + + + + +### Dataproc_metastore_federation.update_federation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.update_federation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.update_federation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.update_federation.js` + + +----- + + + + ### Dataproc_metastore.create_backup View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_backup.js). @@ -585,6 +685,91 @@ __Usage:__ +### Dataproc_metastore_federation.create_federation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.create_federation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.create_federation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.create_federation.js` + + +----- + + + + +### Dataproc_metastore_federation.delete_federation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.delete_federation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.delete_federation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.delete_federation.js` + + +----- + + + + +### Dataproc_metastore_federation.get_federation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.get_federation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.get_federation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.get_federation.js` + + +----- + + + + +### Dataproc_metastore_federation.list_federations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.list_federations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.list_federations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.list_federations.js` + + +----- + + + + +### Dataproc_metastore_federation.update_federation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.update_federation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.update_federation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.update_federation.js` + + +----- + + + + ### Dataproc_metastore.create_backup View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_backup.js). @@ -840,6 +1025,91 @@ __Usage:__ +### Dataproc_metastore_federation.create_federation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.create_federation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.create_federation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.create_federation.js` + + +----- + + + + +### Dataproc_metastore_federation.delete_federation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.delete_federation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.delete_federation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.delete_federation.js` + + +----- + + + + +### Dataproc_metastore_federation.get_federation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.get_federation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.get_federation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.get_federation.js` + + +----- + + + + +### Dataproc_metastore_federation.list_federations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.list_federations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.list_federations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.list_federations.js` + + +----- + + + + +### Dataproc_metastore_federation.update_federation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.update_federation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.update_federation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.update_federation.js` + + +----- + + + + ### Quickstart View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-metastore/samples/quickstart.js). diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.create_federation.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.create_federation.js new file mode 100644 index 00000000000..0e7cd200044 --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.create_federation.js @@ -0,0 +1,93 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, federationId, federation) { + // [START metastore_v1_generated_DataprocMetastoreFederation_CreateFederation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The relative resource name of the location in which to create a federation + * service, in the following form: + * `projects/{project_number}/locations/{location_id}`. + */ + // const parent = 'abc123' + /** + * Required. The ID of the metastore federation, which is used as the final + * component of the metastore federation's name. + * This value must be between 2 and 63 characters long inclusive, begin with a + * letter, end with a letter or number, and consist of alpha-numeric + * ASCII characters or hyphens. + */ + // const federationId = 'abc123' + /** + * Required. The Metastore Federation to create. The `name` field is + * ignored. The ID of the created metastore federation must be + * provided in the request's `federation_id` field. + */ + // const federation = {} + /** + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * The request ID must be a valid + * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + */ + // const requestId = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callCreateFederation() { + // Construct request + const request = { + parent, + federationId, + federation, + }; + + // Run request + const [operation] = await metastoreClient.createFederation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateFederation(); + // [END metastore_v1_generated_DataprocMetastoreFederation_CreateFederation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.delete_federation.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.delete_federation.js new file mode 100644 index 00000000000..d1edfb692aa --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.delete_federation.js @@ -0,0 +1,77 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START metastore_v1_generated_DataprocMetastoreFederation_DeleteFederation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The relative resource name of the metastore federation to delete, + * in the following form: + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + */ + // const name = 'abc123' + /** + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * The request ID must be a valid + * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + */ + // const requestId = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callDeleteFederation() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await metastoreClient.deleteFederation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteFederation(); + // [END metastore_v1_generated_DataprocMetastoreFederation_DeleteFederation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.get_federation.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.get_federation.js new file mode 100644 index 00000000000..e10d9d18c1c --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.get_federation.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START metastore_v1_generated_DataprocMetastoreFederation_GetFederation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The relative resource name of the metastore federation to retrieve, + * in the following form: + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + */ + // const name = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callGetFederation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await metastoreClient.getFederation(request); + console.log(response); + } + + callGetFederation(); + // [END metastore_v1_generated_DataprocMetastoreFederation_GetFederation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.list_federations.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.list_federations.js new file mode 100644 index 00000000000..86ffdaf90bd --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.list_federations.js @@ -0,0 +1,90 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START metastore_v1_generated_DataprocMetastoreFederation_ListFederations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The relative resource name of the location of metastore federations + * to list, in the following form: + * `projects/{project_number}/locations/{location_id}`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of federations to return. The response may contain less + * than the maximum number. If unspecified, no more than 500 services are + * returned. The maximum value is 1000; values above 1000 are changed to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous ListFederationServices + * call. Provide this token to retrieve the subsequent page. + * To retrieve the first page, supply an empty page token. + * When paginating, other parameters provided to + * ListFederationServices must match the call that provided the + * page token. + */ + // const pageToken = 'abc123' + /** + * Optional. The filter to apply to list results. + */ + // const filter = 'abc123' + /** + * Optional. Specify the ordering of results as described in Sorting + * Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). + * If not specified, the results will be sorted in the default order. + */ + // const orderBy = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callListFederations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await metastoreClient.listFederationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFederations(); + // [END metastore_v1_generated_DataprocMetastoreFederation_ListFederations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.update_federation.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.update_federation.js new file mode 100644 index 00000000000..182b7f8d9e5 --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.update_federation.js @@ -0,0 +1,86 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, federation) { + // [START metastore_v1_generated_DataprocMetastoreFederation_UpdateFederation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. A field mask used to specify the fields to be overwritten in the + * metastore federation resource by the update. + * Fields specified in the `update_mask` are relative to the resource (not + * to the full request). A field is overwritten if it is in the mask. + */ + // const updateMask = {} + /** + * Required. The metastore federation to update. The server only merges fields + * in the service if they are specified in `update_mask`. + * The metastore federation's `name` field is used to identify the + * metastore service to be updated. + */ + // const federation = {} + /** + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * The request ID must be a valid + * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + */ + // const requestId = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callUpdateFederation() { + // Construct request + const request = { + updateMask, + federation, + }; + + // Run request + const [operation] = await metastoreClient.updateFederation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateFederation(); + // [END metastore_v1_generated_DataprocMetastoreFederation_UpdateFederation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json b/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json index 6c05b9cc727..8be460e2211 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json +++ b/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json @@ -742,6 +742,246 @@ } } } + }, + { + "regionTag": "metastore_v1_generated_DataprocMetastoreFederation_ListFederations_async", + "title": "DataprocMetastore listFederations Sample", + "origin": "API_DEFINITION", + "description": " Lists federations in a project and location.", + "canonical": true, + "file": "dataproc_metastore_federation.list_federations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFederations", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation.ListFederations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.metastore.v1.ListFederationsResponse", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "ListFederations", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation.ListFederations", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation" + } + } + } + }, + { + "regionTag": "metastore_v1_generated_DataprocMetastoreFederation_GetFederation_async", + "title": "DataprocMetastore getFederation Sample", + "origin": "API_DEFINITION", + "description": " Gets the details of a single federation.", + "canonical": true, + "file": "dataproc_metastore_federation.get_federation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetFederation", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation.GetFederation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.metastore.v1.Federation", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "GetFederation", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation.GetFederation", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation" + } + } + } + }, + { + "regionTag": "metastore_v1_generated_DataprocMetastoreFederation_CreateFederation_async", + "title": "DataprocMetastore createFederation Sample", + "origin": "API_DEFINITION", + "description": " Creates a metastore federation in a project and location.", + "canonical": true, + "file": "dataproc_metastore_federation.create_federation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateFederation", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation.CreateFederation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "federation_id", + "type": "TYPE_STRING" + }, + { + "name": "federation", + "type": ".google.cloud.metastore.v1.Federation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "CreateFederation", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation.CreateFederation", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation" + } + } + } + }, + { + "regionTag": "metastore_v1_generated_DataprocMetastoreFederation_UpdateFederation_async", + "title": "DataprocMetastore updateFederation Sample", + "origin": "API_DEFINITION", + "description": " Updates the fields of a federation.", + "canonical": true, + "file": "dataproc_metastore_federation.update_federation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateFederation", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation.UpdateFederation", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "federation", + "type": ".google.cloud.metastore.v1.Federation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "UpdateFederation", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation.UpdateFederation", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation" + } + } + } + }, + { + "regionTag": "metastore_v1_generated_DataprocMetastoreFederation_DeleteFederation_async", + "title": "DataprocMetastore deleteFederation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single federation.", + "canonical": true, + "file": "dataproc_metastore_federation.delete_federation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteFederation", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation.DeleteFederation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "DeleteFederation", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation.DeleteFederation", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1.DataprocMetastoreFederation" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_backup.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_backup.js index e6712378949..46f14e978db 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_backup.js +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_backup.js @@ -29,8 +29,8 @@ function main(parent, backupId, backup) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the service in which to create a backup - * of the following form: + * Required. The relative resource name of the service in which to create a + * backup of the following form: * `projects/{project_number}/locations/{location_id}/services/{service_id}`. */ // const parent = 'abc123' @@ -43,15 +43,15 @@ function main(parent, backupId, backup) { */ // const backupId = 'abc123' /** - * Required. The backup to create. The `name` field is ignored. The ID of the created - * backup must be provided in the request's `backup_id` field. + * Required. The backup to create. The `name` field is ignored. The ID of the + * created backup must be provided in the request's `backup_id` field. */ // const backup = {} /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_metadata_import.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_metadata_import.js index a17230d3fd7..160570c1d9b 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_metadata_import.js +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_metadata_import.js @@ -29,30 +29,30 @@ function main(parent, metadataImportId, metadataImport) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the service in which to create a metastore - * import, in the following form: + * Required. The relative resource name of the service in which to create a + * metastore import, in the following form: * `projects/{project_number}/locations/{location_id}/services/{service_id}`. */ // const parent = 'abc123' /** - * Required. The ID of the metadata import, which is used as the final component of the - * metadata import's name. + * Required. The ID of the metadata import, which is used as the final + * component of the metadata import's name. * This value must be between 1 and 64 characters long, begin with a letter, * end with a letter or number, and consist of alpha-numeric ASCII characters * or hyphens. */ // const metadataImportId = 'abc123' /** - * Required. The metadata import to create. The `name` field is ignored. The ID of the - * created metadata import must be provided in the request's + * Required. The metadata import to create. The `name` field is ignored. The + * ID of the created metadata import must be provided in the request's * `metadata_import_id` field. */ // const metadataImport = {} /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_service.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_service.js index f9fc9a273d8..1a2911e08ef 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_service.js +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.create_service.js @@ -29,8 +29,8 @@ function main(parent, serviceId, service) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the location in which to create a metastore - * service, in the following form: + * Required. The relative resource name of the location in which to create a + * metastore service, in the following form: * `projects/{project_number}/locations/{location_id}`. */ // const parent = 'abc123' @@ -49,10 +49,10 @@ function main(parent, serviceId, service) { */ // const service = {} /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.delete_backup.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.delete_backup.js index d1c47305a48..e51c754d667 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.delete_backup.js +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.delete_backup.js @@ -35,10 +35,10 @@ function main(name) { */ // const name = 'abc123' /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.delete_service.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.delete_service.js index 2072a942d93..aafdab8ffc7 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.delete_service.js +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.delete_service.js @@ -29,16 +29,16 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the metastore service to delete, in the - * following form: + * Required. The relative resource name of the metastore service to delete, in + * the following form: * `projects/{project_number}/locations/{location_id}/services/{service_id}`. */ // const name = 'abc123' /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.export_metadata.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.export_metadata.js index 8c1f8b99ed7..b8acec0f0a1 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.export_metadata.js +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.export_metadata.js @@ -35,16 +35,16 @@ function main(service) { */ // const destinationGcsFolder = 'abc123' /** - * Required. The relative resource name of the metastore service to run export, in the - * following form: + * Required. The relative resource name of the metastore service to run + * export, in the following form: * `projects/{project_id}/locations/{location_id}/services/{service_id}`. */ // const service = 'abc123' /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. @@ -54,7 +54,8 @@ function main(service) { */ // const requestId = 'abc123' /** - * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`. + * Optional. The type of the database dump. If unspecified, defaults to + * `MYSQL`. */ // const databaseDumpType = {} diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.get_metadata_import.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.get_metadata_import.js index 9c397fa8510..25803bf327b 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.get_metadata_import.js +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.get_metadata_import.js @@ -29,8 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the metadata import to retrieve, in the - * following form: + * Required. The relative resource name of the metadata import to retrieve, in + * the following form: * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.get_service.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.get_service.js index 10a1873fd81..863a6663f63 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.get_service.js +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.get_service.js @@ -29,8 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the metastore service to retrieve, in the - * following form: + * Required. The relative resource name of the metastore service to retrieve, + * in the following form: * `projects/{project_number}/locations/{location_id}/services/{service_id}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.list_backups.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.list_backups.js index 81add9a803b..c78b7a873ce 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.list_backups.js +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.list_backups.js @@ -35,18 +35,19 @@ function main(parent) { */ // const parent = 'abc123' /** - * Optional. The maximum number of backups to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 backups are + * Optional. The maximum number of backups to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 backups are * returned. The maximum value is 1000; values above 1000 are changed to 1000. */ // const pageSize = 1234 /** - * Optional. A page token, received from a previous DataprocMetastore.ListBackups google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups + * Optional. A page token, received from a previous + * DataprocMetastore.ListBackups google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups * call. Provide this token to retrieve the subsequent page. * To retrieve the first page, supply an empty page token. * When paginating, other parameters provided to - * DataprocMetastore.ListBackups google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups must match the call that provided the - * page token. + * DataprocMetastore.ListBackups google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups + * must match the call that provided the page token. */ // const pageToken = 'abc123' /** diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.list_metadata_imports.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.list_metadata_imports.js index 711ef529abd..5f22941d095 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.list_metadata_imports.js +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.list_metadata_imports.js @@ -29,24 +29,25 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the service whose metadata imports to - * list, in the following form: + * Required. The relative resource name of the service whose metadata imports + * to list, in the following form: * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. */ // const parent = 'abc123' /** - * Optional. The maximum number of imports to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 imports are + * Optional. The maximum number of imports to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 imports are * returned. The maximum value is 1000; values above 1000 are changed to 1000. */ // const pageSize = 1234 /** - * Optional. A page token, received from a previous DataprocMetastore.ListServices google.cloud.metastore.v1alpha.DataprocMetastore.ListServices + * Optional. A page token, received from a previous + * DataprocMetastore.ListServices google.cloud.metastore.v1alpha.DataprocMetastore.ListServices * call. Provide this token to retrieve the subsequent page. * To retrieve the first page, supply an empty page token. * When paginating, other parameters provided to - * DataprocMetastore.ListServices google.cloud.metastore.v1alpha.DataprocMetastore.ListServices must match the call that provided the - * page token. + * DataprocMetastore.ListServices google.cloud.metastore.v1alpha.DataprocMetastore.ListServices + * must match the call that provided the page token. */ // const pageToken = 'abc123' /** diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.list_services.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.list_services.js index 8810a3ed330..904a272387f 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.list_services.js +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.list_services.js @@ -29,24 +29,26 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the location of metastore services to - * list, in the following form: + * Required. The relative resource name of the location of metastore services + * to list, in the following form: * `projects/{project_number}/locations/{location_id}`. */ // const parent = 'abc123' /** - * Optional. The maximum number of services to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 services are - * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * Optional. The maximum number of services to return. The response may + * contain less than the maximum number. If unspecified, no more than 500 + * services are returned. The maximum value is 1000; values above 1000 are + * changed to 1000. */ // const pageSize = 1234 /** - * Optional. A page token, received from a previous DataprocMetastore.ListServices google.cloud.metastore.v1alpha.DataprocMetastore.ListServices + * Optional. A page token, received from a previous + * DataprocMetastore.ListServices google.cloud.metastore.v1alpha.DataprocMetastore.ListServices * call. Provide this token to retrieve the subsequent page. * To retrieve the first page, supply an empty page token. * When paginating, other parameters provided to - * DataprocMetastore.ListServices google.cloud.metastore.v1alpha.DataprocMetastore.ListServices must match the call that provided the - * page token. + * DataprocMetastore.ListServices google.cloud.metastore.v1alpha.DataprocMetastore.ListServices + * must match the call that provided the page token. */ // const pageToken = 'abc123' /** diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.restore_service.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.restore_service.js index 28cdcc043a7..5efc4842573 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.restore_service.js +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.restore_service.js @@ -29,14 +29,14 @@ function main(service, backup) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the metastore service to run restore, in the - * following form: + * Required. The relative resource name of the metastore service to run + * restore, in the following form: * `projects/{project_id}/locations/{location_id}/services/{service_id}`. */ // const service = 'abc123' /** - * Required. The relative resource name of the metastore service backup to restore - * from, in the following form: + * Required. The relative resource name of the metastore service backup to + * restore from, in the following form: * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. */ // const backup = 'abc123' @@ -45,10 +45,10 @@ function main(service, backup) { */ // const restoreType = {} /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.update_metadata_import.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.update_metadata_import.js index eb5bfd3d5ea..ebaafa5b56c 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.update_metadata_import.js +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.update_metadata_import.js @@ -43,10 +43,10 @@ function main(updateMask, metadataImport) { */ // const metadataImport = {} /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.update_service.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.update_service.js index 565faa14cb0..f5ff29edf8a 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.update_service.js +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore.update_service.js @@ -43,10 +43,10 @@ function main(updateMask, service) { */ // const service = {} /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.create_federation.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.create_federation.js new file mode 100644 index 00000000000..cbb67ce1733 --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.create_federation.js @@ -0,0 +1,93 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, federationId, federation) { + // [START metastore_v1alpha_generated_DataprocMetastoreFederation_CreateFederation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The relative resource name of the location in which to create a federation + * service, in the following form: + * `projects/{project_number}/locations/{location_id}`. + */ + // const parent = 'abc123' + /** + * Required. The ID of the metastore federation, which is used as the final + * component of the metastore federation's name. + * This value must be between 2 and 63 characters long inclusive, begin with a + * letter, end with a letter or number, and consist of alpha-numeric + * ASCII characters or hyphens. + */ + // const federationId = 'abc123' + /** + * Required. The Metastore Federation to create. The `name` field is + * ignored. The ID of the created metastore federation must be + * provided in the request's `federation_id` field. + */ + // const federation = {} + /** + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * The request ID must be a valid + * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + */ + // const requestId = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1alpha; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callCreateFederation() { + // Construct request + const request = { + parent, + federationId, + federation, + }; + + // Run request + const [operation] = await metastoreClient.createFederation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateFederation(); + // [END metastore_v1alpha_generated_DataprocMetastoreFederation_CreateFederation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.delete_federation.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.delete_federation.js new file mode 100644 index 00000000000..dae3bcd39ab --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.delete_federation.js @@ -0,0 +1,77 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START metastore_v1alpha_generated_DataprocMetastoreFederation_DeleteFederation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The relative resource name of the metastore federation to delete, + * in the following form: + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + */ + // const name = 'abc123' + /** + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * The request ID must be a valid + * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + */ + // const requestId = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1alpha; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callDeleteFederation() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await metastoreClient.deleteFederation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteFederation(); + // [END metastore_v1alpha_generated_DataprocMetastoreFederation_DeleteFederation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.get_federation.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.get_federation.js new file mode 100644 index 00000000000..2d6a21c6e5a --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.get_federation.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START metastore_v1alpha_generated_DataprocMetastoreFederation_GetFederation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The relative resource name of the metastore federation to retrieve, + * in the following form: + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + */ + // const name = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1alpha; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callGetFederation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await metastoreClient.getFederation(request); + console.log(response); + } + + callGetFederation(); + // [END metastore_v1alpha_generated_DataprocMetastoreFederation_GetFederation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.list_federations.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.list_federations.js new file mode 100644 index 00000000000..315f72aa06d --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.list_federations.js @@ -0,0 +1,90 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START metastore_v1alpha_generated_DataprocMetastoreFederation_ListFederations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The relative resource name of the location of metastore federations + * to list, in the following form: + * `projects/{project_number}/locations/{location_id}`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of federations to return. The response may contain less + * than the maximum number. If unspecified, no more than 500 services are + * returned. The maximum value is 1000; values above 1000 are changed to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous ListFederationServices + * call. Provide this token to retrieve the subsequent page. + * To retrieve the first page, supply an empty page token. + * When paginating, other parameters provided to + * ListFederationServices must match the call that provided the + * page token. + */ + // const pageToken = 'abc123' + /** + * Optional. The filter to apply to list results. + */ + // const filter = 'abc123' + /** + * Optional. Specify the ordering of results as described in Sorting + * Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). + * If not specified, the results will be sorted in the default order. + */ + // const orderBy = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1alpha; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callListFederations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await metastoreClient.listFederationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFederations(); + // [END metastore_v1alpha_generated_DataprocMetastoreFederation_ListFederations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.update_federation.js b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.update_federation.js new file mode 100644 index 00000000000..215f126c0f4 --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/dataproc_metastore_federation.update_federation.js @@ -0,0 +1,86 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, federation) { + // [START metastore_v1alpha_generated_DataprocMetastoreFederation_UpdateFederation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. A field mask used to specify the fields to be overwritten in the + * metastore federation resource by the update. + * Fields specified in the `update_mask` are relative to the resource (not + * to the full request). A field is overwritten if it is in the mask. + */ + // const updateMask = {} + /** + * Required. The metastore federation to update. The server only merges fields + * in the service if they are specified in `update_mask`. + * The metastore federation's `name` field is used to identify the + * metastore service to be updated. + */ + // const federation = {} + /** + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * The request ID must be a valid + * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + */ + // const requestId = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1alpha; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callUpdateFederation() { + // Construct request + const request = { + updateMask, + federation, + }; + + // Run request + const [operation] = await metastoreClient.updateFederation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateFederation(); + // [END metastore_v1alpha_generated_DataprocMetastoreFederation_UpdateFederation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json b/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json index a00af67c105..1e1e417cad0 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 84, "type": "FULL" } ], @@ -262,7 +262,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 83, "type": "FULL" } ], @@ -458,7 +458,7 @@ "segments": [ { "start": 25, - "end": 79, + "end": 80, "type": "FULL" } ], @@ -562,7 +562,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 83, "type": "FULL" } ], @@ -742,6 +742,246 @@ } } } + }, + { + "regionTag": "metastore_v1alpha_generated_DataprocMetastoreFederation_ListFederations_async", + "title": "DataprocMetastore listFederations Sample", + "origin": "API_DEFINITION", + "description": " Lists federations in a project and location.", + "canonical": true, + "file": "dataproc_metastore_federation.list_federations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFederations", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation.ListFederations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.metastore.v1alpha.ListFederationsResponse", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "ListFederations", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation.ListFederations", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation" + } + } + } + }, + { + "regionTag": "metastore_v1alpha_generated_DataprocMetastoreFederation_GetFederation_async", + "title": "DataprocMetastore getFederation Sample", + "origin": "API_DEFINITION", + "description": " Gets the details of a single federation.", + "canonical": true, + "file": "dataproc_metastore_federation.get_federation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetFederation", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation.GetFederation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.metastore.v1alpha.Federation", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "GetFederation", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation.GetFederation", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation" + } + } + } + }, + { + "regionTag": "metastore_v1alpha_generated_DataprocMetastoreFederation_CreateFederation_async", + "title": "DataprocMetastore createFederation Sample", + "origin": "API_DEFINITION", + "description": " Creates a metastore federation in a project and location.", + "canonical": true, + "file": "dataproc_metastore_federation.create_federation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateFederation", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation.CreateFederation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "federation_id", + "type": "TYPE_STRING" + }, + { + "name": "federation", + "type": ".google.cloud.metastore.v1alpha.Federation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "CreateFederation", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation.CreateFederation", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation" + } + } + } + }, + { + "regionTag": "metastore_v1alpha_generated_DataprocMetastoreFederation_UpdateFederation_async", + "title": "DataprocMetastore updateFederation Sample", + "origin": "API_DEFINITION", + "description": " Updates the fields of a federation.", + "canonical": true, + "file": "dataproc_metastore_federation.update_federation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateFederation", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation.UpdateFederation", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "federation", + "type": ".google.cloud.metastore.v1alpha.Federation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "UpdateFederation", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation.UpdateFederation", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation" + } + } + } + }, + { + "regionTag": "metastore_v1alpha_generated_DataprocMetastoreFederation_DeleteFederation_async", + "title": "DataprocMetastore deleteFederation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single federation.", + "canonical": true, + "file": "dataproc_metastore_federation.delete_federation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteFederation", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation.DeleteFederation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "DeleteFederation", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation.DeleteFederation", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1alpha.DataprocMetastoreFederation" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_backup.js b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_backup.js index 395f0005177..f24171ffbd8 100644 --- a/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_backup.js +++ b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_backup.js @@ -31,7 +31,7 @@ function main(parent, backupId, backup) { /** * Required. The relative resource name of the service in which to create a * backup of the following form: - * `projects/{project_number}/locations/{location_id}/services/{service_id}` + * `projects/{project_number}/locations/{location_id}/services/{service_id}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_metadata_import.js b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_metadata_import.js index 3fd32bc78e9..c08664914ff 100644 --- a/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_metadata_import.js +++ b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.create_metadata_import.js @@ -31,7 +31,7 @@ function main(parent, metadataImportId, metadataImport) { /** * Required. The relative resource name of the service in which to create a * metastore import, in the following form: - * `projects/{project_number}/locations/{location_id}/services/{service_id}` + * `projects/{project_number}/locations/{location_id}/services/{service_id}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.export_metadata.js b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.export_metadata.js index e19cf4d54a4..6ff2ada6aa4 100644 --- a/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.export_metadata.js +++ b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.export_metadata.js @@ -37,7 +37,7 @@ function main(service) { /** * Required. The relative resource name of the metastore service to run * export, in the following form: - * `projects/{project_id}/locations/{location_id}/services/{service_id}` + * `projects/{project_id}/locations/{location_id}/services/{service_id}`. */ // const service = 'abc123' /** diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.restore_service.js b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.restore_service.js index b4862bd63c2..db907b07a0a 100644 --- a/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.restore_service.js +++ b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore.restore_service.js @@ -31,13 +31,13 @@ function main(service, backup) { /** * Required. The relative resource name of the metastore service to run * restore, in the following form: - * `projects/{project_id}/locations/{location_id}/services/{service_id}` + * `projects/{project_id}/locations/{location_id}/services/{service_id}`. */ // const service = 'abc123' /** * Required. The relative resource name of the metastore service backup to * restore from, in the following form: - * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}` + * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. */ // const backup = 'abc123' /** diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.create_federation.js b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.create_federation.js new file mode 100644 index 00000000000..46d3f5e8ed5 --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.create_federation.js @@ -0,0 +1,93 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, federationId, federation) { + // [START metastore_v1beta_generated_DataprocMetastoreFederation_CreateFederation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The relative resource name of the location in which to create a federation + * service, in the following form: + * `projects/{project_number}/locations/{location_id}`. + */ + // const parent = 'abc123' + /** + * Required. The ID of the metastore federation, which is used as the final + * component of the metastore federation's name. + * This value must be between 2 and 63 characters long inclusive, begin with a + * letter, end with a letter or number, and consist of alpha-numeric + * ASCII characters or hyphens. + */ + // const federationId = 'abc123' + /** + * Required. The Metastore Federation to create. The `name` field is + * ignored. The ID of the created metastore federation must be + * provided in the request's `federation_id` field. + */ + // const federation = {} + /** + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * The request ID must be a valid + * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + */ + // const requestId = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1beta; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callCreateFederation() { + // Construct request + const request = { + parent, + federationId, + federation, + }; + + // Run request + const [operation] = await metastoreClient.createFederation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateFederation(); + // [END metastore_v1beta_generated_DataprocMetastoreFederation_CreateFederation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.delete_federation.js b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.delete_federation.js new file mode 100644 index 00000000000..56bfc499c7c --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.delete_federation.js @@ -0,0 +1,77 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START metastore_v1beta_generated_DataprocMetastoreFederation_DeleteFederation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The relative resource name of the metastore federation to delete, + * in the following form: + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + */ + // const name = 'abc123' + /** + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * The request ID must be a valid + * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + */ + // const requestId = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1beta; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callDeleteFederation() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await metastoreClient.deleteFederation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteFederation(); + // [END metastore_v1beta_generated_DataprocMetastoreFederation_DeleteFederation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.get_federation.js b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.get_federation.js new file mode 100644 index 00000000000..bbbcb0f0d31 --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.get_federation.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START metastore_v1beta_generated_DataprocMetastoreFederation_GetFederation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The relative resource name of the metastore federation to retrieve, + * in the following form: + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + */ + // const name = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1beta; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callGetFederation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await metastoreClient.getFederation(request); + console.log(response); + } + + callGetFederation(); + // [END metastore_v1beta_generated_DataprocMetastoreFederation_GetFederation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.list_federations.js b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.list_federations.js new file mode 100644 index 00000000000..26bcb306912 --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.list_federations.js @@ -0,0 +1,90 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START metastore_v1beta_generated_DataprocMetastoreFederation_ListFederations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The relative resource name of the location of metastore federations + * to list, in the following form: + * `projects/{project_number}/locations/{location_id}`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of federations to return. The response may contain less + * than the maximum number. If unspecified, no more than 500 services are + * returned. The maximum value is 1000; values above 1000 are changed to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous ListFederationServices + * call. Provide this token to retrieve the subsequent page. + * To retrieve the first page, supply an empty page token. + * When paginating, other parameters provided to + * ListFederationServices must match the call that provided the + * page token. + */ + // const pageToken = 'abc123' + /** + * Optional. The filter to apply to list results. + */ + // const filter = 'abc123' + /** + * Optional. Specify the ordering of results as described in Sorting + * Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). + * If not specified, the results will be sorted in the default order. + */ + // const orderBy = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1beta; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callListFederations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await metastoreClient.listFederationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFederations(); + // [END metastore_v1beta_generated_DataprocMetastoreFederation_ListFederations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.update_federation.js b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.update_federation.js new file mode 100644 index 00000000000..7789d713fe3 --- /dev/null +++ b/packages/google-cloud-metastore/samples/generated/v1beta/dataproc_metastore_federation.update_federation.js @@ -0,0 +1,86 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, federation) { + // [START metastore_v1beta_generated_DataprocMetastoreFederation_UpdateFederation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. A field mask used to specify the fields to be overwritten in the + * metastore federation resource by the update. + * Fields specified in the `update_mask` are relative to the resource (not + * to the full request). A field is overwritten if it is in the mask. + */ + // const updateMask = {} + /** + * Required. The metastore federation to update. The server only merges fields + * in the service if they are specified in `update_mask`. + * The metastore federation's `name` field is used to identify the + * metastore service to be updated. + */ + // const federation = {} + /** + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * The request ID must be a valid + * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + */ + // const requestId = 'abc123' + + // Imports the Metastore library + const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1beta; + + // Instantiates a client + const metastoreClient = new DataprocMetastoreFederationClient(); + + async function callUpdateFederation() { + // Construct request + const request = { + updateMask, + federation, + }; + + // Run request + const [operation] = await metastoreClient.updateFederation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateFederation(); + // [END metastore_v1beta_generated_DataprocMetastoreFederation_UpdateFederation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json b/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json index fc490185eb5..fff3232d03a 100644 --- a/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json +++ b/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json @@ -651,7 +651,7 @@ "regionTag": "metastore_v1beta_generated_DataprocMetastore_CreateBackup_async", "title": "DataprocMetastore createBackup Sample", "origin": "API_DEFINITION", - "description": " Creates a new Backup in a given project and location.", + "description": " Creates a new backup in a given project and location.", "canonical": true, "file": "dataproc_metastore.create_backup.js", "language": "JAVASCRIPT", @@ -742,6 +742,246 @@ } } } + }, + { + "regionTag": "metastore_v1beta_generated_DataprocMetastoreFederation_ListFederations_async", + "title": "DataprocMetastore listFederations Sample", + "origin": "API_DEFINITION", + "description": " Lists federations in a project and location.", + "canonical": true, + "file": "dataproc_metastore_federation.list_federations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFederations", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation.ListFederations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.metastore.v1beta.ListFederationsResponse", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "ListFederations", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation.ListFederations", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation" + } + } + } + }, + { + "regionTag": "metastore_v1beta_generated_DataprocMetastoreFederation_GetFederation_async", + "title": "DataprocMetastore getFederation Sample", + "origin": "API_DEFINITION", + "description": " Gets the details of a single federation.", + "canonical": true, + "file": "dataproc_metastore_federation.get_federation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetFederation", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation.GetFederation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.metastore.v1beta.Federation", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "GetFederation", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation.GetFederation", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation" + } + } + } + }, + { + "regionTag": "metastore_v1beta_generated_DataprocMetastoreFederation_CreateFederation_async", + "title": "DataprocMetastore createFederation Sample", + "origin": "API_DEFINITION", + "description": " Creates a metastore federation in a project and location.", + "canonical": true, + "file": "dataproc_metastore_federation.create_federation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateFederation", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation.CreateFederation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "federation_id", + "type": "TYPE_STRING" + }, + { + "name": "federation", + "type": ".google.cloud.metastore.v1beta.Federation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "CreateFederation", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation.CreateFederation", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation" + } + } + } + }, + { + "regionTag": "metastore_v1beta_generated_DataprocMetastoreFederation_UpdateFederation_async", + "title": "DataprocMetastore updateFederation Sample", + "origin": "API_DEFINITION", + "description": " Updates the fields of a federation.", + "canonical": true, + "file": "dataproc_metastore_federation.update_federation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateFederation", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation.UpdateFederation", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "federation", + "type": ".google.cloud.metastore.v1beta.Federation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "UpdateFederation", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation.UpdateFederation", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation" + } + } + } + }, + { + "regionTag": "metastore_v1beta_generated_DataprocMetastoreFederation_DeleteFederation_async", + "title": "DataprocMetastore deleteFederation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single federation.", + "canonical": true, + "file": "dataproc_metastore_federation.delete_federation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteFederation", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation.DeleteFederation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataprocMetastoreFederationClient", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederationClient" + }, + "method": { + "shortName": "DeleteFederation", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation.DeleteFederation", + "service": { + "shortName": "DataprocMetastoreFederation", + "fullName": "google.cloud.metastore.v1beta.DataprocMetastoreFederation" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-metastore/src/index.ts b/packages/google-cloud-metastore/src/index.ts index 24ab4e759c4..4957d3f5d8d 100644 --- a/packages/google-cloud-metastore/src/index.ts +++ b/packages/google-cloud-metastore/src/index.ts @@ -22,8 +22,22 @@ import * as v1beta from './v1beta'; const DataprocMetastoreClient = v1.DataprocMetastoreClient; type DataprocMetastoreClient = v1.DataprocMetastoreClient; +const DataprocMetastoreFederationClient = v1.DataprocMetastoreFederationClient; +type DataprocMetastoreFederationClient = v1.DataprocMetastoreFederationClient; -export {v1, v1alpha, v1beta, DataprocMetastoreClient}; -export default {v1, v1alpha, v1beta, DataprocMetastoreClient}; +export { + v1, + v1alpha, + v1beta, + DataprocMetastoreClient, + DataprocMetastoreFederationClient, +}; +export default { + v1, + v1alpha, + v1beta, + DataprocMetastoreClient, + DataprocMetastoreFederationClient, +}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-metastore/src/v1/dataproc_metastore_client.ts b/packages/google-cloud-metastore/src/v1/dataproc_metastore_client.ts index d832f85bdc9..62cbd7f173c 100644 --- a/packages/google-cloud-metastore/src/v1/dataproc_metastore_client.ts +++ b/packages/google-cloud-metastore/src/v1/dataproc_metastore_client.ts @@ -27,6 +27,10 @@ import type { LROperation, PaginationCallback, GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, } from 'google-gax'; import {Transform} from 'stream'; import * as protos from '../../protos/protos'; @@ -77,6 +81,8 @@ export class DataprocMetastoreClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; dataprocMetastoreStub?: Promise<{[name: string]: Function}>; @@ -171,6 +177,12 @@ export class DataprocMetastoreClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -197,6 +209,9 @@ export class DataprocMetastoreClient { backupPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/services/{service}/backups/{backup}' ), + federationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/federations/{federation}' + ), locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), @@ -206,6 +221,9 @@ export class DataprocMetastoreClient { networkPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/global/networks/{network}' ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), servicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/services/{service}' ), @@ -258,6 +276,9 @@ export class DataprocMetastoreClient { { get: '/v1/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/federations/*}:getIamPolicy', + }, ], }, { @@ -269,12 +290,22 @@ export class DataprocMetastoreClient { post: '/v1/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/federations/*}:setIamPolicy', + body: '*', + }, ], }, { selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', post: '/v1/{resource=projects/*/locations/*/services/*}:testIamPermissions', body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/federations/*}:testIamPermissions', + body: '*', + }, + ], }, { selector: 'google.longrunning.Operations.DeleteOperation', @@ -2977,6 +3008,403 @@ export class DataprocMetastoreClient { callSettings ) as AsyncIterable; } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [Policy]{@link google.iam.v1.Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. The promise has a method named + * "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -3048,6 +3476,58 @@ export class DataprocMetastoreClient { return this.pathTemplates.backupPathTemplate.match(backupName).backup; } + /** + * Return a fully-qualified federation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} federation + * @returns {string} Resource name string. + */ + federationPath(project: string, location: string, federation: string) { + return this.pathTemplates.federationPathTemplate.render({ + project: project, + location: location, + federation: federation, + }); + } + + /** + * Parse the project from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .project; + } + + /** + * Parse the location from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .location; + } + + /** + * Parse the federation from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the federation. + */ + matchFederationFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .federation; + } + /** * Return a fully-qualified location resource name string. * @@ -3195,6 +3675,29 @@ export class DataprocMetastoreClient { return this.pathTemplates.networkPathTemplate.match(networkName).network; } + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + /** * Return a fully-qualified service resource name string. * @@ -3255,6 +3758,8 @@ export class DataprocMetastoreClient { return this.dataprocMetastoreStub.then(stub => { this._terminated = true; stub.close(); + this.iamClient.close(); + this.locationsClient.close(); this.operationsClient.close(); }); } diff --git a/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_client.ts b/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_client.ts new file mode 100644 index 00000000000..826c44dcaa6 --- /dev/null +++ b/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_client.ts @@ -0,0 +1,2019 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/dataproc_metastore_federation_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './dataproc_metastore_federation_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Configures and manages metastore federation services. + * Dataproc Metastore Federation Service allows federating a collection of + * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc + * Metastores. The Federation Service exposes a gRPC URL through which metadata + * from the backend metastores are served at query time. + * + * The Dataproc Metastore Federation API defines the following resource model: + * * The service works with a collection of Google Cloud projects. + * * Each project has a collection of available locations. + * * Each location has a collection of federations. + * * Dataproc Metastore Federations are resources with names of the + * form: + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @class + * @memberof v1 + */ +export class DataprocMetastoreFederationClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + dataprocMetastoreFederationStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataprocMetastoreFederationClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataprocMetastoreFederationClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof DataprocMetastoreFederationClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + backupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/services/{service}/backups/{backup}' + ), + federationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/federations/{federation}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + metadataImportPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + servicePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/services/{service}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listFederations: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'federations' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.cloud.location.Locations.GetLocation', + get: '/v1/{name=projects/*/locations/*}', + }, + { + selector: 'google.cloud.location.Locations.ListLocations', + get: '/v1/{name=projects/*}/locations', + }, + { + selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', + get: '/v1/{resource=projects/*/locations/*/services/*}:getIamPolicy', + additional_bindings: [ + { + get: '/v1/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/federations/*}:getIamPolicy', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1/{resource=projects/*/locations/*/services/*}:setIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/federations/*}:setIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1/{resource=projects/*/locations/*/services/*}:testIamPermissions', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/federations/*}:testIamPermissions', + body: '*', + }, + ], + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1/{name=projects/*/locations/*}/operations', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createFederationResponse = protoFilesRoot.lookup( + '.google.cloud.metastore.v1.Federation' + ) as gax.protobuf.Type; + const createFederationMetadata = protoFilesRoot.lookup( + '.google.cloud.metastore.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateFederationResponse = protoFilesRoot.lookup( + '.google.cloud.metastore.v1.Federation' + ) as gax.protobuf.Type; + const updateFederationMetadata = protoFilesRoot.lookup( + '.google.cloud.metastore.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteFederationResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteFederationMetadata = protoFilesRoot.lookup( + '.google.cloud.metastore.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createFederation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createFederationResponse.decode.bind(createFederationResponse), + createFederationMetadata.decode.bind(createFederationMetadata) + ), + updateFederation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateFederationResponse.decode.bind(updateFederationResponse), + updateFederationMetadata.decode.bind(updateFederationMetadata) + ), + deleteFederation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteFederationResponse.decode.bind(deleteFederationResponse), + deleteFederationMetadata.decode.bind(deleteFederationMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.metastore.v1.DataprocMetastoreFederation', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataprocMetastoreFederationStub) { + return this.dataprocMetastoreFederationStub; + } + + // Put together the "service stub" for + // google.cloud.metastore.v1.DataprocMetastoreFederation. + this.dataprocMetastoreFederationStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.metastore.v1.DataprocMetastoreFederation' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.metastore.v1 + .DataprocMetastoreFederation, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const dataprocMetastoreFederationStubMethods = [ + 'listFederations', + 'getFederation', + 'createFederation', + 'updateFederation', + 'deleteFederation', + ]; + for (const methodName of dataprocMetastoreFederationStubMethods) { + const callPromise = this.dataprocMetastoreFederationStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataprocMetastoreFederationStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'metastore.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'metastore.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Gets the details of a single federation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The relative resource name of the metastore federation to retrieve, + * in the following form: + * + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Federation]{@link google.cloud.metastore.v1.Federation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataproc_metastore_federation.get_federation.js + * region_tag:metastore_v1_generated_DataprocMetastoreFederation_GetFederation_async + */ + getFederation( + request?: protos.google.cloud.metastore.v1.IGetFederationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IGetFederationRequest | undefined, + {} | undefined + ] + >; + getFederation( + request: protos.google.cloud.metastore.v1.IGetFederationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IGetFederationRequest | null | undefined, + {} | null | undefined + > + ): void; + getFederation( + request: protos.google.cloud.metastore.v1.IGetFederationRequest, + callback: Callback< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IGetFederationRequest | null | undefined, + {} | null | undefined + > + ): void; + getFederation( + request?: protos.google.cloud.metastore.v1.IGetFederationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.metastore.v1.IFederation, + | protos.google.cloud.metastore.v1.IGetFederationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IGetFederationRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IGetFederationRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getFederation(request, options, callback); + } + + /** + * Creates a metastore federation in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The relative resource name of the location in which to create a federation + * service, in the following form: + * + * `projects/{project_number}/locations/{location_id}`. + * @param {string} request.federationId + * Required. The ID of the metastore federation, which is used as the final + * component of the metastore federation's name. + * + * This value must be between 2 and 63 characters long inclusive, begin with a + * letter, end with a letter or number, and consist of alpha-numeric + * ASCII characters or hyphens. + * @param {google.cloud.metastore.v1.Federation} request.federation + * Required. The Metastore Federation to create. The `name` field is + * ignored. The ID of the created metastore federation must be + * provided in the request's `federation_id` field. + * @param {string} [request.requestId] + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * + * The request ID must be a valid + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataproc_metastore_federation.create_federation.js + * region_tag:metastore_v1_generated_DataprocMetastoreFederation_CreateFederation_async + */ + createFederation( + request?: protos.google.cloud.metastore.v1.ICreateFederationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createFederation( + request: protos.google.cloud.metastore.v1.ICreateFederationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createFederation( + request: protos.google.cloud.metastore.v1.ICreateFederationRequest, + callback: Callback< + LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createFederation( + request?: protos.google.cloud.metastore.v1.ICreateFederationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createFederation(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createFederation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataproc_metastore_federation.create_federation.js + * region_tag:metastore_v1_generated_DataprocMetastoreFederation_CreateFederation_async + */ + async checkCreateFederationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.metastore.v1.Federation, + protos.google.cloud.metastore.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createFederation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.metastore.v1.Federation, + protos.google.cloud.metastore.v1.OperationMetadata + >; + } + /** + * Updates the fields of a federation. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A field mask used to specify the fields to be overwritten in the + * metastore federation resource by the update. + * Fields specified in the `update_mask` are relative to the resource (not + * to the full request). A field is overwritten if it is in the mask. + * @param {google.cloud.metastore.v1.Federation} request.federation + * Required. The metastore federation to update. The server only merges fields + * in the service if they are specified in `update_mask`. + * + * The metastore federation's `name` field is used to identify the + * metastore service to be updated. + * @param {string} [request.requestId] + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * + * The request ID must be a valid + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataproc_metastore_federation.update_federation.js + * region_tag:metastore_v1_generated_DataprocMetastoreFederation_UpdateFederation_async + */ + updateFederation( + request?: protos.google.cloud.metastore.v1.IUpdateFederationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateFederation( + request: protos.google.cloud.metastore.v1.IUpdateFederationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateFederation( + request: protos.google.cloud.metastore.v1.IUpdateFederationRequest, + callback: Callback< + LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateFederation( + request?: protos.google.cloud.metastore.v1.IUpdateFederationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'federation.name': request.federation!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateFederation(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateFederation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataproc_metastore_federation.update_federation.js + * region_tag:metastore_v1_generated_DataprocMetastoreFederation_UpdateFederation_async + */ + async checkUpdateFederationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.metastore.v1.Federation, + protos.google.cloud.metastore.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateFederation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.metastore.v1.Federation, + protos.google.cloud.metastore.v1.OperationMetadata + >; + } + /** + * Deletes a single federation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The relative resource name of the metastore federation to delete, + * in the following form: + * + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @param {string} [request.requestId] + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * + * The request ID must be a valid + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataproc_metastore_federation.delete_federation.js + * region_tag:metastore_v1_generated_DataprocMetastoreFederation_DeleteFederation_async + */ + deleteFederation( + request?: protos.google.cloud.metastore.v1.IDeleteFederationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteFederation( + request: protos.google.cloud.metastore.v1.IDeleteFederationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteFederation( + request: protos.google.cloud.metastore.v1.IDeleteFederationRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteFederation( + request?: protos.google.cloud.metastore.v1.IDeleteFederationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteFederation(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteFederation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataproc_metastore_federation.delete_federation.js + * region_tag:metastore_v1_generated_DataprocMetastoreFederation_DeleteFederation_async + */ + async checkDeleteFederationProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.metastore.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteFederation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.metastore.v1.OperationMetadata + >; + } + /** + * Lists federations in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The relative resource name of the location of metastore federations + * to list, in the following form: + * `projects/{project_number}/locations/{location_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of federations to return. The response may contain less + * than the maximum number. If unspecified, no more than 500 services are + * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous ListFederationServices + * call. Provide this token to retrieve the subsequent page. + * + * To retrieve the first page, supply an empty page token. + * + * When paginating, other parameters provided to + * ListFederationServices must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. The filter to apply to list results. + * @param {string} [request.orderBy] + * Optional. Specify the ordering of results as described in [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * If not specified, the results will be sorted in the default order. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Federation]{@link google.cloud.metastore.v1.Federation}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listFederationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listFederations( + request?: protos.google.cloud.metastore.v1.IListFederationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.metastore.v1.IFederation[], + protos.google.cloud.metastore.v1.IListFederationsRequest | null, + protos.google.cloud.metastore.v1.IListFederationsResponse + ] + >; + listFederations( + request: protos.google.cloud.metastore.v1.IListFederationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.metastore.v1.IListFederationsRequest, + | protos.google.cloud.metastore.v1.IListFederationsResponse + | null + | undefined, + protos.google.cloud.metastore.v1.IFederation + > + ): void; + listFederations( + request: protos.google.cloud.metastore.v1.IListFederationsRequest, + callback: PaginationCallback< + protos.google.cloud.metastore.v1.IListFederationsRequest, + | protos.google.cloud.metastore.v1.IListFederationsResponse + | null + | undefined, + protos.google.cloud.metastore.v1.IFederation + > + ): void; + listFederations( + request?: protos.google.cloud.metastore.v1.IListFederationsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.metastore.v1.IListFederationsRequest, + | protos.google.cloud.metastore.v1.IListFederationsResponse + | null + | undefined, + protos.google.cloud.metastore.v1.IFederation + >, + callback?: PaginationCallback< + protos.google.cloud.metastore.v1.IListFederationsRequest, + | protos.google.cloud.metastore.v1.IListFederationsResponse + | null + | undefined, + protos.google.cloud.metastore.v1.IFederation + > + ): Promise< + [ + protos.google.cloud.metastore.v1.IFederation[], + protos.google.cloud.metastore.v1.IListFederationsRequest | null, + protos.google.cloud.metastore.v1.IListFederationsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listFederations(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The relative resource name of the location of metastore federations + * to list, in the following form: + * `projects/{project_number}/locations/{location_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of federations to return. The response may contain less + * than the maximum number. If unspecified, no more than 500 services are + * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous ListFederationServices + * call. Provide this token to retrieve the subsequent page. + * + * To retrieve the first page, supply an empty page token. + * + * When paginating, other parameters provided to + * ListFederationServices must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. The filter to apply to list results. + * @param {string} [request.orderBy] + * Optional. Specify the ordering of results as described in [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * If not specified, the results will be sorted in the default order. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Federation]{@link google.cloud.metastore.v1.Federation} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listFederationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listFederationsStream( + request?: protos.google.cloud.metastore.v1.IListFederationsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFederations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listFederations.createStream( + this.innerApiCalls.listFederations as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listFederations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The relative resource name of the location of metastore federations + * to list, in the following form: + * `projects/{project_number}/locations/{location_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of federations to return. The response may contain less + * than the maximum number. If unspecified, no more than 500 services are + * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous ListFederationServices + * call. Provide this token to retrieve the subsequent page. + * + * To retrieve the first page, supply an empty page token. + * + * When paginating, other parameters provided to + * ListFederationServices must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. The filter to apply to list results. + * @param {string} [request.orderBy] + * Optional. Specify the ordering of results as described in [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * If not specified, the results will be sorted in the default order. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Federation]{@link google.cloud.metastore.v1.Federation}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataproc_metastore_federation.list_federations.js + * region_tag:metastore_v1_generated_DataprocMetastoreFederation_ListFederations_async + */ + listFederationsAsync( + request?: protos.google.cloud.metastore.v1.IListFederationsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFederations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listFederations.asyncIterate( + this.innerApiCalls['listFederations'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [Policy]{@link google.iam.v1.Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. The promise has a method named + * "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified backup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} service + * @param {string} backup + * @returns {string} Resource name string. + */ + backupPath( + project: string, + location: string, + service: string, + backup: string + ) { + return this.pathTemplates.backupPathTemplate.render({ + project: project, + location: location, + service: service, + backup: backup, + }); + } + + /** + * Parse the project from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).project; + } + + /** + * Parse the location from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).location; + } + + /** + * Parse the service from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the service. + */ + matchServiceFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).service; + } + + /** + * Parse the backup from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backup. + */ + matchBackupFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backup; + } + + /** + * Return a fully-qualified federation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} federation + * @returns {string} Resource name string. + */ + federationPath(project: string, location: string, federation: string) { + return this.pathTemplates.federationPathTemplate.render({ + project: project, + location: location, + federation: federation, + }); + } + + /** + * Parse the project from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .project; + } + + /** + * Parse the location from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .location; + } + + /** + * Parse the federation from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the federation. + */ + matchFederationFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .federation; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified metadataImport resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} service + * @param {string} metadata_import + * @returns {string} Resource name string. + */ + metadataImportPath( + project: string, + location: string, + service: string, + metadataImport: string + ) { + return this.pathTemplates.metadataImportPathTemplate.render({ + project: project, + location: location, + service: service, + metadata_import: metadataImport, + }); + } + + /** + * Parse the project from MetadataImport resource. + * + * @param {string} metadataImportName + * A fully-qualified path representing MetadataImport resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataImportName(metadataImportName: string) { + return this.pathTemplates.metadataImportPathTemplate.match( + metadataImportName + ).project; + } + + /** + * Parse the location from MetadataImport resource. + * + * @param {string} metadataImportName + * A fully-qualified path representing MetadataImport resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataImportName(metadataImportName: string) { + return this.pathTemplates.metadataImportPathTemplate.match( + metadataImportName + ).location; + } + + /** + * Parse the service from MetadataImport resource. + * + * @param {string} metadataImportName + * A fully-qualified path representing MetadataImport resource. + * @returns {string} A string representing the service. + */ + matchServiceFromMetadataImportName(metadataImportName: string) { + return this.pathTemplates.metadataImportPathTemplate.match( + metadataImportName + ).service; + } + + /** + * Parse the metadata_import from MetadataImport resource. + * + * @param {string} metadataImportName + * A fully-qualified path representing MetadataImport resource. + * @returns {string} A string representing the metadata_import. + */ + matchMetadataImportFromMetadataImportName(metadataImportName: string) { + return this.pathTemplates.metadataImportPathTemplate.match( + metadataImportName + ).metadata_import; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified service resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} service + * @returns {string} Resource name string. + */ + servicePath(project: string, location: string, service: string) { + return this.pathTemplates.servicePathTemplate.render({ + project: project, + location: location, + service: service, + }); + } + + /** + * Parse the project from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the project. + */ + matchProjectFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).project; + } + + /** + * Parse the location from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the location. + */ + matchLocationFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).location; + } + + /** + * Parse the service from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).service; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.dataprocMetastoreFederationStub && !this._terminated) { + return this.dataprocMetastoreFederationStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_client_config.json b/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_client_config.json new file mode 100644 index 00000000000..71c66a13e4c --- /dev/null +++ b/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_client_config.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "google.cloud.metastore.v1.DataprocMetastoreFederation": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListFederations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetFederation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateFederation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateFederation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteFederation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_proto_list.json b/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_proto_list.json new file mode 100644 index 00000000000..76860a15e6b --- /dev/null +++ b/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/cloud/metastore/v1/metastore.proto", + "../../protos/google/cloud/metastore/v1/metastore_federation.proto" +] diff --git a/packages/google-cloud-metastore/src/v1/dataproc_metastore_proto_list.json b/packages/google-cloud-metastore/src/v1/dataproc_metastore_proto_list.json index dffb3aa1755..76860a15e6b 100644 --- a/packages/google-cloud-metastore/src/v1/dataproc_metastore_proto_list.json +++ b/packages/google-cloud-metastore/src/v1/dataproc_metastore_proto_list.json @@ -1,3 +1,4 @@ [ - "../../protos/google/cloud/metastore/v1/metastore.proto" + "../../protos/google/cloud/metastore/v1/metastore.proto", + "../../protos/google/cloud/metastore/v1/metastore_federation.proto" ] diff --git a/packages/google-cloud-metastore/src/v1/gapic_metadata.json b/packages/google-cloud-metastore/src/v1/gapic_metadata.json index f98f8d7af03..0e5fffd2771 100644 --- a/packages/google-cloud-metastore/src/v1/gapic_metadata.json +++ b/packages/google-cloud-metastore/src/v1/gapic_metadata.json @@ -180,6 +180,74 @@ } } } + }, + "DataprocMetastoreFederation": { + "clients": { + "grpc": { + "libraryClient": "DataprocMetastoreFederationClient", + "rpcs": { + "GetFederation": { + "methods": [ + "getFederation" + ] + }, + "CreateFederation": { + "methods": [ + "createFederation" + ] + }, + "UpdateFederation": { + "methods": [ + "updateFederation" + ] + }, + "DeleteFederation": { + "methods": [ + "deleteFederation" + ] + }, + "ListFederations": { + "methods": [ + "listFederations", + "listFederationsStream", + "listFederationsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataprocMetastoreFederationClient", + "rpcs": { + "GetFederation": { + "methods": [ + "getFederation" + ] + }, + "CreateFederation": { + "methods": [ + "createFederation" + ] + }, + "UpdateFederation": { + "methods": [ + "updateFederation" + ] + }, + "DeleteFederation": { + "methods": [ + "deleteFederation" + ] + }, + "ListFederations": { + "methods": [ + "listFederations", + "listFederationsStream", + "listFederationsAsync" + ] + } + } + } + } } } } diff --git a/packages/google-cloud-metastore/src/v1/index.ts b/packages/google-cloud-metastore/src/v1/index.ts index ccdbefddf7a..3e1ee876b29 100644 --- a/packages/google-cloud-metastore/src/v1/index.ts +++ b/packages/google-cloud-metastore/src/v1/index.ts @@ -17,3 +17,4 @@ // ** All changes to this file may be overwritten. ** export {DataprocMetastoreClient} from './dataproc_metastore_client'; +export {DataprocMetastoreFederationClient} from './dataproc_metastore_federation_client'; diff --git a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_client.ts b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_client.ts index 5eeb817559a..6da964d33d7 100644 --- a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_client.ts +++ b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_client.ts @@ -27,6 +27,10 @@ import type { LROperation, PaginationCallback, GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, } from 'google-gax'; import {Transform} from 'stream'; import * as protos from '../../protos/protos'; @@ -77,6 +81,8 @@ export class DataprocMetastoreClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; dataprocMetastoreStub?: Promise<{[name: string]: Function}>; @@ -171,6 +177,12 @@ export class DataprocMetastoreClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -197,6 +209,9 @@ export class DataprocMetastoreClient { backupPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/services/{service}/backups/{backup}' ), + federationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/federations/{federation}' + ), lakePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}' ), @@ -209,6 +224,9 @@ export class DataprocMetastoreClient { networkPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/global/networks/{network}' ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), servicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/services/{service}' ), @@ -267,6 +285,9 @@ export class DataprocMetastoreClient { { get: '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:getIamPolicy', }, + { + get: '/v1alpha/{resource=projects/*/locations/*/federations/*}:getIamPolicy', + }, ], }, { @@ -286,6 +307,10 @@ export class DataprocMetastoreClient { post: '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:setIamPolicy', body: '*', }, + { + post: '/v1alpha/{resource=projects/*/locations/*/federations/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -305,6 +330,10 @@ export class DataprocMetastoreClient { post: '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:testIamPermissions', body: '*', }, + { + post: '/v1alpha/{resource=projects/*/locations/*/federations/*}:testIamPermissions', + body: '*', + }, ], }, { @@ -585,8 +614,8 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The relative resource name of the metastore service to retrieve, in the - * following form: + * Required. The relative resource name of the metastore service to retrieve, + * in the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}`. * @param {object} [options] @@ -679,8 +708,8 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The relative resource name of the metadata import to retrieve, in the - * following form: + * Required. The relative resource name of the metadata import to retrieve, in + * the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`. * @param {object} [options] @@ -874,8 +903,8 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the location in which to create a metastore - * service, in the following form: + * Required. The relative resource name of the location in which to create a + * metastore service, in the following form: * * `projects/{project_number}/locations/{location_id}`. * @param {string} request.serviceId @@ -890,10 +919,10 @@ export class DataprocMetastoreClient { * ignored. The ID of the created metastore service must be provided in * the request's `service_id` field. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -1050,10 +1079,10 @@ export class DataprocMetastoreClient { * The metastore service's `name` field is used to identify the metastore * service to be updated. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -1199,15 +1228,15 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The relative resource name of the metastore service to delete, in the - * following form: + * Required. The relative resource name of the metastore service to delete, in + * the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}`. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -1353,26 +1382,26 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the service in which to create a metastore - * import, in the following form: + * Required. The relative resource name of the service in which to create a + * metastore import, in the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}`. * @param {string} request.metadataImportId - * Required. The ID of the metadata import, which is used as the final component of the - * metadata import's name. + * Required. The ID of the metadata import, which is used as the final + * component of the metadata import's name. * * This value must be between 1 and 64 characters long, begin with a letter, * end with a letter or number, and consist of alpha-numeric ASCII characters * or hyphens. * @param {google.cloud.metastore.v1alpha.MetadataImport} request.metadataImport - * Required. The metadata import to create. The `name` field is ignored. The ID of the - * created metadata import must be provided in the request's + * Required. The metadata import to create. The `name` field is ignored. The + * ID of the created metadata import must be provided in the request's * `metadata_import_id` field. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -1530,10 +1559,10 @@ export class DataprocMetastoreClient { * The metadata import's `name` field is used to identify the metastore * import to be updated. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -1683,15 +1712,15 @@ export class DataprocMetastoreClient { * `gs:///`. A sub-folder * `` containing exported files will be created below it. * @param {string} request.service - * Required. The relative resource name of the metastore service to run export, in the - * following form: + * Required. The relative resource name of the metastore service to run + * export, in the following form: * * `projects/{project_id}/locations/{location_id}/services/{service_id}`. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -1701,7 +1730,8 @@ export class DataprocMetastoreClient { * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. * @param {google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type} [request.databaseDumpType] - * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`. + * Optional. The type of the database dump. If unspecified, defaults to + * `MYSQL`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1839,22 +1869,22 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.service - * Required. The relative resource name of the metastore service to run restore, in the - * following form: + * Required. The relative resource name of the metastore service to run + * restore, in the following form: * * `projects/{project_id}/locations/{location_id}/services/{service_id}`. * @param {string} request.backup - * Required. The relative resource name of the metastore service backup to restore - * from, in the following form: + * Required. The relative resource name of the metastore service backup to + * restore from, in the following form: * * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. * @param {google.cloud.metastore.v1alpha.Restore.RestoreType} [request.restoreType] * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -2000,8 +2030,8 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the service in which to create a backup - * of the following form: + * Required. The relative resource name of the service in which to create a + * backup of the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}`. * @param {string} request.backupId @@ -2012,13 +2042,13 @@ export class DataprocMetastoreClient { * end with a letter or number, and consist of alpha-numeric ASCII characters * or hyphens. * @param {google.cloud.metastore.v1alpha.Backup} request.backup - * Required. The backup to create. The `name` field is ignored. The ID of the created - * backup must be provided in the request's `backup_id` field. + * Required. The backup to create. The `name` field is ignored. The ID of the + * created backup must be provided in the request's `backup_id` field. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -2169,10 +2199,10 @@ export class DataprocMetastoreClient { * * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -2318,23 +2348,25 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the location of metastore services to - * list, in the following form: + * Required. The relative resource name of the location of metastore services + * to list, in the following form: * * `projects/{project_number}/locations/{location_id}`. * @param {number} [request.pageSize] - * Optional. The maximum number of services to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 services are - * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * Optional. The maximum number of services to return. The response may + * contain less than the maximum number. If unspecified, no more than 500 + * services are returned. The maximum value is 1000; values above 1000 are + * changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2434,23 +2466,25 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the location of metastore services to - * list, in the following form: + * Required. The relative resource name of the location of metastore services + * to list, in the following form: * * `projects/{project_number}/locations/{location_id}`. * @param {number} [request.pageSize] - * Optional. The maximum number of services to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 services are - * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * Optional. The maximum number of services to return. The response may + * contain less than the maximum number. If unspecified, no more than 500 + * services are returned. The maximum value is 1000; values above 1000 are + * changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2498,23 +2532,25 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the location of metastore services to - * list, in the following form: + * Required. The relative resource name of the location of metastore services + * to list, in the following form: * * `projects/{project_number}/locations/{location_id}`. * @param {number} [request.pageSize] - * Optional. The maximum number of services to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 services are - * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * Optional. The maximum number of services to return. The response may + * contain less than the maximum number. If unspecified, no more than 500 + * services are returned. The maximum value is 1000; values above 1000 are + * changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2561,23 +2597,24 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the service whose metadata imports to - * list, in the following form: + * Required. The relative resource name of the service whose metadata imports + * to list, in the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. * @param {number} [request.pageSize] - * Optional. The maximum number of imports to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 imports are + * Optional. The maximum number of imports to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 imports are * returned. The maximum value is 1000; values above 1000 are changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2677,23 +2714,24 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the service whose metadata imports to - * list, in the following form: + * Required. The relative resource name of the service whose metadata imports + * to list, in the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. * @param {number} [request.pageSize] - * Optional. The maximum number of imports to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 imports are + * Optional. The maximum number of imports to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 imports are * returned. The maximum value is 1000; values above 1000 are changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2741,23 +2779,24 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the service whose metadata imports to - * list, in the following form: + * Required. The relative resource name of the service whose metadata imports + * to list, in the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. * @param {number} [request.pageSize] - * Optional. The maximum number of imports to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 imports are + * Optional. The maximum number of imports to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 imports are * returned. The maximum value is 1000; values above 1000 are changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2809,18 +2848,19 @@ export class DataprocMetastoreClient { * * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`. * @param {number} [request.pageSize] - * Optional. The maximum number of backups to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 backups are + * Optional. The maximum number of backups to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 backups are * returned. The maximum value is 1000; values above 1000 are changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2925,18 +2965,19 @@ export class DataprocMetastoreClient { * * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`. * @param {number} [request.pageSize] - * Optional. The maximum number of backups to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 backups are + * Optional. The maximum number of backups to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 backups are * returned. The maximum value is 1000; values above 1000 are changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2989,18 +3030,19 @@ export class DataprocMetastoreClient { * * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`. * @param {number} [request.pageSize] - * Optional. The maximum number of backups to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 backups are + * Optional. The maximum number of backups to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 backups are * returned. The maximum value is 1000; values above 1000 are changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -3041,6 +3083,403 @@ export class DataprocMetastoreClient { callSettings ) as AsyncIterable; } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [Policy]{@link google.iam.v1.Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. The promise has a method named + * "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -3112,6 +3551,58 @@ export class DataprocMetastoreClient { return this.pathTemplates.backupPathTemplate.match(backupName).backup; } + /** + * Return a fully-qualified federation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} federation + * @returns {string} Resource name string. + */ + federationPath(project: string, location: string, federation: string) { + return this.pathTemplates.federationPathTemplate.render({ + project: project, + location: location, + federation: federation, + }); + } + + /** + * Parse the project from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .project; + } + + /** + * Parse the location from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .location; + } + + /** + * Parse the federation from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the federation. + */ + matchFederationFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .federation; + } + /** * Return a fully-qualified lake resource name string. * @@ -3308,6 +3799,29 @@ export class DataprocMetastoreClient { return this.pathTemplates.networkPathTemplate.match(networkName).network; } + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + /** * Return a fully-qualified service resource name string. * @@ -3368,6 +3882,8 @@ export class DataprocMetastoreClient { return this.dataprocMetastoreStub.then(stub => { this._terminated = true; stub.close(); + this.iamClient.close(); + this.locationsClient.close(); this.operationsClient.close(); }); } diff --git a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_client.ts b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_client.ts new file mode 100644 index 00000000000..b9ad263df58 --- /dev/null +++ b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_client.ts @@ -0,0 +1,2051 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1alpha/dataproc_metastore_federation_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './dataproc_metastore_federation_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Configures and manages metastore federation services. + * Dataproc Metastore Federation Service allows federating a collection of + * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc + * Metastores. The Federation Service exposes a gRPC URL through which metadata + * from the backend metastores are served at query time. + * + * The Dataproc Metastore Federation API defines the following resource model: + * * The service works with a collection of Google Cloud projects. + * * Each project has a collection of available locations. + * * Each location has a collection of federations. + * * Dataproc Metastore Federations are resources with names of the + * form: + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @class + * @memberof v1alpha + */ +export class DataprocMetastoreFederationClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + dataprocMetastoreFederationStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataprocMetastoreFederationClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataprocMetastoreFederationClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof DataprocMetastoreFederationClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + backupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/services/{service}/backups/{backup}' + ), + federationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/federations/{federation}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + metadataImportPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + servicePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/services/{service}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listFederations: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'federations' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.cloud.location.Locations.GetLocation', + get: '/v1alpha/{name=projects/*/locations/*}', + }, + { + selector: 'google.cloud.location.Locations.ListLocations', + get: '/v1alpha/{name=projects/*}/locations', + }, + { + selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', + get: '/v1alpha/{resource=projects/*/locations/*/services/*}:getIamPolicy', + additional_bindings: [ + { + get: '/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy', + }, + { + get: '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:getIamPolicy', + }, + { + get: '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:getIamPolicy', + }, + { + get: '/v1alpha/{resource=projects/*/locations/*/federations/*}:getIamPolicy', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1alpha/{resource=projects/*/locations/*/services/*}:setIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1alpha/{resource=projects/*/locations/*/federations/*}:setIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1alpha/{resource=projects/*/locations/*/services/*}:testIamPermissions', + body: '*', + additional_bindings: [ + { + post: '/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1alpha/{resource=projects/*/locations/*/federations/*}:testIamPermissions', + body: '*', + }, + ], + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1alpha/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1alpha/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1alpha/{name=projects/*/locations/*}/operations', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createFederationResponse = protoFilesRoot.lookup( + '.google.cloud.metastore.v1alpha.Federation' + ) as gax.protobuf.Type; + const createFederationMetadata = protoFilesRoot.lookup( + '.google.cloud.metastore.v1alpha.OperationMetadata' + ) as gax.protobuf.Type; + const updateFederationResponse = protoFilesRoot.lookup( + '.google.cloud.metastore.v1alpha.Federation' + ) as gax.protobuf.Type; + const updateFederationMetadata = protoFilesRoot.lookup( + '.google.cloud.metastore.v1alpha.OperationMetadata' + ) as gax.protobuf.Type; + const deleteFederationResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteFederationMetadata = protoFilesRoot.lookup( + '.google.cloud.metastore.v1alpha.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createFederation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createFederationResponse.decode.bind(createFederationResponse), + createFederationMetadata.decode.bind(createFederationMetadata) + ), + updateFederation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateFederationResponse.decode.bind(updateFederationResponse), + updateFederationMetadata.decode.bind(updateFederationMetadata) + ), + deleteFederation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteFederationResponse.decode.bind(deleteFederationResponse), + deleteFederationMetadata.decode.bind(deleteFederationMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.metastore.v1alpha.DataprocMetastoreFederation', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataprocMetastoreFederationStub) { + return this.dataprocMetastoreFederationStub; + } + + // Put together the "service stub" for + // google.cloud.metastore.v1alpha.DataprocMetastoreFederation. + this.dataprocMetastoreFederationStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.metastore.v1alpha.DataprocMetastoreFederation' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.metastore.v1alpha + .DataprocMetastoreFederation, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const dataprocMetastoreFederationStubMethods = [ + 'listFederations', + 'getFederation', + 'createFederation', + 'updateFederation', + 'deleteFederation', + ]; + for (const methodName of dataprocMetastoreFederationStubMethods) { + const callPromise = this.dataprocMetastoreFederationStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataprocMetastoreFederationStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'metastore.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'metastore.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Gets the details of a single federation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The relative resource name of the metastore federation to retrieve, + * in the following form: + * + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Federation]{@link google.cloud.metastore.v1alpha.Federation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/dataproc_metastore_federation.get_federation.js + * region_tag:metastore_v1alpha_generated_DataprocMetastoreFederation_GetFederation_async + */ + getFederation( + request?: protos.google.cloud.metastore.v1alpha.IGetFederationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IGetFederationRequest | undefined, + {} | undefined + ] + >; + getFederation( + request: protos.google.cloud.metastore.v1alpha.IGetFederationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.metastore.v1alpha.IFederation, + | protos.google.cloud.metastore.v1alpha.IGetFederationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getFederation( + request: protos.google.cloud.metastore.v1alpha.IGetFederationRequest, + callback: Callback< + protos.google.cloud.metastore.v1alpha.IFederation, + | protos.google.cloud.metastore.v1alpha.IGetFederationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getFederation( + request?: protos.google.cloud.metastore.v1alpha.IGetFederationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.metastore.v1alpha.IFederation, + | protos.google.cloud.metastore.v1alpha.IGetFederationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.metastore.v1alpha.IFederation, + | protos.google.cloud.metastore.v1alpha.IGetFederationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IGetFederationRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getFederation(request, options, callback); + } + + /** + * Creates a metastore federation in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The relative resource name of the location in which to create a federation + * service, in the following form: + * + * `projects/{project_number}/locations/{location_id}`. + * @param {string} request.federationId + * Required. The ID of the metastore federation, which is used as the final + * component of the metastore federation's name. + * + * This value must be between 2 and 63 characters long inclusive, begin with a + * letter, end with a letter or number, and consist of alpha-numeric + * ASCII characters or hyphens. + * @param {google.cloud.metastore.v1alpha.Federation} request.federation + * Required. The Metastore Federation to create. The `name` field is + * ignored. The ID of the created metastore federation must be + * provided in the request's `federation_id` field. + * @param {string} [request.requestId] + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * + * The request ID must be a valid + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1alpha/dataproc_metastore_federation.create_federation.js + * region_tag:metastore_v1alpha_generated_DataprocMetastoreFederation_CreateFederation_async + */ + createFederation( + request?: protos.google.cloud.metastore.v1alpha.ICreateFederationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createFederation( + request: protos.google.cloud.metastore.v1alpha.ICreateFederationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createFederation( + request: protos.google.cloud.metastore.v1alpha.ICreateFederationRequest, + callback: Callback< + LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createFederation( + request?: protos.google.cloud.metastore.v1alpha.ICreateFederationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createFederation(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createFederation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1alpha/dataproc_metastore_federation.create_federation.js + * region_tag:metastore_v1alpha_generated_DataprocMetastoreFederation_CreateFederation_async + */ + async checkCreateFederationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.metastore.v1alpha.Federation, + protos.google.cloud.metastore.v1alpha.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createFederation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.metastore.v1alpha.Federation, + protos.google.cloud.metastore.v1alpha.OperationMetadata + >; + } + /** + * Updates the fields of a federation. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A field mask used to specify the fields to be overwritten in the + * metastore federation resource by the update. + * Fields specified in the `update_mask` are relative to the resource (not + * to the full request). A field is overwritten if it is in the mask. + * @param {google.cloud.metastore.v1alpha.Federation} request.federation + * Required. The metastore federation to update. The server only merges fields + * in the service if they are specified in `update_mask`. + * + * The metastore federation's `name` field is used to identify the + * metastore service to be updated. + * @param {string} [request.requestId] + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * + * The request ID must be a valid + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1alpha/dataproc_metastore_federation.update_federation.js + * region_tag:metastore_v1alpha_generated_DataprocMetastoreFederation_UpdateFederation_async + */ + updateFederation( + request?: protos.google.cloud.metastore.v1alpha.IUpdateFederationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateFederation( + request: protos.google.cloud.metastore.v1alpha.IUpdateFederationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateFederation( + request: protos.google.cloud.metastore.v1alpha.IUpdateFederationRequest, + callback: Callback< + LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateFederation( + request?: protos.google.cloud.metastore.v1alpha.IUpdateFederationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'federation.name': request.federation!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateFederation(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateFederation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1alpha/dataproc_metastore_federation.update_federation.js + * region_tag:metastore_v1alpha_generated_DataprocMetastoreFederation_UpdateFederation_async + */ + async checkUpdateFederationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.metastore.v1alpha.Federation, + protos.google.cloud.metastore.v1alpha.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateFederation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.metastore.v1alpha.Federation, + protos.google.cloud.metastore.v1alpha.OperationMetadata + >; + } + /** + * Deletes a single federation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The relative resource name of the metastore federation to delete, + * in the following form: + * + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @param {string} [request.requestId] + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * + * The request ID must be a valid + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1alpha/dataproc_metastore_federation.delete_federation.js + * region_tag:metastore_v1alpha_generated_DataprocMetastoreFederation_DeleteFederation_async + */ + deleteFederation( + request?: protos.google.cloud.metastore.v1alpha.IDeleteFederationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteFederation( + request: protos.google.cloud.metastore.v1alpha.IDeleteFederationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteFederation( + request: protos.google.cloud.metastore.v1alpha.IDeleteFederationRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteFederation( + request?: protos.google.cloud.metastore.v1alpha.IDeleteFederationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteFederation(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteFederation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1alpha/dataproc_metastore_federation.delete_federation.js + * region_tag:metastore_v1alpha_generated_DataprocMetastoreFederation_DeleteFederation_async + */ + async checkDeleteFederationProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.metastore.v1alpha.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteFederation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.metastore.v1alpha.OperationMetadata + >; + } + /** + * Lists federations in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The relative resource name of the location of metastore federations + * to list, in the following form: + * `projects/{project_number}/locations/{location_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of federations to return. The response may contain less + * than the maximum number. If unspecified, no more than 500 services are + * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous ListFederationServices + * call. Provide this token to retrieve the subsequent page. + * + * To retrieve the first page, supply an empty page token. + * + * When paginating, other parameters provided to + * ListFederationServices must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. The filter to apply to list results. + * @param {string} [request.orderBy] + * Optional. Specify the ordering of results as described in [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * If not specified, the results will be sorted in the default order. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Federation]{@link google.cloud.metastore.v1alpha.Federation}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listFederationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listFederations( + request?: protos.google.cloud.metastore.v1alpha.IListFederationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.metastore.v1alpha.IFederation[], + protos.google.cloud.metastore.v1alpha.IListFederationsRequest | null, + protos.google.cloud.metastore.v1alpha.IListFederationsResponse + ] + >; + listFederations( + request: protos.google.cloud.metastore.v1alpha.IListFederationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.metastore.v1alpha.IListFederationsRequest, + | protos.google.cloud.metastore.v1alpha.IListFederationsResponse + | null + | undefined, + protos.google.cloud.metastore.v1alpha.IFederation + > + ): void; + listFederations( + request: protos.google.cloud.metastore.v1alpha.IListFederationsRequest, + callback: PaginationCallback< + protos.google.cloud.metastore.v1alpha.IListFederationsRequest, + | protos.google.cloud.metastore.v1alpha.IListFederationsResponse + | null + | undefined, + protos.google.cloud.metastore.v1alpha.IFederation + > + ): void; + listFederations( + request?: protos.google.cloud.metastore.v1alpha.IListFederationsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.metastore.v1alpha.IListFederationsRequest, + | protos.google.cloud.metastore.v1alpha.IListFederationsResponse + | null + | undefined, + protos.google.cloud.metastore.v1alpha.IFederation + >, + callback?: PaginationCallback< + protos.google.cloud.metastore.v1alpha.IListFederationsRequest, + | protos.google.cloud.metastore.v1alpha.IListFederationsResponse + | null + | undefined, + protos.google.cloud.metastore.v1alpha.IFederation + > + ): Promise< + [ + protos.google.cloud.metastore.v1alpha.IFederation[], + protos.google.cloud.metastore.v1alpha.IListFederationsRequest | null, + protos.google.cloud.metastore.v1alpha.IListFederationsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listFederations(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The relative resource name of the location of metastore federations + * to list, in the following form: + * `projects/{project_number}/locations/{location_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of federations to return. The response may contain less + * than the maximum number. If unspecified, no more than 500 services are + * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous ListFederationServices + * call. Provide this token to retrieve the subsequent page. + * + * To retrieve the first page, supply an empty page token. + * + * When paginating, other parameters provided to + * ListFederationServices must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. The filter to apply to list results. + * @param {string} [request.orderBy] + * Optional. Specify the ordering of results as described in [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * If not specified, the results will be sorted in the default order. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Federation]{@link google.cloud.metastore.v1alpha.Federation} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listFederationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listFederationsStream( + request?: protos.google.cloud.metastore.v1alpha.IListFederationsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFederations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listFederations.createStream( + this.innerApiCalls.listFederations as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listFederations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The relative resource name of the location of metastore federations + * to list, in the following form: + * `projects/{project_number}/locations/{location_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of federations to return. The response may contain less + * than the maximum number. If unspecified, no more than 500 services are + * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous ListFederationServices + * call. Provide this token to retrieve the subsequent page. + * + * To retrieve the first page, supply an empty page token. + * + * When paginating, other parameters provided to + * ListFederationServices must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. The filter to apply to list results. + * @param {string} [request.orderBy] + * Optional. Specify the ordering of results as described in [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * If not specified, the results will be sorted in the default order. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Federation]{@link google.cloud.metastore.v1alpha.Federation}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/dataproc_metastore_federation.list_federations.js + * region_tag:metastore_v1alpha_generated_DataprocMetastoreFederation_ListFederations_async + */ + listFederationsAsync( + request?: protos.google.cloud.metastore.v1alpha.IListFederationsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFederations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listFederations.asyncIterate( + this.innerApiCalls['listFederations'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [Policy]{@link google.iam.v1.Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. The promise has a method named + * "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified backup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} service + * @param {string} backup + * @returns {string} Resource name string. + */ + backupPath( + project: string, + location: string, + service: string, + backup: string + ) { + return this.pathTemplates.backupPathTemplate.render({ + project: project, + location: location, + service: service, + backup: backup, + }); + } + + /** + * Parse the project from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).project; + } + + /** + * Parse the location from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).location; + } + + /** + * Parse the service from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the service. + */ + matchServiceFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).service; + } + + /** + * Parse the backup from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backup. + */ + matchBackupFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backup; + } + + /** + * Return a fully-qualified federation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} federation + * @returns {string} Resource name string. + */ + federationPath(project: string, location: string, federation: string) { + return this.pathTemplates.federationPathTemplate.render({ + project: project, + location: location, + federation: federation, + }); + } + + /** + * Parse the project from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .project; + } + + /** + * Parse the location from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .location; + } + + /** + * Parse the federation from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the federation. + */ + matchFederationFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .federation; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified metadataImport resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} service + * @param {string} metadata_import + * @returns {string} Resource name string. + */ + metadataImportPath( + project: string, + location: string, + service: string, + metadataImport: string + ) { + return this.pathTemplates.metadataImportPathTemplate.render({ + project: project, + location: location, + service: service, + metadata_import: metadataImport, + }); + } + + /** + * Parse the project from MetadataImport resource. + * + * @param {string} metadataImportName + * A fully-qualified path representing MetadataImport resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataImportName(metadataImportName: string) { + return this.pathTemplates.metadataImportPathTemplate.match( + metadataImportName + ).project; + } + + /** + * Parse the location from MetadataImport resource. + * + * @param {string} metadataImportName + * A fully-qualified path representing MetadataImport resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataImportName(metadataImportName: string) { + return this.pathTemplates.metadataImportPathTemplate.match( + metadataImportName + ).location; + } + + /** + * Parse the service from MetadataImport resource. + * + * @param {string} metadataImportName + * A fully-qualified path representing MetadataImport resource. + * @returns {string} A string representing the service. + */ + matchServiceFromMetadataImportName(metadataImportName: string) { + return this.pathTemplates.metadataImportPathTemplate.match( + metadataImportName + ).service; + } + + /** + * Parse the metadata_import from MetadataImport resource. + * + * @param {string} metadataImportName + * A fully-qualified path representing MetadataImport resource. + * @returns {string} A string representing the metadata_import. + */ + matchMetadataImportFromMetadataImportName(metadataImportName: string) { + return this.pathTemplates.metadataImportPathTemplate.match( + metadataImportName + ).metadata_import; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified service resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} service + * @returns {string} Resource name string. + */ + servicePath(project: string, location: string, service: string) { + return this.pathTemplates.servicePathTemplate.render({ + project: project, + location: location, + service: service, + }); + } + + /** + * Parse the project from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the project. + */ + matchProjectFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).project; + } + + /** + * Parse the location from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the location. + */ + matchLocationFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).location; + } + + /** + * Parse the service from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).service; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.dataprocMetastoreFederationStub && !this._terminated) { + return this.dataprocMetastoreFederationStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_client_config.json b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_client_config.json new file mode 100644 index 00000000000..f764c70b10a --- /dev/null +++ b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_client_config.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "google.cloud.metastore.v1alpha.DataprocMetastoreFederation": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListFederations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetFederation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateFederation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateFederation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteFederation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_proto_list.json b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_proto_list.json new file mode 100644 index 00000000000..5aa3fc8ef92 --- /dev/null +++ b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/cloud/metastore/v1alpha/metastore.proto", + "../../protos/google/cloud/metastore/v1alpha/metastore_federation.proto" +] diff --git a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_proto_list.json b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_proto_list.json index 424c950c4a7..5aa3fc8ef92 100644 --- a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_proto_list.json +++ b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_proto_list.json @@ -1,3 +1,4 @@ [ - "../../protos/google/cloud/metastore/v1alpha/metastore.proto" + "../../protos/google/cloud/metastore/v1alpha/metastore.proto", + "../../protos/google/cloud/metastore/v1alpha/metastore_federation.proto" ] diff --git a/packages/google-cloud-metastore/src/v1alpha/gapic_metadata.json b/packages/google-cloud-metastore/src/v1alpha/gapic_metadata.json index 5045ac0efee..ecfbf2278fa 100644 --- a/packages/google-cloud-metastore/src/v1alpha/gapic_metadata.json +++ b/packages/google-cloud-metastore/src/v1alpha/gapic_metadata.json @@ -180,6 +180,74 @@ } } } + }, + "DataprocMetastoreFederation": { + "clients": { + "grpc": { + "libraryClient": "DataprocMetastoreFederationClient", + "rpcs": { + "GetFederation": { + "methods": [ + "getFederation" + ] + }, + "CreateFederation": { + "methods": [ + "createFederation" + ] + }, + "UpdateFederation": { + "methods": [ + "updateFederation" + ] + }, + "DeleteFederation": { + "methods": [ + "deleteFederation" + ] + }, + "ListFederations": { + "methods": [ + "listFederations", + "listFederationsStream", + "listFederationsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataprocMetastoreFederationClient", + "rpcs": { + "GetFederation": { + "methods": [ + "getFederation" + ] + }, + "CreateFederation": { + "methods": [ + "createFederation" + ] + }, + "UpdateFederation": { + "methods": [ + "updateFederation" + ] + }, + "DeleteFederation": { + "methods": [ + "deleteFederation" + ] + }, + "ListFederations": { + "methods": [ + "listFederations", + "listFederationsStream", + "listFederationsAsync" + ] + } + } + } + } } } } diff --git a/packages/google-cloud-metastore/src/v1alpha/index.ts b/packages/google-cloud-metastore/src/v1alpha/index.ts index ccdbefddf7a..3e1ee876b29 100644 --- a/packages/google-cloud-metastore/src/v1alpha/index.ts +++ b/packages/google-cloud-metastore/src/v1alpha/index.ts @@ -17,3 +17,4 @@ // ** All changes to this file may be overwritten. ** export {DataprocMetastoreClient} from './dataproc_metastore_client'; +export {DataprocMetastoreFederationClient} from './dataproc_metastore_federation_client'; diff --git a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_client.ts b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_client.ts index 8ce9c8a40a9..40f843e0b20 100644 --- a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_client.ts +++ b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_client.ts @@ -27,6 +27,10 @@ import type { LROperation, PaginationCallback, GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, } from 'google-gax'; import {Transform} from 'stream'; import * as protos from '../../protos/protos'; @@ -41,8 +45,8 @@ const version = require('../../../package.json').version; /** * Configures and manages metastore services. - * Metastore services are fully managed, highly available, auto-scaled, - * auto-healing, OSS-native deployments of technical metadata management + * Metastore services are fully managed, highly available, autoscaled, + * autohealing, OSS-native deployments of technical metadata management * software. Each metastore service exposes a network endpoint through which * metadata queries are served. Metadata queries can originate from a variety * of sources, including Apache Hive, Apache Presto, and Apache Spark. @@ -77,6 +81,8 @@ export class DataprocMetastoreClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; dataprocMetastoreStub?: Promise<{[name: string]: Function}>; @@ -171,6 +177,12 @@ export class DataprocMetastoreClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -197,6 +209,12 @@ export class DataprocMetastoreClient { backupPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/services/{service}/backups/{backup}' ), + federationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/federations/{federation}' + ), + lakePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}' + ), locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), @@ -206,6 +224,9 @@ export class DataprocMetastoreClient { networkPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/global/networks/{network}' ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), servicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/services/{service}' ), @@ -254,16 +275,66 @@ export class DataprocMetastoreClient { { selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', get: '/v1beta/{resource=projects/*/locations/*/services/*}:getIamPolicy', + additional_bindings: [ + { + get: '/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy', + }, + { + get: '/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:getIamPolicy', + }, + { + get: '/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:getIamPolicy', + }, + { + get: '/v1beta/{resource=projects/*/locations/*/federations/*}:getIamPolicy', + }, + ], }, { selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', post: '/v1beta/{resource=projects/*/locations/*/services/*}:setIamPolicy', body: '*', + additional_bindings: [ + { + post: '/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta/{resource=projects/*/locations/*/federations/*}:setIamPolicy', + body: '*', + }, + ], }, { selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', post: '/v1beta/{resource=projects/*/locations/*/services/*}:testIamPermissions', body: '*', + additional_bindings: [ + { + post: '/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1beta/{resource=projects/*/locations/*/federations/*}:testIamPermissions', + body: '*', + }, + ], }, { selector: 'google.longrunning.Operations.DeleteOperation', @@ -1307,7 +1378,7 @@ export class DataprocMetastoreClient { * Required. The relative resource name of the service in which to create a * metastore import, in the following form: * - * `projects/{project_number}/locations/{location_id}/services/{service_id}` + * `projects/{project_number}/locations/{location_id}/services/{service_id}`. * @param {string} request.metadataImportId * Required. The ID of the metadata import, which is used as the final * component of the metadata import's name. @@ -1637,7 +1708,7 @@ export class DataprocMetastoreClient { * Required. The relative resource name of the metastore service to run * export, in the following form: * - * `projects/{project_id}/locations/{location_id}/services/{service_id}` + * `projects/{project_id}/locations/{location_id}/services/{service_id}`. * @param {string} [request.requestId] * Optional. A request ID. Specify a unique request ID to allow the server to * ignore the request if it has completed. The server will ignore subsequent @@ -1794,12 +1865,12 @@ export class DataprocMetastoreClient { * Required. The relative resource name of the metastore service to run * restore, in the following form: * - * `projects/{project_id}/locations/{location_id}/services/{service_id}` + * `projects/{project_id}/locations/{location_id}/services/{service_id}`. * @param {string} request.backup * Required. The relative resource name of the metastore service backup to * restore from, in the following form: * - * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}` + * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. * @param {google.cloud.metastore.v1beta.Restore.RestoreType} [request.restoreType] * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`. * @param {string} [request.requestId] @@ -1947,7 +2018,7 @@ export class DataprocMetastoreClient { >; } /** - * Creates a new Backup in a given project and location. + * Creates a new backup in a given project and location. * * @param {Object} request * The request object that will be sent. @@ -1955,7 +2026,7 @@ export class DataprocMetastoreClient { * Required. The relative resource name of the service in which to create a * backup of the following form: * - * `projects/{project_number}/locations/{location_id}/services/{service_id}` + * `projects/{project_number}/locations/{location_id}/services/{service_id}`. * @param {string} request.backupId * Required. The ID of the backup, which is used as the final component of the * backup's name. @@ -3005,6 +3076,403 @@ export class DataprocMetastoreClient { callSettings ) as AsyncIterable; } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [Policy]{@link google.iam.v1.Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. The promise has a method named + * "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -3076,6 +3544,107 @@ export class DataprocMetastoreClient { return this.pathTemplates.backupPathTemplate.match(backupName).backup; } + /** + * Return a fully-qualified federation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} federation + * @returns {string} Resource name string. + */ + federationPath(project: string, location: string, federation: string) { + return this.pathTemplates.federationPathTemplate.render({ + project: project, + location: location, + federation: federation, + }); + } + + /** + * Parse the project from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .project; + } + + /** + * Parse the location from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .location; + } + + /** + * Parse the federation from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the federation. + */ + matchFederationFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .federation; + } + + /** + * Return a fully-qualified lake resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @returns {string} Resource name string. + */ + lakePath(project: string, location: string, lake: string) { + return this.pathTemplates.lakePathTemplate.render({ + project: project, + location: location, + lake: lake, + }); + } + + /** + * Parse the project from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).project; + } + + /** + * Parse the location from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).location; + } + + /** + * Parse the lake from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).lake; + } + /** * Return a fully-qualified location resource name string. * @@ -3223,6 +3792,29 @@ export class DataprocMetastoreClient { return this.pathTemplates.networkPathTemplate.match(networkName).network; } + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + /** * Return a fully-qualified service resource name string. * @@ -3283,6 +3875,8 @@ export class DataprocMetastoreClient { return this.dataprocMetastoreStub.then(stub => { this._terminated = true; stub.close(); + this.iamClient.close(); + this.locationsClient.close(); this.operationsClient.close(); }); } diff --git a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_client.ts b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_client.ts new file mode 100644 index 00000000000..60b71d6ac62 --- /dev/null +++ b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_client.ts @@ -0,0 +1,2051 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta/dataproc_metastore_federation_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './dataproc_metastore_federation_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Configures and manages metastore federation services. + * Dataproc Metastore Federation Service allows federating a collection of + * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc + * Metastores. The Federation Service exposes a gRPC URL through which metadata + * from the backend metastores are served at query time. + * + * The Dataproc Metastore Federation API defines the following resource model: + * * The service works with a collection of Google Cloud projects. + * * Each project has a collection of available locations. + * * Each location has a collection of federations. + * * Dataproc Metastore Federations are resources with names of the + * form: + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @class + * @memberof v1beta + */ +export class DataprocMetastoreFederationClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + dataprocMetastoreFederationStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataprocMetastoreFederationClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataprocMetastoreFederationClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof DataprocMetastoreFederationClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + backupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/services/{service}/backups/{backup}' + ), + federationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/federations/{federation}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + metadataImportPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + servicePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/services/{service}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listFederations: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'federations' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.cloud.location.Locations.GetLocation', + get: '/v1beta/{name=projects/*/locations/*}', + }, + { + selector: 'google.cloud.location.Locations.ListLocations', + get: '/v1beta/{name=projects/*}/locations', + }, + { + selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', + get: '/v1beta/{resource=projects/*/locations/*/services/*}:getIamPolicy', + additional_bindings: [ + { + get: '/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy', + }, + { + get: '/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:getIamPolicy', + }, + { + get: '/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:getIamPolicy', + }, + { + get: '/v1beta/{resource=projects/*/locations/*/federations/*}:getIamPolicy', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1beta/{resource=projects/*/locations/*/services/*}:setIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta/{resource=projects/*/locations/*/federations/*}:setIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1beta/{resource=projects/*/locations/*/services/*}:testIamPermissions', + body: '*', + additional_bindings: [ + { + post: '/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1beta/{resource=projects/*/locations/*/federations/*}:testIamPermissions', + body: '*', + }, + ], + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1beta/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1beta/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1beta/{name=projects/*/locations/*}/operations', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createFederationResponse = protoFilesRoot.lookup( + '.google.cloud.metastore.v1beta.Federation' + ) as gax.protobuf.Type; + const createFederationMetadata = protoFilesRoot.lookup( + '.google.cloud.metastore.v1beta.OperationMetadata' + ) as gax.protobuf.Type; + const updateFederationResponse = protoFilesRoot.lookup( + '.google.cloud.metastore.v1beta.Federation' + ) as gax.protobuf.Type; + const updateFederationMetadata = protoFilesRoot.lookup( + '.google.cloud.metastore.v1beta.OperationMetadata' + ) as gax.protobuf.Type; + const deleteFederationResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteFederationMetadata = protoFilesRoot.lookup( + '.google.cloud.metastore.v1beta.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createFederation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createFederationResponse.decode.bind(createFederationResponse), + createFederationMetadata.decode.bind(createFederationMetadata) + ), + updateFederation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateFederationResponse.decode.bind(updateFederationResponse), + updateFederationMetadata.decode.bind(updateFederationMetadata) + ), + deleteFederation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteFederationResponse.decode.bind(deleteFederationResponse), + deleteFederationMetadata.decode.bind(deleteFederationMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.metastore.v1beta.DataprocMetastoreFederation', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataprocMetastoreFederationStub) { + return this.dataprocMetastoreFederationStub; + } + + // Put together the "service stub" for + // google.cloud.metastore.v1beta.DataprocMetastoreFederation. + this.dataprocMetastoreFederationStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.metastore.v1beta.DataprocMetastoreFederation' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.metastore.v1beta + .DataprocMetastoreFederation, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const dataprocMetastoreFederationStubMethods = [ + 'listFederations', + 'getFederation', + 'createFederation', + 'updateFederation', + 'deleteFederation', + ]; + for (const methodName of dataprocMetastoreFederationStubMethods) { + const callPromise = this.dataprocMetastoreFederationStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataprocMetastoreFederationStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'metastore.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'metastore.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Gets the details of a single federation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The relative resource name of the metastore federation to retrieve, + * in the following form: + * + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Federation]{@link google.cloud.metastore.v1beta.Federation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/dataproc_metastore_federation.get_federation.js + * region_tag:metastore_v1beta_generated_DataprocMetastoreFederation_GetFederation_async + */ + getFederation( + request?: protos.google.cloud.metastore.v1beta.IGetFederationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IGetFederationRequest | undefined, + {} | undefined + ] + >; + getFederation( + request: protos.google.cloud.metastore.v1beta.IGetFederationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.metastore.v1beta.IFederation, + | protos.google.cloud.metastore.v1beta.IGetFederationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getFederation( + request: protos.google.cloud.metastore.v1beta.IGetFederationRequest, + callback: Callback< + protos.google.cloud.metastore.v1beta.IFederation, + | protos.google.cloud.metastore.v1beta.IGetFederationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getFederation( + request?: protos.google.cloud.metastore.v1beta.IGetFederationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.metastore.v1beta.IFederation, + | protos.google.cloud.metastore.v1beta.IGetFederationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.metastore.v1beta.IFederation, + | protos.google.cloud.metastore.v1beta.IGetFederationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IGetFederationRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getFederation(request, options, callback); + } + + /** + * Creates a metastore federation in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The relative resource name of the location in which to create a federation + * service, in the following form: + * + * `projects/{project_number}/locations/{location_id}`. + * @param {string} request.federationId + * Required. The ID of the metastore federation, which is used as the final + * component of the metastore federation's name. + * + * This value must be between 2 and 63 characters long inclusive, begin with a + * letter, end with a letter or number, and consist of alpha-numeric + * ASCII characters or hyphens. + * @param {google.cloud.metastore.v1beta.Federation} request.federation + * Required. The Metastore Federation to create. The `name` field is + * ignored. The ID of the created metastore federation must be + * provided in the request's `federation_id` field. + * @param {string} [request.requestId] + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * + * The request ID must be a valid + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta/dataproc_metastore_federation.create_federation.js + * region_tag:metastore_v1beta_generated_DataprocMetastoreFederation_CreateFederation_async + */ + createFederation( + request?: protos.google.cloud.metastore.v1beta.ICreateFederationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createFederation( + request: protos.google.cloud.metastore.v1beta.ICreateFederationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createFederation( + request: protos.google.cloud.metastore.v1beta.ICreateFederationRequest, + callback: Callback< + LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createFederation( + request?: protos.google.cloud.metastore.v1beta.ICreateFederationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createFederation(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createFederation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta/dataproc_metastore_federation.create_federation.js + * region_tag:metastore_v1beta_generated_DataprocMetastoreFederation_CreateFederation_async + */ + async checkCreateFederationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.metastore.v1beta.Federation, + protos.google.cloud.metastore.v1beta.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createFederation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.metastore.v1beta.Federation, + protos.google.cloud.metastore.v1beta.OperationMetadata + >; + } + /** + * Updates the fields of a federation. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A field mask used to specify the fields to be overwritten in the + * metastore federation resource by the update. + * Fields specified in the `update_mask` are relative to the resource (not + * to the full request). A field is overwritten if it is in the mask. + * @param {google.cloud.metastore.v1beta.Federation} request.federation + * Required. The metastore federation to update. The server only merges fields + * in the service if they are specified in `update_mask`. + * + * The metastore federation's `name` field is used to identify the + * metastore service to be updated. + * @param {string} [request.requestId] + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * + * The request ID must be a valid + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta/dataproc_metastore_federation.update_federation.js + * region_tag:metastore_v1beta_generated_DataprocMetastoreFederation_UpdateFederation_async + */ + updateFederation( + request?: protos.google.cloud.metastore.v1beta.IUpdateFederationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateFederation( + request: protos.google.cloud.metastore.v1beta.IUpdateFederationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateFederation( + request: protos.google.cloud.metastore.v1beta.IUpdateFederationRequest, + callback: Callback< + LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateFederation( + request?: protos.google.cloud.metastore.v1beta.IUpdateFederationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'federation.name': request.federation!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateFederation(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateFederation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta/dataproc_metastore_federation.update_federation.js + * region_tag:metastore_v1beta_generated_DataprocMetastoreFederation_UpdateFederation_async + */ + async checkUpdateFederationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.metastore.v1beta.Federation, + protos.google.cloud.metastore.v1beta.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateFederation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.metastore.v1beta.Federation, + protos.google.cloud.metastore.v1beta.OperationMetadata + >; + } + /** + * Deletes a single federation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The relative resource name of the metastore federation to delete, + * in the following form: + * + * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @param {string} [request.requestId] + * Optional. A request ID. Specify a unique request ID to allow the server to ignore the + * request if it has completed. The server will ignore subsequent requests + * that provide a duplicate request ID for at least 60 minutes after the first + * request. + * + * For example, if an initial request times out, followed by another request + * with the same request ID, the server ignores the second request to prevent + * the creation of duplicate commitments. + * + * The request ID must be a valid + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta/dataproc_metastore_federation.delete_federation.js + * region_tag:metastore_v1beta_generated_DataprocMetastoreFederation_DeleteFederation_async + */ + deleteFederation( + request?: protos.google.cloud.metastore.v1beta.IDeleteFederationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteFederation( + request: protos.google.cloud.metastore.v1beta.IDeleteFederationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteFederation( + request: protos.google.cloud.metastore.v1beta.IDeleteFederationRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteFederation( + request?: protos.google.cloud.metastore.v1beta.IDeleteFederationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteFederation(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteFederation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta/dataproc_metastore_federation.delete_federation.js + * region_tag:metastore_v1beta_generated_DataprocMetastoreFederation_DeleteFederation_async + */ + async checkDeleteFederationProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.metastore.v1beta.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteFederation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.metastore.v1beta.OperationMetadata + >; + } + /** + * Lists federations in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The relative resource name of the location of metastore federations + * to list, in the following form: + * `projects/{project_number}/locations/{location_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of federations to return. The response may contain less + * than the maximum number. If unspecified, no more than 500 services are + * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous ListFederationServices + * call. Provide this token to retrieve the subsequent page. + * + * To retrieve the first page, supply an empty page token. + * + * When paginating, other parameters provided to + * ListFederationServices must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. The filter to apply to list results. + * @param {string} [request.orderBy] + * Optional. Specify the ordering of results as described in [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * If not specified, the results will be sorted in the default order. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Federation]{@link google.cloud.metastore.v1beta.Federation}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listFederationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listFederations( + request?: protos.google.cloud.metastore.v1beta.IListFederationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.metastore.v1beta.IFederation[], + protos.google.cloud.metastore.v1beta.IListFederationsRequest | null, + protos.google.cloud.metastore.v1beta.IListFederationsResponse + ] + >; + listFederations( + request: protos.google.cloud.metastore.v1beta.IListFederationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.metastore.v1beta.IListFederationsRequest, + | protos.google.cloud.metastore.v1beta.IListFederationsResponse + | null + | undefined, + protos.google.cloud.metastore.v1beta.IFederation + > + ): void; + listFederations( + request: protos.google.cloud.metastore.v1beta.IListFederationsRequest, + callback: PaginationCallback< + protos.google.cloud.metastore.v1beta.IListFederationsRequest, + | protos.google.cloud.metastore.v1beta.IListFederationsResponse + | null + | undefined, + protos.google.cloud.metastore.v1beta.IFederation + > + ): void; + listFederations( + request?: protos.google.cloud.metastore.v1beta.IListFederationsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.metastore.v1beta.IListFederationsRequest, + | protos.google.cloud.metastore.v1beta.IListFederationsResponse + | null + | undefined, + protos.google.cloud.metastore.v1beta.IFederation + >, + callback?: PaginationCallback< + protos.google.cloud.metastore.v1beta.IListFederationsRequest, + | protos.google.cloud.metastore.v1beta.IListFederationsResponse + | null + | undefined, + protos.google.cloud.metastore.v1beta.IFederation + > + ): Promise< + [ + protos.google.cloud.metastore.v1beta.IFederation[], + protos.google.cloud.metastore.v1beta.IListFederationsRequest | null, + protos.google.cloud.metastore.v1beta.IListFederationsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listFederations(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The relative resource name of the location of metastore federations + * to list, in the following form: + * `projects/{project_number}/locations/{location_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of federations to return. The response may contain less + * than the maximum number. If unspecified, no more than 500 services are + * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous ListFederationServices + * call. Provide this token to retrieve the subsequent page. + * + * To retrieve the first page, supply an empty page token. + * + * When paginating, other parameters provided to + * ListFederationServices must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. The filter to apply to list results. + * @param {string} [request.orderBy] + * Optional. Specify the ordering of results as described in [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * If not specified, the results will be sorted in the default order. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Federation]{@link google.cloud.metastore.v1beta.Federation} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listFederationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listFederationsStream( + request?: protos.google.cloud.metastore.v1beta.IListFederationsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFederations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listFederations.createStream( + this.innerApiCalls.listFederations as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listFederations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The relative resource name of the location of metastore federations + * to list, in the following form: + * `projects/{project_number}/locations/{location_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of federations to return. The response may contain less + * than the maximum number. If unspecified, no more than 500 services are + * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous ListFederationServices + * call. Provide this token to retrieve the subsequent page. + * + * To retrieve the first page, supply an empty page token. + * + * When paginating, other parameters provided to + * ListFederationServices must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. The filter to apply to list results. + * @param {string} [request.orderBy] + * Optional. Specify the ordering of results as described in [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * If not specified, the results will be sorted in the default order. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Federation]{@link google.cloud.metastore.v1beta.Federation}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta/dataproc_metastore_federation.list_federations.js + * region_tag:metastore_v1beta_generated_DataprocMetastoreFederation_ListFederations_async + */ + listFederationsAsync( + request?: protos.google.cloud.metastore.v1beta.IListFederationsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFederations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listFederations.asyncIterate( + this.innerApiCalls['listFederations'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [Policy]{@link google.iam.v1.Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. The promise has a method named + * "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified backup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} service + * @param {string} backup + * @returns {string} Resource name string. + */ + backupPath( + project: string, + location: string, + service: string, + backup: string + ) { + return this.pathTemplates.backupPathTemplate.render({ + project: project, + location: location, + service: service, + backup: backup, + }); + } + + /** + * Parse the project from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).project; + } + + /** + * Parse the location from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).location; + } + + /** + * Parse the service from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the service. + */ + matchServiceFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).service; + } + + /** + * Parse the backup from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backup. + */ + matchBackupFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backup; + } + + /** + * Return a fully-qualified federation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} federation + * @returns {string} Resource name string. + */ + federationPath(project: string, location: string, federation: string) { + return this.pathTemplates.federationPathTemplate.render({ + project: project, + location: location, + federation: federation, + }); + } + + /** + * Parse the project from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .project; + } + + /** + * Parse the location from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .location; + } + + /** + * Parse the federation from Federation resource. + * + * @param {string} federationName + * A fully-qualified path representing Federation resource. + * @returns {string} A string representing the federation. + */ + matchFederationFromFederationName(federationName: string) { + return this.pathTemplates.federationPathTemplate.match(federationName) + .federation; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified metadataImport resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} service + * @param {string} metadata_import + * @returns {string} Resource name string. + */ + metadataImportPath( + project: string, + location: string, + service: string, + metadataImport: string + ) { + return this.pathTemplates.metadataImportPathTemplate.render({ + project: project, + location: location, + service: service, + metadata_import: metadataImport, + }); + } + + /** + * Parse the project from MetadataImport resource. + * + * @param {string} metadataImportName + * A fully-qualified path representing MetadataImport resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataImportName(metadataImportName: string) { + return this.pathTemplates.metadataImportPathTemplate.match( + metadataImportName + ).project; + } + + /** + * Parse the location from MetadataImport resource. + * + * @param {string} metadataImportName + * A fully-qualified path representing MetadataImport resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataImportName(metadataImportName: string) { + return this.pathTemplates.metadataImportPathTemplate.match( + metadataImportName + ).location; + } + + /** + * Parse the service from MetadataImport resource. + * + * @param {string} metadataImportName + * A fully-qualified path representing MetadataImport resource. + * @returns {string} A string representing the service. + */ + matchServiceFromMetadataImportName(metadataImportName: string) { + return this.pathTemplates.metadataImportPathTemplate.match( + metadataImportName + ).service; + } + + /** + * Parse the metadata_import from MetadataImport resource. + * + * @param {string} metadataImportName + * A fully-qualified path representing MetadataImport resource. + * @returns {string} A string representing the metadata_import. + */ + matchMetadataImportFromMetadataImportName(metadataImportName: string) { + return this.pathTemplates.metadataImportPathTemplate.match( + metadataImportName + ).metadata_import; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified service resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} service + * @returns {string} Resource name string. + */ + servicePath(project: string, location: string, service: string) { + return this.pathTemplates.servicePathTemplate.render({ + project: project, + location: location, + service: service, + }); + } + + /** + * Parse the project from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the project. + */ + matchProjectFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).project; + } + + /** + * Parse the location from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the location. + */ + matchLocationFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).location; + } + + /** + * Parse the service from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).service; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.dataprocMetastoreFederationStub && !this._terminated) { + return this.dataprocMetastoreFederationStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_client_config.json b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_client_config.json new file mode 100644 index 00000000000..e6e1944d917 --- /dev/null +++ b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_client_config.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "google.cloud.metastore.v1beta.DataprocMetastoreFederation": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListFederations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetFederation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateFederation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateFederation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteFederation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_proto_list.json b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_proto_list.json new file mode 100644 index 00000000000..aaeb52eb5c3 --- /dev/null +++ b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/cloud/metastore/v1beta/metastore.proto", + "../../protos/google/cloud/metastore/v1beta/metastore_federation.proto" +] diff --git a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_proto_list.json b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_proto_list.json index c613662f4ca..aaeb52eb5c3 100644 --- a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_proto_list.json +++ b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_proto_list.json @@ -1,3 +1,4 @@ [ - "../../protos/google/cloud/metastore/v1beta/metastore.proto" + "../../protos/google/cloud/metastore/v1beta/metastore.proto", + "../../protos/google/cloud/metastore/v1beta/metastore_federation.proto" ] diff --git a/packages/google-cloud-metastore/src/v1beta/gapic_metadata.json b/packages/google-cloud-metastore/src/v1beta/gapic_metadata.json index 3e88a6b58b5..fdbbd5e20ca 100644 --- a/packages/google-cloud-metastore/src/v1beta/gapic_metadata.json +++ b/packages/google-cloud-metastore/src/v1beta/gapic_metadata.json @@ -180,6 +180,74 @@ } } } + }, + "DataprocMetastoreFederation": { + "clients": { + "grpc": { + "libraryClient": "DataprocMetastoreFederationClient", + "rpcs": { + "GetFederation": { + "methods": [ + "getFederation" + ] + }, + "CreateFederation": { + "methods": [ + "createFederation" + ] + }, + "UpdateFederation": { + "methods": [ + "updateFederation" + ] + }, + "DeleteFederation": { + "methods": [ + "deleteFederation" + ] + }, + "ListFederations": { + "methods": [ + "listFederations", + "listFederationsStream", + "listFederationsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataprocMetastoreFederationClient", + "rpcs": { + "GetFederation": { + "methods": [ + "getFederation" + ] + }, + "CreateFederation": { + "methods": [ + "createFederation" + ] + }, + "UpdateFederation": { + "methods": [ + "updateFederation" + ] + }, + "DeleteFederation": { + "methods": [ + "deleteFederation" + ] + }, + "ListFederations": { + "methods": [ + "listFederations", + "listFederationsStream", + "listFederationsAsync" + ] + } + } + } + } } } } diff --git a/packages/google-cloud-metastore/src/v1beta/index.ts b/packages/google-cloud-metastore/src/v1beta/index.ts index ccdbefddf7a..3e1ee876b29 100644 --- a/packages/google-cloud-metastore/src/v1beta/index.ts +++ b/packages/google-cloud-metastore/src/v1beta/index.ts @@ -17,3 +17,4 @@ // ** All changes to this file may be overwritten. ** export {DataprocMetastoreClient} from './dataproc_metastore_client'; +export {DataprocMetastoreFederationClient} from './dataproc_metastore_federation_client'; diff --git a/packages/google-cloud-metastore/system-test/fixtures/sample/src/index.js b/packages/google-cloud-metastore/system-test/fixtures/sample/src/index.js index bf2664a3d22..3d1fd218458 100644 --- a/packages/google-cloud-metastore/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-metastore/system-test/fixtures/sample/src/index.js @@ -21,6 +21,8 @@ const metastore = require('@google-cloud/dataproc-metastore'); function main() { const dataprocMetastoreClient = new metastore.DataprocMetastoreClient(); + const dataprocMetastoreFederationClient = + new metastore.DataprocMetastoreFederationClient(); } main(); diff --git a/packages/google-cloud-metastore/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-metastore/system-test/fixtures/sample/src/index.ts index f206eb4c273..189277df0ce 100644 --- a/packages/google-cloud-metastore/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-metastore/system-test/fixtures/sample/src/index.ts @@ -16,17 +16,31 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {DataprocMetastoreClient} from '@google-cloud/dataproc-metastore'; +import { + DataprocMetastoreClient, + DataprocMetastoreFederationClient, +} from '@google-cloud/dataproc-metastore'; // check that the client class type name can be used function doStuffWithDataprocMetastoreClient(client: DataprocMetastoreClient) { client.close(); } +function doStuffWithDataprocMetastoreFederationClient( + client: DataprocMetastoreFederationClient +) { + client.close(); +} function main() { // check that the client instance can be created const dataprocMetastoreClient = new DataprocMetastoreClient(); doStuffWithDataprocMetastoreClient(dataprocMetastoreClient); + // check that the client instance can be created + const dataprocMetastoreFederationClient = + new DataprocMetastoreFederationClient(); + doStuffWithDataprocMetastoreFederationClient( + dataprocMetastoreFederationClient + ); } main(); diff --git a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1.ts b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1.ts new file mode 100644 index 00000000000..364d377e04b --- /dev/null +++ b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1.ts @@ -0,0 +1,2708 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as dataprocmetastorefederationModule from '../src'; + +import {PassThrough} from 'stream'; + +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.DataprocMetastoreFederationClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient + .servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient + .apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient + .port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.dataprocMetastoreFederationStub, undefined); + await client.initialize(); + assert(client.dataprocMetastoreFederationStub); + }); + + it('has close method for the initialized client', done => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + assert(client.dataprocMetastoreFederationStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.dataprocMetastoreFederationStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getFederation', () => { + it('invokes getFederation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.GetFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.GetFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.metastore.v1.Federation() + ); + client.innerApiCalls.getFederation = stubSimpleCall(expectedResponse); + const [response] = await client.getFederation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFederation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.GetFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.GetFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.metastore.v1.Federation() + ); + client.innerApiCalls.getFederation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getFederation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.metastore.v1.IFederation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFederation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.GetFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.GetFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getFederation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getFederation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFederation with closed client', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.GetFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.GetFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getFederation(request), expectedError); + }); + }); + + describe('createFederation', () => { + it('invokes createFederation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.CreateFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.CreateFederationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createFederation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createFederation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFederation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.CreateFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.CreateFederationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createFederation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createFederation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFederation with call error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.CreateFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.CreateFederationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFederation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createFederation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFederation with LRO error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.CreateFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.CreateFederationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFederation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createFederation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateFederationProgress without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateFederationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateFederationProgress with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateFederationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateFederation', () => { + it('invokes updateFederation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.UpdateFederationRequest() + ); + request.federation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.UpdateFederationRequest', + ['federation', 'name'] + ); + request.federation.name = defaultValue1; + const expectedHeaderRequestParams = `federation.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateFederation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateFederation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFederation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.UpdateFederationRequest() + ); + request.federation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.UpdateFederationRequest', + ['federation', 'name'] + ); + request.federation.name = defaultValue1; + const expectedHeaderRequestParams = `federation.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateFederation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateFederation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.metastore.v1.IFederation, + protos.google.cloud.metastore.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFederation with call error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.UpdateFederationRequest() + ); + request.federation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.UpdateFederationRequest', + ['federation', 'name'] + ); + request.federation.name = defaultValue1; + const expectedHeaderRequestParams = `federation.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateFederation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateFederation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFederation with LRO error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.UpdateFederationRequest() + ); + request.federation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.UpdateFederationRequest', + ['federation', 'name'] + ); + request.federation.name = defaultValue1; + const expectedHeaderRequestParams = `federation.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateFederation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateFederation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateFederationProgress without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateFederationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateFederationProgress with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateFederationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteFederation', () => { + it('invokes deleteFederation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.DeleteFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.DeleteFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFederation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteFederation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFederation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.DeleteFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.DeleteFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFederation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteFederation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFederation with call error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.DeleteFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.DeleteFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFederation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteFederation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFederation with LRO error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.DeleteFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.DeleteFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFederation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteFederation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteFederationProgress without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteFederationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteFederationProgress with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteFederationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listFederations', () => { + it('invokes listFederations without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.metastore.v1.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1.Federation() + ), + ]; + client.innerApiCalls.listFederations = stubSimpleCall(expectedResponse); + const [response] = await client.listFederations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFederations without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.metastore.v1.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1.Federation() + ), + ]; + client.innerApiCalls.listFederations = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFederations( + request, + ( + err?: Error | null, + result?: protos.google.cloud.metastore.v1.IFederation[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFederations with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFederations = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listFederations(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFederationsStream without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.metastore.v1.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1.Federation() + ), + ]; + client.descriptors.page.listFederations.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listFederationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.metastore.v1.Federation[] = []; + stream.on( + 'data', + (response: protos.google.cloud.metastore.v1.Federation) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listFederations.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listFederations, request) + ); + assert( + (client.descriptors.page.listFederations.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listFederationsStream with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listFederations.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listFederationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.metastore.v1.Federation[] = []; + stream.on( + 'data', + (response: protos.google.cloud.metastore.v1.Federation) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listFederations.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listFederations, request) + ); + assert( + (client.descriptors.page.listFederations.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFederations without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.metastore.v1.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1.Federation() + ), + ]; + client.descriptors.page.listFederations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.metastore.v1.IFederation[] = []; + const iterable = client.listFederationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listFederations.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listFederations.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFederations with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listFederations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFederationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.metastore.v1.IFederation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listFederations.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listFederations.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('backup', () => { + const fakePath = '/rendered/path/backup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + service: 'serviceValue', + backup: 'backupValue', + }; + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.backupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPath', () => { + const result = client.backupPath( + 'projectValue', + 'locationValue', + 'serviceValue', + 'backupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBackupName', () => { + const result = client.matchProjectFromBackupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBackupName', () => { + const result = client.matchLocationFromBackupName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromBackupName', () => { + const result = client.matchServiceFromBackupName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupFromBackupName', () => { + const result = client.matchBackupFromBackupName(fakePath); + assert.strictEqual(result, 'backupValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('federation', () => { + const fakePath = '/rendered/path/federation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + federation: 'federationValue', + }; + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.federationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.federationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('federationPath', () => { + const result = client.federationPath( + 'projectValue', + 'locationValue', + 'federationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.federationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFederationName', () => { + const result = client.matchProjectFromFederationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFederationName', () => { + const result = client.matchLocationFromFederationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFederationFromFederationName', () => { + const result = client.matchFederationFromFederationName(fakePath); + assert.strictEqual(result, 'federationValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('metadataImport', () => { + const fakePath = '/rendered/path/metadataImport'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + service: 'serviceValue', + metadata_import: 'metadataImportValue', + }; + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.metadataImportPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataImportPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataImportPath', () => { + const result = client.metadataImportPath( + 'projectValue', + 'locationValue', + 'serviceValue', + 'metadataImportValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataImportPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataImportName', () => { + const result = client.matchProjectFromMetadataImportName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataImportPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataImportName', () => { + const result = client.matchLocationFromMetadataImportName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataImportPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromMetadataImportName', () => { + const result = client.matchServiceFromMetadataImportName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.metadataImportPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataImportFromMetadataImportName', () => { + const result = + client.matchMetadataImportFromMetadataImportName(fakePath); + assert.strictEqual(result, 'metadataImportValue'); + assert( + (client.pathTemplates.metadataImportPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('service', () => { + const fakePath = '/rendered/path/service'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + service: 'serviceValue', + }; + const client = + new dataprocmetastorefederationModule.v1.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.servicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.servicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('servicePath', () => { + const result = client.servicePath( + 'projectValue', + 'locationValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.servicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromServiceName', () => { + const result = client.matchProjectFromServiceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromServiceName', () => { + const result = client.matchLocationFromServiceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromServiceName', () => { + const result = client.matchServiceFromServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1alpha.ts b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1alpha.ts new file mode 100644 index 00000000000..7cf2fa359ef --- /dev/null +++ b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1alpha.ts @@ -0,0 +1,2711 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as dataprocmetastorefederationModule from '../src'; + +import {PassThrough} from 'stream'; + +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1alpha.DataprocMetastoreFederationClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + dataprocmetastorefederationModule.v1alpha + .DataprocMetastoreFederationClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + dataprocmetastorefederationModule.v1alpha + .DataprocMetastoreFederationClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + dataprocmetastorefederationModule.v1alpha + .DataprocMetastoreFederationClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.dataprocMetastoreFederationStub, undefined); + await client.initialize(); + assert(client.dataprocMetastoreFederationStub); + }); + + it('has close method for the initialized client', done => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + assert(client.dataprocMetastoreFederationStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.dataprocMetastoreFederationStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getFederation', () => { + it('invokes getFederation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.GetFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.GetFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.Federation() + ); + client.innerApiCalls.getFederation = stubSimpleCall(expectedResponse); + const [response] = await client.getFederation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFederation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.GetFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.GetFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.Federation() + ); + client.innerApiCalls.getFederation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getFederation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.metastore.v1alpha.IFederation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFederation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.GetFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.GetFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getFederation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getFederation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFederation with closed client', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.GetFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.GetFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getFederation(request), expectedError); + }); + }); + + describe('createFederation', () => { + it('invokes createFederation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.CreateFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.CreateFederationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createFederation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createFederation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFederation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.CreateFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.CreateFederationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createFederation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createFederation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFederation with call error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.CreateFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.CreateFederationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFederation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createFederation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFederation with LRO error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.CreateFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.CreateFederationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFederation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createFederation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateFederationProgress without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateFederationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateFederationProgress with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateFederationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateFederation', () => { + it('invokes updateFederation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.UpdateFederationRequest() + ); + request.federation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.UpdateFederationRequest', + ['federation', 'name'] + ); + request.federation.name = defaultValue1; + const expectedHeaderRequestParams = `federation.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateFederation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateFederation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFederation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.UpdateFederationRequest() + ); + request.federation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.UpdateFederationRequest', + ['federation', 'name'] + ); + request.federation.name = defaultValue1; + const expectedHeaderRequestParams = `federation.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateFederation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateFederation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.metastore.v1alpha.IFederation, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFederation with call error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.UpdateFederationRequest() + ); + request.federation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.UpdateFederationRequest', + ['federation', 'name'] + ); + request.federation.name = defaultValue1; + const expectedHeaderRequestParams = `federation.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateFederation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateFederation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFederation with LRO error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.UpdateFederationRequest() + ); + request.federation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.UpdateFederationRequest', + ['federation', 'name'] + ); + request.federation.name = defaultValue1; + const expectedHeaderRequestParams = `federation.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateFederation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateFederation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateFederationProgress without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateFederationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateFederationProgress with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateFederationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteFederation', () => { + it('invokes deleteFederation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.DeleteFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.DeleteFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFederation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteFederation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFederation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.DeleteFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.DeleteFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFederation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteFederation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1alpha.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFederation with call error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.DeleteFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.DeleteFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFederation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteFederation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFederation with LRO error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.DeleteFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.DeleteFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFederation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteFederation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteFederationProgress without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteFederationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteFederationProgress with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteFederationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listFederations', () => { + it('invokes listFederations without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.Federation() + ), + ]; + client.innerApiCalls.listFederations = stubSimpleCall(expectedResponse); + const [response] = await client.listFederations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFederations without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.Federation() + ), + ]; + client.innerApiCalls.listFederations = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFederations( + request, + ( + err?: Error | null, + result?: protos.google.cloud.metastore.v1alpha.IFederation[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFederations with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFederations = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listFederations(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFederationsStream without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.Federation() + ), + ]; + client.descriptors.page.listFederations.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listFederationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.metastore.v1alpha.Federation[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.metastore.v1alpha.Federation) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listFederations.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listFederations, request) + ); + assert( + (client.descriptors.page.listFederations.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listFederationsStream with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listFederations.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listFederationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.metastore.v1alpha.Federation[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.metastore.v1alpha.Federation) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listFederations.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listFederations, request) + ); + assert( + (client.descriptors.page.listFederations.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFederations without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.Federation() + ), + ]; + client.descriptors.page.listFederations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.metastore.v1alpha.IFederation[] = []; + const iterable = client.listFederationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listFederations.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listFederations.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFederations with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1alpha.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1alpha.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listFederations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFederationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.metastore.v1alpha.IFederation[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listFederations.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listFederations.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('backup', () => { + const fakePath = '/rendered/path/backup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + service: 'serviceValue', + backup: 'backupValue', + }; + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.backupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPath', () => { + const result = client.backupPath( + 'projectValue', + 'locationValue', + 'serviceValue', + 'backupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBackupName', () => { + const result = client.matchProjectFromBackupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBackupName', () => { + const result = client.matchLocationFromBackupName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromBackupName', () => { + const result = client.matchServiceFromBackupName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupFromBackupName', () => { + const result = client.matchBackupFromBackupName(fakePath); + assert.strictEqual(result, 'backupValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('federation', () => { + const fakePath = '/rendered/path/federation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + federation: 'federationValue', + }; + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.federationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.federationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('federationPath', () => { + const result = client.federationPath( + 'projectValue', + 'locationValue', + 'federationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.federationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFederationName', () => { + const result = client.matchProjectFromFederationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFederationName', () => { + const result = client.matchLocationFromFederationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFederationFromFederationName', () => { + const result = client.matchFederationFromFederationName(fakePath); + assert.strictEqual(result, 'federationValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('metadataImport', () => { + const fakePath = '/rendered/path/metadataImport'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + service: 'serviceValue', + metadata_import: 'metadataImportValue', + }; + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.metadataImportPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataImportPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataImportPath', () => { + const result = client.metadataImportPath( + 'projectValue', + 'locationValue', + 'serviceValue', + 'metadataImportValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataImportPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataImportName', () => { + const result = client.matchProjectFromMetadataImportName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataImportPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataImportName', () => { + const result = client.matchLocationFromMetadataImportName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataImportPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromMetadataImportName', () => { + const result = client.matchServiceFromMetadataImportName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.metadataImportPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataImportFromMetadataImportName', () => { + const result = + client.matchMetadataImportFromMetadataImportName(fakePath); + assert.strictEqual(result, 'metadataImportValue'); + assert( + (client.pathTemplates.metadataImportPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('service', () => { + const fakePath = '/rendered/path/service'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + service: 'serviceValue', + }; + const client = + new dataprocmetastorefederationModule.v1alpha.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.servicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.servicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('servicePath', () => { + const result = client.servicePath( + 'projectValue', + 'locationValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.servicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromServiceName', () => { + const result = client.matchProjectFromServiceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromServiceName', () => { + const result = client.matchLocationFromServiceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromServiceName', () => { + const result = client.matchServiceFromServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1beta.ts b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1beta.ts new file mode 100644 index 00000000000..9d8608f3333 --- /dev/null +++ b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1beta.ts @@ -0,0 +1,2709 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as dataprocmetastorefederationModule from '../src'; + +import {PassThrough} from 'stream'; + +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta.DataprocMetastoreFederationClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + dataprocmetastorefederationModule.v1beta + .DataprocMetastoreFederationClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + dataprocmetastorefederationModule.v1beta + .DataprocMetastoreFederationClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + dataprocmetastorefederationModule.v1beta + .DataprocMetastoreFederationClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.dataprocMetastoreFederationStub, undefined); + await client.initialize(); + assert(client.dataprocMetastoreFederationStub); + }); + + it('has close method for the initialized client', done => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + assert(client.dataprocMetastoreFederationStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.dataprocMetastoreFederationStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getFederation', () => { + it('invokes getFederation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.GetFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.GetFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.Federation() + ); + client.innerApiCalls.getFederation = stubSimpleCall(expectedResponse); + const [response] = await client.getFederation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFederation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.GetFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.GetFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.Federation() + ); + client.innerApiCalls.getFederation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getFederation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.metastore.v1beta.IFederation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFederation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.GetFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.GetFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getFederation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getFederation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFederation with closed client', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.GetFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.GetFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getFederation(request), expectedError); + }); + }); + + describe('createFederation', () => { + it('invokes createFederation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.CreateFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.CreateFederationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createFederation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createFederation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFederation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.CreateFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.CreateFederationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createFederation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createFederation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFederation with call error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.CreateFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.CreateFederationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFederation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createFederation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFederation with LRO error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.CreateFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.CreateFederationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFederation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createFederation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateFederationProgress without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateFederationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateFederationProgress with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateFederationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateFederation', () => { + it('invokes updateFederation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.UpdateFederationRequest() + ); + request.federation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.UpdateFederationRequest', + ['federation', 'name'] + ); + request.federation.name = defaultValue1; + const expectedHeaderRequestParams = `federation.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateFederation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateFederation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFederation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.UpdateFederationRequest() + ); + request.federation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.UpdateFederationRequest', + ['federation', 'name'] + ); + request.federation.name = defaultValue1; + const expectedHeaderRequestParams = `federation.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateFederation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateFederation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.metastore.v1beta.IFederation, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFederation with call error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.UpdateFederationRequest() + ); + request.federation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.UpdateFederationRequest', + ['federation', 'name'] + ); + request.federation.name = defaultValue1; + const expectedHeaderRequestParams = `federation.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateFederation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateFederation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFederation with LRO error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.UpdateFederationRequest() + ); + request.federation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.UpdateFederationRequest', + ['federation', 'name'] + ); + request.federation.name = defaultValue1; + const expectedHeaderRequestParams = `federation.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateFederation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateFederation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateFederationProgress without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateFederationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateFederationProgress with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateFederationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteFederation', () => { + it('invokes deleteFederation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.DeleteFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.DeleteFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFederation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteFederation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFederation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.DeleteFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.DeleteFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFederation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteFederation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1beta.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.metastore.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFederation with call error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.DeleteFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.DeleteFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFederation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteFederation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFederation with LRO error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.DeleteFederationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.DeleteFederationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFederation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteFederation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFederation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteFederationProgress without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteFederationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteFederationProgress with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteFederationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listFederations', () => { + it('invokes listFederations without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.metastore.v1beta.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1beta.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1beta.Federation() + ), + ]; + client.innerApiCalls.listFederations = stubSimpleCall(expectedResponse); + const [response] = await client.listFederations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFederations without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.metastore.v1beta.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1beta.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1beta.Federation() + ), + ]; + client.innerApiCalls.listFederations = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFederations( + request, + ( + err?: Error | null, + result?: protos.google.cloud.metastore.v1beta.IFederation[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFederations with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFederations = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listFederations(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFederations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFederationsStream without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.metastore.v1beta.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1beta.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1beta.Federation() + ), + ]; + client.descriptors.page.listFederations.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listFederationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.metastore.v1beta.Federation[] = []; + stream.on( + 'data', + (response: protos.google.cloud.metastore.v1beta.Federation) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listFederations.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listFederations, request) + ); + assert( + (client.descriptors.page.listFederations.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listFederationsStream with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listFederations.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listFederationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.metastore.v1beta.Federation[] = []; + stream.on( + 'data', + (response: protos.google.cloud.metastore.v1beta.Federation) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listFederations.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listFederations, request) + ); + assert( + (client.descriptors.page.listFederations.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFederations without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.metastore.v1beta.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1beta.Federation() + ), + generateSampleMessage( + new protos.google.cloud.metastore.v1beta.Federation() + ), + ]; + client.descriptors.page.listFederations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.metastore.v1beta.IFederation[] = []; + const iterable = client.listFederationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listFederations.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listFederations.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFederations with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.metastore.v1beta.ListFederationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.metastore.v1beta.ListFederationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listFederations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFederationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.metastore.v1beta.IFederation[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listFederations.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listFederations.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('backup', () => { + const fakePath = '/rendered/path/backup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + service: 'serviceValue', + backup: 'backupValue', + }; + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.backupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPath', () => { + const result = client.backupPath( + 'projectValue', + 'locationValue', + 'serviceValue', + 'backupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBackupName', () => { + const result = client.matchProjectFromBackupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBackupName', () => { + const result = client.matchLocationFromBackupName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromBackupName', () => { + const result = client.matchServiceFromBackupName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupFromBackupName', () => { + const result = client.matchBackupFromBackupName(fakePath); + assert.strictEqual(result, 'backupValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('federation', () => { + const fakePath = '/rendered/path/federation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + federation: 'federationValue', + }; + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.federationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.federationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('federationPath', () => { + const result = client.federationPath( + 'projectValue', + 'locationValue', + 'federationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.federationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFederationName', () => { + const result = client.matchProjectFromFederationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFederationName', () => { + const result = client.matchLocationFromFederationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFederationFromFederationName', () => { + const result = client.matchFederationFromFederationName(fakePath); + assert.strictEqual(result, 'federationValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('metadataImport', () => { + const fakePath = '/rendered/path/metadataImport'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + service: 'serviceValue', + metadata_import: 'metadataImportValue', + }; + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.metadataImportPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataImportPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataImportPath', () => { + const result = client.metadataImportPath( + 'projectValue', + 'locationValue', + 'serviceValue', + 'metadataImportValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataImportPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataImportName', () => { + const result = client.matchProjectFromMetadataImportName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataImportPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataImportName', () => { + const result = client.matchLocationFromMetadataImportName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataImportPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromMetadataImportName', () => { + const result = client.matchServiceFromMetadataImportName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.metadataImportPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataImportFromMetadataImportName', () => { + const result = + client.matchMetadataImportFromMetadataImportName(fakePath); + assert.strictEqual(result, 'metadataImportValue'); + assert( + (client.pathTemplates.metadataImportPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('service', () => { + const fakePath = '/rendered/path/service'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + service: 'serviceValue', + }; + const client = + new dataprocmetastorefederationModule.v1beta.DataprocMetastoreFederationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.servicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.servicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('servicePath', () => { + const result = client.servicePath( + 'projectValue', + 'locationValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.servicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromServiceName', () => { + const result = client.matchProjectFromServiceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromServiceName', () => { + const result = client.matchLocationFromServiceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromServiceName', () => { + const result = client.matchServiceFromServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1.ts b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1.ts index 40b42647958..8fe0454a948 100644 --- a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1.ts +++ b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1.ts @@ -25,7 +25,13 @@ import * as dataprocmetastoreModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LROperation, operationsProtos} from 'google-gax'; +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -3326,6 +3332,833 @@ describe('v1.DataprocMetastoreClient', () => { ); }); }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('backup', () => { @@ -3404,6 +4237,70 @@ describe('v1.DataprocMetastoreClient', () => { }); }); + describe('federation', () => { + const fakePath = '/rendered/path/federation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + federation: 'federationValue', + }; + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.federationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.federationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('federationPath', () => { + const result = client.federationPath( + 'projectValue', + 'locationValue', + 'federationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.federationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFederationName', () => { + const result = client.matchProjectFromFederationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFederationName', () => { + const result = client.matchLocationFromFederationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFederationFromFederationName', () => { + const result = client.matchFederationFromFederationName(fakePath); + assert.strictEqual(result, 'federationValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('location', () => { const fakePath = '/rendered/path/location'; const expectedParameters = { @@ -3579,6 +4476,44 @@ describe('v1.DataprocMetastoreClient', () => { }); }); + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new dataprocmetastoreModule.v1.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('service', () => { const fakePath = '/rendered/path/service'; const expectedParameters = { diff --git a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1alpha.ts b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1alpha.ts index b8ff0b1cd86..e3d086e16b7 100644 --- a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1alpha.ts +++ b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1alpha.ts @@ -25,7 +25,13 @@ import * as dataprocmetastoreModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LROperation, operationsProtos} from 'google-gax'; +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -3473,6 +3479,858 @@ describe('v1alpha.DataprocMetastoreClient', () => { ); }); }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('backup', () => { @@ -3552,6 +4410,71 @@ describe('v1alpha.DataprocMetastoreClient', () => { }); }); + describe('federation', () => { + const fakePath = '/rendered/path/federation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + federation: 'federationValue', + }; + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.federationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.federationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('federationPath', () => { + const result = client.federationPath( + 'projectValue', + 'locationValue', + 'federationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.federationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFederationName', () => { + const result = client.matchProjectFromFederationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFederationName', () => { + const result = client.matchLocationFromFederationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFederationFromFederationName', () => { + const result = client.matchFederationFromFederationName(fakePath); + assert.strictEqual(result, 'federationValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('lake', () => { const fakePath = '/rendered/path/lake'; const expectedParameters = { @@ -3795,6 +4718,45 @@ describe('v1alpha.DataprocMetastoreClient', () => { }); }); + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = + new dataprocmetastoreModule.v1alpha.DataprocMetastoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('service', () => { const fakePath = '/rendered/path/service'; const expectedParameters = { diff --git a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1beta.ts b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1beta.ts index da0f892cb80..78a91d8de7a 100644 --- a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1beta.ts +++ b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1beta.ts @@ -25,7 +25,13 @@ import * as dataprocmetastoreModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LROperation, operationsProtos} from 'google-gax'; +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -3566,6 +3572,883 @@ describe('v1beta.DataprocMetastoreClient', () => { ); }); }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('backup', () => { @@ -3646,6 +4529,138 @@ describe('v1beta.DataprocMetastoreClient', () => { }); }); + describe('federation', () => { + const fakePath = '/rendered/path/federation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + federation: 'federationValue', + }; + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.federationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.federationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('federationPath', () => { + const result = client.federationPath( + 'projectValue', + 'locationValue', + 'federationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.federationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFederationName', () => { + const result = client.matchProjectFromFederationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFederationName', () => { + const result = client.matchLocationFromFederationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFederationFromFederationName', () => { + const result = client.matchFederationFromFederationName(fakePath); + assert.strictEqual(result, 'federationValue'); + assert( + (client.pathTemplates.federationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('lake', () => { + const fakePath = '/rendered/path/lake'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + }; + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.lakePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.lakePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('lakePath', () => { + const result = client.lakePath( + 'projectValue', + 'locationValue', + 'lakeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.lakePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLakeName', () => { + const result = client.matchProjectFromLakeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLakeName', () => { + const result = client.matchLocationFromLakeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromLakeName', () => { + const result = client.matchLakeFromLakeName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('location', () => { const fakePath = '/rendered/path/location'; const expectedParameters = { @@ -3827,6 +4842,46 @@ describe('v1beta.DataprocMetastoreClient', () => { }); }); + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new dataprocmetastoreModule.v1beta.DataprocMetastoreClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('service', () => { const fakePath = '/rendered/path/service'; const expectedParameters = {