From 097cf5fa1d2c32e2eab3fb53830ddabdef7ea2dc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 21:40:19 +0000 Subject: [PATCH] feat: Added DatabaseType field for the type of backing store used (#121) - [ ] Regenerate this pull request now. feat: Added AVRO DatabaseDumpSpec for importing and exporting Avro files feat: Added additional endTime field for MetadataImports feat: Added RESTORING status on Backups feat: Added support to record the services that are restoring the backup feat: Added configuration for Dataplex integration feat: Added support for IAM management for metadata resources feat: Added AuxiliaryVersionConfig for configuring the auxiliary hive versions during creation or update of the DPMS instance feat: Added NetworkConfig for exposing the DPMS endpoint in multiple subnetworks using PSC (this skips the need for VPC peering) feat: Added EncryptionConfig which contains information used to configure the Dataproc Metastore service to encrypt customer data at rest (CMEK) docs: formatting improvements PiperOrigin-RevId: 436271267 Source-Link: https://github.com/googleapis/googleapis/commit/463cacaf4733629b8a37803796777856013c27fc Source-Link: https://github.com/googleapis/googleapis-gen/commit/e1cd57321c6bc6ee599c1cb3b831794598048a6f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTFjZDU3MzIxYzZiYzZlZTU5OWMxY2IzYjgzMTc5NDU5ODA0OGE2ZiJ9 --- .../cloud/metastore/v1alpha/metastore.proto | 178 +- protos/protos.d.ts | 635 +++- protos/protos.js | 2582 ++++++++++++++--- protos/protos.json | 163 +- .../dataproc_metastore.create_backup.js | 2 +- ...taproc_metastore.create_metadata_import.js | 2 +- .../dataproc_metastore.export_metadata.js | 2 +- .../dataproc_metastore.restore_service.js | 4 +- ...tadata.google.cloud.metastore.v1alpha.json | 2 +- src/v1alpha/dataproc_metastore_client.ts | 68 +- test/gapic_dataproc_metastore_v1alpha.ts | 65 + 11 files changed, 3208 insertions(+), 495 deletions(-) diff --git a/protos/google/cloud/metastore/v1alpha/metastore.proto b/protos/google/cloud/metastore/v1alpha/metastore.proto index 489e06f..d5b9638 100644 --- a/protos/google/cloud/metastore/v1alpha/metastore.proto +++ b/protos/google/cloud/metastore/v1alpha/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,14 +30,23 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/metastore/v1alp option java_multiple_files = true; option java_outer_classname = "MetastoreProto"; option java_package = "com.google.cloud.metastore.v1alpha"; +option php_namespace = "Google\\Cloud\\Metastore\\V1alpha"; 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. @@ -194,7 +203,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: "/v1alpha/{parent=projects/*/locations/*/services/*}/backups" @@ -288,6 +297,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 { @@ -347,6 +368,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. @@ -358,12 +381,26 @@ 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]; + + // Immutable. The configuration specifying the network settings for the + // Dataproc Metastore service. + NetworkConfig network_config = 21 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The database type that the Metastore service stores its data. + DatabaseType database_type = 22 [(google.api.field_behavior) = IMMUTABLE]; } // 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 @@ -374,6 +411,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 { @@ -387,12 +443,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 @@ -401,6 +471,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. @@ -415,7 +499,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; } @@ -431,6 +515,60 @@ 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 { + // 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" + }]; + } + + // 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]; +} + // The metadata management activities of the metastore service. message MetadataManagementActivity { // Output only. The latest metadata exports of the metastore service. @@ -506,12 +644,15 @@ 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]; // Output only. The time when the metadata import was last updated. 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]; } @@ -579,6 +720,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: @@ -600,6 +744,9 @@ 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. @@ -622,7 +769,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; @@ -646,7 +793,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) = { @@ -894,7 +1041,7 @@ 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) = { @@ -1029,7 +1176,7 @@ 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) = { @@ -1105,7 +1252,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) = { @@ -1136,7 +1283,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) = { @@ -1147,7 +1294,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) = { @@ -1227,6 +1374,9 @@ message DatabaseDumpSpec { // Database dump is a MySQL dump file. MYSQL = 1; + + // Database dump contains Avro files. + AVRO = 2; } diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 45c5f71..c0de725 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -4387,6 +4387,15 @@ export namespace google { /** 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); } /** Represents a Service. */ @@ -4449,6 +4458,15 @@ export namespace google { /** 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 metastoreConfig. */ public metastoreConfig?: "hiveMetastoreConfig"; @@ -4550,6 +4568,13 @@ export namespace google { CANARY = 1, STABLE = 2 } + + /** DatabaseType enum. */ + enum DatabaseType { + DATABASE_TYPE_UNSPECIFIED = 0, + MYSQL = 1, + SPANNER = 2 + } } /** Properties of a MetadataIntegration. */ @@ -4557,6 +4582,9 @@ export namespace google { /** MetadataIntegration dataCatalogConfig */ dataCatalogConfig?: (google.cloud.metastore.v1alpha.IDataCatalogConfig|null); + + /** MetadataIntegration dataplexConfig */ + dataplexConfig?: (google.cloud.metastore.v1alpha.IDataplexConfig|null); } /** Represents a MetadataIntegration. */ @@ -4571,6 +4599,9 @@ export namespace google { /** 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 @@ -4732,6 +4763,186 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** 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 }; + } + + /** 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 }; + } + /** Properties of a MaintenanceWindow. */ interface IMaintenanceWindow { @@ -4839,6 +5050,12 @@ export namespace google { /** 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. */ @@ -4859,6 +5076,12 @@ export namespace google { /** 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 @@ -4930,6 +5153,16 @@ export namespace google { public toJSON(): { [k: string]: any }; } + namespace HiveMetastoreConfig { + + /** EndpointProtocol enum. */ + enum EndpointProtocol { + ENDPOINT_PROTOCOL_UNSPECIFIED = 0, + THRIFT = 1, + GRPC = 2 + } + } + /** Properties of a KerberosConfig. */ interface IKerberosConfig { @@ -5125,6 +5358,390 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + 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 }; + } + } + /** Properties of a MetadataManagementActivity. */ interface IMetadataManagementActivity { @@ -5239,6 +5856,9 @@ export namespace google { /** 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); } @@ -5267,6 +5887,9 @@ export namespace google { /** 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); @@ -5622,6 +6245,9 @@ export namespace google { /** Backup description */ description?: (string|null); + + /** Backup restoringServices */ + restoringServices?: (string[]|null); } /** Represents a Backup. */ @@ -5651,6 +6277,9 @@ export namespace google { /** Backup description. */ public description: string; + /** Backup restoringServices. */ + public restoringServices: string[]; + /** * Creates a new Backup instance using the specified properties. * @param [properties] Properties to set @@ -5730,7 +6359,8 @@ export namespace google { CREATING = 1, DELETING = 2, ACTIVE = 3, - FAILED = 4 + FAILED = 4, + RESTORING = 5 } } @@ -8134,7 +8764,8 @@ export namespace google { /** Type enum. */ enum Type { TYPE_UNSPECIFIED = 0, - MYSQL = 1 + MYSQL = 1, + AVRO = 2 } } } diff --git a/protos/protos.js b/protos/protos.js index 10faf1f..bddbf55 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -10342,6 +10342,9 @@ * @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 */ /** @@ -10496,6 +10499,30 @@ */ 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; @@ -10569,6 +10596,12 @@ $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); return writer; }; @@ -10673,6 +10706,15 @@ 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; @@ -10803,6 +10845,25 @@ 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; }; @@ -10931,6 +10992,30 @@ 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) { + 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; }; @@ -10965,6 +11050,9 @@ 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; @@ -11007,6 +11095,12 @@ 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] : 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] : message.databaseType; return object; }; @@ -11079,6 +11173,22 @@ 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; })(); @@ -11089,6 +11199,7 @@ * @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 */ /** @@ -11114,6 +11225,14 @@ */ 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 @@ -11140,6 +11259,8 @@ 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; }; @@ -11177,6 +11298,9 @@ 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; @@ -11217,6 +11341,11 @@ 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; }; @@ -11237,6 +11366,11 @@ 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; }; @@ -11253,10 +11387,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + 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; }; @@ -11461,25 +11599,25 @@ return DataCatalogConfig; })(); - v1alpha.MaintenanceWindow = (function() { + v1alpha.DataplexConfig = (function() { /** - * Properties of a MaintenanceWindow. + * Properties of a DataplexConfig. * @memberof google.cloud.metastore.v1alpha - * @interface IMaintenanceWindow - * @property {google.protobuf.IInt32Value|null} [hourOfDay] MaintenanceWindow hourOfDay - * @property {google.type.DayOfWeek|null} [dayOfWeek] MaintenanceWindow dayOfWeek + * @interface IDataplexConfig + * @property {Object.|null} [lakeResources] DataplexConfig lakeResources */ /** - * Constructs a new MaintenanceWindow. + * Constructs a new DataplexConfig. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a MaintenanceWindow. - * @implements IMaintenanceWindow + * @classdesc Represents a DataplexConfig. + * @implements IDataplexConfig * @constructor - * @param {google.cloud.metastore.v1alpha.IMaintenanceWindow=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.IDataplexConfig=} [properties] Properties to set */ - function MaintenanceWindow(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) @@ -11487,88 +11625,97 @@ } /** - * 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 + * DataplexConfig lakeResources. + * @member {Object.} lakeResources + * @memberof google.cloud.metastore.v1alpha.DataplexConfig * @instance */ - MaintenanceWindow.prototype.dayOfWeek = 0; + DataplexConfig.prototype.lakeResources = $util.emptyObject; /** - * Creates a new MaintenanceWindow instance using the specified properties. + * Creates a new DataplexConfig instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @memberof google.cloud.metastore.v1alpha.DataplexConfig * @static - * @param {google.cloud.metastore.v1alpha.IMaintenanceWindow=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.MaintenanceWindow} MaintenanceWindow instance + * @param {google.cloud.metastore.v1alpha.IDataplexConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.DataplexConfig} DataplexConfig instance */ - MaintenanceWindow.create = function create(properties) { - return new MaintenanceWindow(properties); + DataplexConfig.create = function create(properties) { + return new DataplexConfig(properties); }; /** - * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.metastore.v1alpha.MaintenanceWindow.verify|verify} messages. + * Encodes the specified DataplexConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.DataplexConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @memberof google.cloud.metastore.v1alpha.DataplexConfig * @static - * @param {google.cloud.metastore.v1alpha.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @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 */ - MaintenanceWindow.encode = function encode(message, writer) { + DataplexConfig.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.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 MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.MaintenanceWindow.verify|verify} messages. + * 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.MaintenanceWindow + * @memberof google.cloud.metastore.v1alpha.DataplexConfig * @static - * @param {google.cloud.metastore.v1alpha.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @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 */ - MaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { + DataplexConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MaintenanceWindow message from the specified reader or buffer. + * Decodes a DataplexConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @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.MaintenanceWindow} MaintenanceWindow + * @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 */ - MaintenanceWindow.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.MaintenanceWindow(); + 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: - message.hourOfDay = $root.google.protobuf.Int32Value.decode(reader, reader.uint32()); - break; - case 2: - message.dayOfWeek = reader.int32(); + 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); @@ -11579,167 +11726,126 @@ }; /** - * Decodes a MaintenanceWindow 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.MaintenanceWindow + * @memberof google.cloud.metastore.v1alpha.DataplexConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.MaintenanceWindow} MaintenanceWindow + * @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 */ - MaintenanceWindow.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 MaintenanceWindow message. + * Verifies a DataplexConfig message. * @function verify - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @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 */ - MaintenanceWindow.verify = function verify(message) { + DataplexConfig.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; + 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 MaintenanceWindow 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.MaintenanceWindow + * @memberof google.cloud.metastore.v1alpha.DataplexConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.MaintenanceWindow} MaintenanceWindow + * @returns {google.cloud.metastore.v1alpha.DataplexConfig} DataplexConfig */ - MaintenanceWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.MaintenanceWindow) + DataplexConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.DataplexConfig) 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) { - 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.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 MaintenanceWindow 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.MaintenanceWindow + * @memberof google.cloud.metastore.v1alpha.DataplexConfig * @static - * @param {google.cloud.metastore.v1alpha.MaintenanceWindow} message MaintenanceWindow + * @param {google.cloud.metastore.v1alpha.DataplexConfig} message DataplexConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MaintenanceWindow.toObject = function toObject(message, options) { + DataplexConfig.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 (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 (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] : message.dayOfWeek; return object; }; /** - * Converts this MaintenanceWindow to JSON. + * Converts this DataplexConfig to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow + * @memberof google.cloud.metastore.v1alpha.DataplexConfig * @instance * @returns {Object.} JSON object */ - MaintenanceWindow.prototype.toJSON = function toJSON() { + DataplexConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MaintenanceWindow; + return DataplexConfig; })(); - v1alpha.HiveMetastoreConfig = (function() { + v1alpha.Lake = (function() { /** - * Properties of a HiveMetastoreConfig. + * Properties of a Lake. * @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 + * @interface ILake + * @property {string|null} [name] Lake name */ /** - * Constructs a new HiveMetastoreConfig. + * Constructs a new Lake. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a HiveMetastoreConfig. - * @implements IHiveMetastoreConfig + * @classdesc Represents a Lake. + * @implements ILake * @constructor - * @param {google.cloud.metastore.v1alpha.IHiveMetastoreConfig=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.ILake=} [properties] Properties to set */ - function HiveMetastoreConfig(properties) { - this.configOverrides = {}; + function Lake(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11747,121 +11853,276 @@ } /** - * 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 + * Lake name. + * @member {string} name + * @memberof google.cloud.metastore.v1alpha.Lake * @instance */ - HiveMetastoreConfig.prototype.kerberosConfig = null; + Lake.prototype.name = ""; /** - * Creates a new HiveMetastoreConfig instance using the specified properties. + * Creates a new Lake instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1alpha.Lake * @static - * @param {google.cloud.metastore.v1alpha.IHiveMetastoreConfig=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.HiveMetastoreConfig} HiveMetastoreConfig instance + * @param {google.cloud.metastore.v1alpha.ILake=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.Lake} Lake instance */ - HiveMetastoreConfig.create = function create(properties) { - return new HiveMetastoreConfig(properties); + Lake.create = function create(properties) { + return new Lake(properties); }; /** - * Encodes the specified HiveMetastoreConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.HiveMetastoreConfig.verify|verify} messages. + * Encodes the specified Lake message. Does not implicitly {@link google.cloud.metastore.v1alpha.Lake.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1alpha.Lake * @static - * @param {google.cloud.metastore.v1alpha.IHiveMetastoreConfig} message HiveMetastoreConfig message or plain object to encode + * @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 */ - HiveMetastoreConfig.encode = function encode(message, writer) { + Lake.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified HiveMetastoreConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.HiveMetastoreConfig.verify|verify} messages. + * 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.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1alpha.Lake * @static - * @param {google.cloud.metastore.v1alpha.IHiveMetastoreConfig} message HiveMetastoreConfig message or plain object to encode + * @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 */ - HiveMetastoreConfig.encodeDelimited = function encodeDelimited(message, writer) { + Lake.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HiveMetastoreConfig message from the specified reader or buffer. + * Decodes a Lake message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @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.HiveMetastoreConfig} HiveMetastoreConfig + * @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 */ - HiveMetastoreConfig.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.HiveMetastoreConfig(), key, value; + 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.version = reader.string(); + message.name = 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; + default: + reader.skipType(tag & 7); break; - case 3: - message.kerberosConfig = $root.google.cloud.metastore.v1alpha.KerberosConfig.decode(reader, reader.uint32()); + } + } + 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); + }; + + 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); @@ -11872,146 +12133,1189 @@ }; /** - * Decodes a HiveMetastoreConfig 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.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1alpha.MaintenanceWindow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.HiveMetastoreConfig} HiveMetastoreConfig + * @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 */ - HiveMetastoreConfig.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 HiveMetastoreConfig message. + * Verifies a MaintenanceWindow message. * @function verify - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @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 */ - HiveMetastoreConfig.verify = function verify(message) { + MaintenanceWindow.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.hourOfDay != null && message.hasOwnProperty("hourOfDay")) { + var error = $root.google.protobuf.Int32Value.verify(message.hourOfDay); if (error) - return "kerberosConfig." + 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) { + 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] : 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); + }; + + 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) { + 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] : 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); + }; + + /** + * 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); + }; + + 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); + }; + + 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 a HiveMetastoreConfig 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.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1alpha.EncryptionConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.HiveMetastoreConfig} HiveMetastoreConfig + * @returns {google.cloud.metastore.v1alpha.EncryptionConfig} EncryptionConfig */ - HiveMetastoreConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.HiveMetastoreConfig) + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.EncryptionConfig) 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.v1alpha.EncryptionConfig(); + if (object.kmsKey != null) + message.kmsKey = String(object.kmsKey); return message; }; /** - * Creates a plain object from a HiveMetastoreConfig 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.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1alpha.EncryptionConfig * @static - * @param {google.cloud.metastore.v1alpha.HiveMetastoreConfig} message HiveMetastoreConfig + * @param {google.cloud.metastore.v1alpha.EncryptionConfig} message EncryptionConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HiveMetastoreConfig.toObject = function toObject(message, options) { + EncryptionConfig.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]]; - } - if (message.kerberosConfig != null && message.hasOwnProperty("kerberosConfig")) - object.kerberosConfig = $root.google.cloud.metastore.v1alpha.KerberosConfig.toObject(message.kerberosConfig, options); + if (options.defaults) + object.kmsKey = ""; + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + object.kmsKey = message.kmsKey; return object; }; /** - * Converts this HiveMetastoreConfig to JSON. + * Converts this EncryptionConfig to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.HiveMetastoreConfig + * @memberof google.cloud.metastore.v1alpha.EncryptionConfig * @instance * @returns {Object.} JSON object */ - HiveMetastoreConfig.prototype.toJSON = function toJSON() { + EncryptionConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HiveMetastoreConfig; + return EncryptionConfig; })(); - v1alpha.KerberosConfig = (function() { + v1alpha.AuxiliaryVersionConfig = (function() { /** - * Properties of a KerberosConfig. + * Properties of an AuxiliaryVersionConfig. * @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 + * @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 KerberosConfig. + * Constructs a new AuxiliaryVersionConfig. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a KerberosConfig. - * @implements IKerberosConfig + * @classdesc Represents an AuxiliaryVersionConfig. + * @implements IAuxiliaryVersionConfig * @constructor - * @param {google.cloud.metastore.v1alpha.IKerberosConfig=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig=} [properties] Properties to set */ - function KerberosConfig(properties) { + function AuxiliaryVersionConfig(properties) { + this.configOverrides = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12019,101 +13323,121 @@ } /** - * KerberosConfig keytab. - * @member {google.cloud.metastore.v1alpha.ISecret|null|undefined} keytab - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * AuxiliaryVersionConfig version. + * @member {string} version + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig * @instance */ - KerberosConfig.prototype.keytab = null; + AuxiliaryVersionConfig.prototype.version = ""; /** - * KerberosConfig principal. - * @member {string} principal - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * AuxiliaryVersionConfig configOverrides. + * @member {Object.} configOverrides + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig * @instance */ - KerberosConfig.prototype.principal = ""; + AuxiliaryVersionConfig.prototype.configOverrides = $util.emptyObject; /** - * KerberosConfig krb5ConfigGcsUri. - * @member {string} krb5ConfigGcsUri - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * AuxiliaryVersionConfig networkConfig. + * @member {google.cloud.metastore.v1alpha.INetworkConfig|null|undefined} networkConfig + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig * @instance */ - KerberosConfig.prototype.krb5ConfigGcsUri = ""; + AuxiliaryVersionConfig.prototype.networkConfig = null; /** - * Creates a new KerberosConfig instance using the specified properties. + * Creates a new AuxiliaryVersionConfig instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig * @static - * @param {google.cloud.metastore.v1alpha.IKerberosConfig=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.KerberosConfig} KerberosConfig instance + * @param {google.cloud.metastore.v1alpha.IAuxiliaryVersionConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} AuxiliaryVersionConfig instance */ - KerberosConfig.create = function create(properties) { - return new KerberosConfig(properties); + AuxiliaryVersionConfig.create = function create(properties) { + return new AuxiliaryVersionConfig(properties); }; /** - * Encodes the specified KerberosConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.KerberosConfig.verify|verify} messages. + * Encodes the specified AuxiliaryVersionConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig * @static - * @param {google.cloud.metastore.v1alpha.IKerberosConfig} message KerberosConfig message or plain object to encode + * @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 */ - KerberosConfig.encode = function encode(message, writer) { + AuxiliaryVersionConfig.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.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 KerberosConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.KerberosConfig.verify|verify} messages. + * 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.KerberosConfig + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig * @static - * @param {google.cloud.metastore.v1alpha.IKerberosConfig} message KerberosConfig message or plain object to encode + * @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 */ - KerberosConfig.encodeDelimited = function encodeDelimited(message, writer) { + AuxiliaryVersionConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a KerberosConfig message from the specified reader or buffer. + * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @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.KerberosConfig} KerberosConfig + * @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 */ - KerberosConfig.decode = function decode(reader, length) { + 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.KerberosConfig(); + 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.keytab = $root.google.cloud.metastore.v1alpha.Secret.decode(reader, reader.uint32()); + message.version = reader.string(); break; case 2: - message.principal = reader.string(); + 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.krb5ConfigGcsUri = reader.string(); + message.networkConfig = $root.google.cloud.metastore.v1alpha.NetworkConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -12124,129 +13448,145 @@ }; /** - * Decodes a KerberosConfig message from the specified reader or buffer, length delimited. + * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.KerberosConfig} KerberosConfig + * @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 */ - KerberosConfig.decodeDelimited = function decodeDelimited(reader) { + AuxiliaryVersionConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a KerberosConfig message. + * Verifies an AuxiliaryVersionConfig message. * @function verify - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @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 */ - KerberosConfig.verify = function verify(message) { + AuxiliaryVersionConfig.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 (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 "keytab." + error; + return "networkConfig." + 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. + * Creates an AuxiliaryVersionConfig 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.v1alpha.AuxiliaryVersionConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.KerberosConfig} KerberosConfig + * @returns {google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} AuxiliaryVersionConfig */ - KerberosConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.KerberosConfig) + AuxiliaryVersionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) 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); + 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); } - 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 an AuxiliaryVersionConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig * @static - * @param {google.cloud.metastore.v1alpha.KerberosConfig} message KerberosConfig + * @param {google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} message AuxiliaryVersionConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KerberosConfig.toObject = function toObject(message, options) { + AuxiliaryVersionConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.configOverrides = {}; if (options.defaults) { - object.keytab = null; - object.principal = ""; - object.krb5ConfigGcsUri = ""; + object.version = ""; + object.networkConfig = null; } - 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.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 KerberosConfig to JSON. + * Converts this AuxiliaryVersionConfig to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.KerberosConfig + * @memberof google.cloud.metastore.v1alpha.AuxiliaryVersionConfig * @instance * @returns {Object.} JSON object */ - KerberosConfig.prototype.toJSON = function toJSON() { + AuxiliaryVersionConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return KerberosConfig; + return AuxiliaryVersionConfig; })(); - v1alpha.Secret = (function() { + v1alpha.NetworkConfig = (function() { /** - * Properties of a Secret. + * Properties of a NetworkConfig. * @memberof google.cloud.metastore.v1alpha - * @interface ISecret - * @property {string|null} [cloudSecret] Secret cloudSecret + * @interface INetworkConfig + * @property {Array.|null} [consumers] NetworkConfig consumers */ /** - * Constructs a new Secret. + * Constructs a new NetworkConfig. * @memberof google.cloud.metastore.v1alpha - * @classdesc Represents a Secret. - * @implements ISecret + * @classdesc Represents a NetworkConfig. + * @implements INetworkConfig * @constructor - * @param {google.cloud.metastore.v1alpha.ISecret=} [properties] Properties to set + * @param {google.cloud.metastore.v1alpha.INetworkConfig=} [properties] Properties to set */ - function Secret(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) @@ -12254,89 +13594,78 @@ } /** - * 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 + * NetworkConfig consumers. + * @member {Array.} consumers + * @memberof google.cloud.metastore.v1alpha.NetworkConfig * @instance */ - Object.defineProperty(Secret.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["cloudSecret"]), - set: $util.oneOfSetter($oneOfFields) - }); + NetworkConfig.prototype.consumers = $util.emptyArray; /** - * Creates a new Secret instance using the specified properties. + * Creates a new NetworkConfig instance using the specified properties. * @function create - * @memberof google.cloud.metastore.v1alpha.Secret + * @memberof google.cloud.metastore.v1alpha.NetworkConfig * @static - * @param {google.cloud.metastore.v1alpha.ISecret=} [properties] Properties to set - * @returns {google.cloud.metastore.v1alpha.Secret} Secret instance + * @param {google.cloud.metastore.v1alpha.INetworkConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.NetworkConfig} NetworkConfig instance */ - Secret.create = function create(properties) { - return new Secret(properties); + NetworkConfig.create = function create(properties) { + return new NetworkConfig(properties); }; /** - * Encodes the specified Secret message. Does not implicitly {@link google.cloud.metastore.v1alpha.Secret.verify|verify} messages. + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.NetworkConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.metastore.v1alpha.Secret + * @memberof google.cloud.metastore.v1alpha.NetworkConfig * @static - * @param {google.cloud.metastore.v1alpha.ISecret} message Secret message or plain object to encode + * @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 */ - Secret.encode = function encode(message, writer) { + NetworkConfig.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.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 Secret message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.Secret.verify|verify} messages. + * 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.Secret + * @memberof google.cloud.metastore.v1alpha.NetworkConfig * @static - * @param {google.cloud.metastore.v1alpha.ISecret} message Secret message or plain object to encode + * @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 */ - Secret.encodeDelimited = function encodeDelimited(message, writer) { + NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Secret message from the specified reader or buffer. + * Decodes a NetworkConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.metastore.v1alpha.Secret + * @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.Secret} Secret + * @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 */ - Secret.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.Secret(); + 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 2: - message.cloudSecret = reader.string(); + 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); @@ -12347,91 +13676,332 @@ }; /** - * Decodes a Secret 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.Secret + * @memberof google.cloud.metastore.v1alpha.NetworkConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.metastore.v1alpha.Secret} Secret + * @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 */ - Secret.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 Secret message. + * Verifies a NetworkConfig message. * @function verify - * @memberof google.cloud.metastore.v1alpha.Secret + * @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 */ - Secret.verify = function verify(message) { + NetworkConfig.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.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 Secret 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.Secret + * @memberof google.cloud.metastore.v1alpha.NetworkConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.metastore.v1alpha.Secret} Secret + * @returns {google.cloud.metastore.v1alpha.NetworkConfig} NetworkConfig */ - Secret.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.metastore.v1alpha.Secret) + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.NetworkConfig) return object; - var message = new $root.google.cloud.metastore.v1alpha.Secret(); - if (object.cloudSecret != null) - message.cloudSecret = String(object.cloudSecret); + 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 Secret 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.Secret + * @memberof google.cloud.metastore.v1alpha.NetworkConfig * @static - * @param {google.cloud.metastore.v1alpha.Secret} message Secret + * @param {google.cloud.metastore.v1alpha.NetworkConfig} message NetworkConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Secret.toObject = function toObject(message, options) { + NetworkConfig.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.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 Secret to JSON. + * Converts this NetworkConfig to JSON. * @function toJSON - * @memberof google.cloud.metastore.v1alpha.Secret + * @memberof google.cloud.metastore.v1alpha.NetworkConfig * @instance * @returns {Object.} JSON object */ - Secret.prototype.toJSON = function toJSON() { + NetworkConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Secret; + 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); + }; + + return Consumer; + })(); + + return NetworkConfig; })(); v1alpha.MetadataManagementActivity = (function() { @@ -12697,6 +14267,7 @@ * @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 */ @@ -12755,6 +14326,14 @@ */ 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 @@ -12813,6 +14392,8 @@ 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; }; @@ -12862,6 +14443,9 @@ 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; @@ -12925,6 +14509,11 @@ 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: @@ -12970,6 +14559,11 @@ 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) { case "STATE_UNSPECIFIED": case 0: @@ -13014,6 +14608,7 @@ 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; @@ -13030,6 +14625,8 @@ 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; }; @@ -13236,6 +14833,7 @@ return "type: enum value expected"; case 0: case 1: + case 2: break; } return null; @@ -13276,6 +14874,10 @@ case 1: message.type = 1; break; + case "AVRO": + case 2: + message.type = 2; + break; } return message; }; @@ -13594,6 +15196,7 @@ return "databaseDumpType: enum value expected"; case 0: case 1: + case 2: break; } return null; @@ -13654,6 +15257,10 @@ case 1: message.databaseDumpType = 1; break; + case "AVRO": + case 2: + message.databaseDumpType = 2; + break; } return message; }; @@ -13739,6 +15346,7 @@ * @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 */ /** @@ -13750,6 +15358,7 @@ * @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) @@ -13804,6 +15413,14 @@ */ 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 @@ -13840,6 +15457,9 @@ $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; }; @@ -13892,6 +15512,11 @@ 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; @@ -13949,6 +15574,7 @@ case 2: case 3: case 4: + case 5: break; } if (message.serviceRevision != null && message.hasOwnProperty("serviceRevision")) { @@ -13959,6 +15585,13 @@ 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; }; @@ -14007,6 +15640,10 @@ case 4: message.state = 4; break; + case "RESTORING": + case 5: + message.state = 5; + break; } if (object.serviceRevision != null) { if (typeof object.serviceRevision !== "object") @@ -14015,6 +15652,13 @@ } 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; }; @@ -14031,6 +15675,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.restoringServices = []; if (options.defaults) { object.name = ""; object.createTime = null; @@ -14051,6 +15697,11 @@ 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; }; @@ -14074,6 +15725,7 @@ * @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); @@ -14082,6 +15734,7 @@ values[valuesById[2] = "DELETING"] = 2; values[valuesById[3] = "ACTIVE"] = 3; values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "RESTORING"] = 5; return values; })(); @@ -18562,6 +20215,7 @@ return "databaseDumpType: enum value expected"; case 0: case 1: + case 2: break; } return null; @@ -18594,6 +20248,10 @@ case 1: message.databaseDumpType = 1; break; + case "AVRO": + case 2: + message.databaseDumpType = 2; + break; } return message; }; @@ -19827,11 +21485,13 @@ * @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; })(); diff --git a/protos/protos.json b/protos/protos.json index d384611..090e675 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -1456,8 +1456,9 @@ "java_multiple_files": true, "java_outer_classname": "MetastoreProto", "java_package": "com.google.cloud.metastore.v1alpha", - "(google.api.resource_definition).type": "compute.googleapis.com/Network", - "(google.api.resource_definition).pattern": "projects/{project}/global/networks/{network}" + "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": { @@ -1935,6 +1936,27 @@ "options": { "(google.api.field_behavior)": "IMMUTABLE" } + }, + "encryptionConfig": { + "type": "EncryptionConfig", + "id": 20, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "networkConfig": { + "type": "NetworkConfig", + "id": 21, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "databaseType": { + "type": "DatabaseType", + "id": 22, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } } }, "nested": { @@ -1963,6 +1985,13 @@ "CANARY": 1, "STABLE": 2 } + }, + "DatabaseType": { + "values": { + "DATABASE_TYPE_UNSPECIFIED": 0, + "MYSQL": 1, + "SPANNER": 2 + } } } }, @@ -1971,6 +2000,10 @@ "dataCatalogConfig": { "type": "DataCatalogConfig", "id": 1 + }, + "dataplexConfig": { + "type": "DataplexConfig", + "id": 2 } } }, @@ -1982,6 +2015,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": { @@ -2011,6 +2064,24 @@ "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 + } } } }, @@ -2045,6 +2116,73 @@ } } }, + "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.resource_reference).type": "compute.googleapis.com/Subnetwork" + } + }, + "endpointUri": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, "MetadataManagementActivity": { "fields": { "metadataExports": { @@ -2110,6 +2248,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, @@ -2268,6 +2413,14 @@ "description": { "type": "string", "id": 6 + }, + "restoringServices": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -2277,7 +2430,8 @@ "CREATING": 1, "DELETING": 2, "ACTIVE": 3, - "FAILED": 4 + "FAILED": 4, + "RESTORING": 5 } } } @@ -2897,7 +3051,8 @@ "Type": { "values": { "TYPE_UNSPECIFIED": 0, - "MYSQL": 1 + "MYSQL": 1, + "AVRO": 2 } } } diff --git a/samples/generated/v1alpha/dataproc_metastore.create_backup.js b/samples/generated/v1alpha/dataproc_metastore.create_backup.js index 50a1f50..31c203c 100644 --- a/samples/generated/v1alpha/dataproc_metastore.create_backup.js +++ b/samples/generated/v1alpha/dataproc_metastore.create_backup.js @@ -28,7 +28,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/samples/generated/v1alpha/dataproc_metastore.create_metadata_import.js b/samples/generated/v1alpha/dataproc_metastore.create_metadata_import.js index 0376e74..5bc646f 100644 --- a/samples/generated/v1alpha/dataproc_metastore.create_metadata_import.js +++ b/samples/generated/v1alpha/dataproc_metastore.create_metadata_import.js @@ -28,7 +28,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/samples/generated/v1alpha/dataproc_metastore.export_metadata.js b/samples/generated/v1alpha/dataproc_metastore.export_metadata.js index 1bd7857..dc26474 100644 --- a/samples/generated/v1alpha/dataproc_metastore.export_metadata.js +++ b/samples/generated/v1alpha/dataproc_metastore.export_metadata.js @@ -34,7 +34,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/samples/generated/v1alpha/dataproc_metastore.restore_service.js b/samples/generated/v1alpha/dataproc_metastore.restore_service.js index aef7278..a1ea8be 100644 --- a/samples/generated/v1alpha/dataproc_metastore.restore_service.js +++ b/samples/generated/v1alpha/dataproc_metastore.restore_service.js @@ -28,13 +28,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/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json b/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json index 0ee7f01..151ca07 100644 --- a/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json +++ b/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json @@ -651,7 +651,7 @@ "regionTag": "metastore_v1alpha_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", diff --git a/src/v1alpha/dataproc_metastore_client.ts b/src/v1alpha/dataproc_metastore_client.ts index 63838d6..9a85450 100644 --- a/src/v1alpha/dataproc_metastore_client.ts +++ b/src/v1alpha/dataproc_metastore_client.ts @@ -43,8 +43,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. @@ -185,6 +185,9 @@ export class DataprocMetastoreClient { backupPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/services/{service}/backups/{backup}' ), + lakePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}' + ), locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), @@ -1260,7 +1263,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. @@ -1588,7 +1591,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 requests @@ -1743,12 +1746,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.v1alpha.Restore.RestoreType} [request.restoreType] * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`. * @param {string} [request.requestId] @@ -1895,7 +1898,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. @@ -1903,7 +1906,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. @@ -3010,6 +3013,55 @@ export class DataprocMetastoreClient { return this.pathTemplates.backupPathTemplate.match(backupName).backup; } + /** + * 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. * diff --git a/test/gapic_dataproc_metastore_v1alpha.ts b/test/gapic_dataproc_metastore_v1alpha.ts index 055456e..300cab6 100644 --- a/test/gapic_dataproc_metastore_v1alpha.ts +++ b/test/gapic_dataproc_metastore_v1alpha.ts @@ -3457,6 +3457,71 @@ describe('v1alpha.DataprocMetastoreClient', () => { }); }); + describe('lake', () => { + const fakePath = '/rendered/path/lake'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + }; + const client = + new dataprocmetastoreModule.v1alpha.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 = {