From 81fa610895fe709cbb7429896493a67407a6343c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 11:04:42 +0530 Subject: [PATCH] fix!: An existing method `UpdateVehicleLocation` is removed from service `VehicleService` (#2037) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add support for multi region encryption config docs: fix linting for several doc comments PiperOrigin-RevId: 630422337 Source-Link: https://github.com/googleapis/googleapis/commit/65db386b43905c561686b58344c5b620a10ed808 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b798ca9f56e2ad3e0d14982b68b6724d1c3d62b5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjc5OGNhOWY1NmUyYWQzZTBkMTQ5ODJiNjhiNjcyNGQxYzNkNjJiNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix!: An existing method `UpdateVehicleLocation` is removed from service `VehicleService` fix!: An existing method `SearchFuzzedVehicles` is removed from service `VehicleService` fix!: An existing message `UpdateVehicleLocationRequest` is removed PiperOrigin-RevId: 631557549 Source-Link: https://github.com/googleapis/googleapis/commit/3d50414a7ff3f0b8ffe8ad7858257396e4f18131 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5ce63d4e636a975175bde2d16c15e70dd5a81ff4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWNlNjNkNGU2MzZhOTc1MTc1YmRlMmQxNmMxNWU3MGRkNWE4MWZmNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: surbhigarg92 --- .../spanner/admin/database/v1/backup.proto | 299 ++++++++++------- .../spanner/admin/database/v1/common.proto | 40 ++- .../database/v1/spanner_database_admin.proto | 266 ++++++++++------ .../spanner/admin/instance/v1/common.proto | 2 +- .../spanner/executor/v1/cloud_executor.proto | 2 +- .../google/spanner/v1/commit_response.proto | 2 +- protos/google/spanner/v1/keys.proto | 2 +- protos/google/spanner/v1/mutation.proto | 2 +- protos/google/spanner/v1/query_plan.proto | 2 +- protos/google/spanner/v1/result_set.proto | 2 +- protos/google/spanner/v1/spanner.proto | 2 +- protos/google/spanner/v1/transaction.proto | 2 +- protos/google/spanner/v1/type.proto | 2 +- protos/protos.d.ts | 30 ++ protos/protos.js | 204 ++++++++++++ protos/protos.json | 43 +++ src/v1/database_admin_client.ts | 301 ++++++++++-------- 17 files changed, 848 insertions(+), 355 deletions(-) diff --git a/protos/google/spanner/admin/database/v1/backup.proto b/protos/google/spanner/admin/database/v1/backup.proto index fce69a2f3..bb8ef4d55 100644 --- a/protos/google/spanner/admin/database/v1/backup.proto +++ b/protos/google/spanner/admin/database/v1/backup.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -51,14 +51,14 @@ message Backup { READY = 2; } - // Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - // Name of the database from which this backup was - // created. This needs to be in the same instance as the backup. - // Values are of the form + // Required for the + // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + // operation. Name of the database from which this backup was created. This + // needs to be in the same instance as the backup. Values are of the form // `projects//instances//databases/`. string database = 2 [(google.api.resource_reference) = { - type: "spanner.googleapis.com/Database" - }]; + type: "spanner.googleapis.com/Database" + }]; // The backup will contain an externally consistent copy of the database at // the timestamp specified by `version_time`. If `version_time` is not @@ -66,7 +66,8 @@ message Backup { // backup. google.protobuf.Timestamp version_time = 9; - // Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + // Required for the + // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] // operation. The expiration time of the backup, with microseconds // granularity that must be at least 6 hours and at most 366 days // from the time the CreateBackup request is processed. Once the `expire_time` @@ -74,8 +75,11 @@ message Backup { // Spanner to free the resources used by the backup. google.protobuf.Timestamp expire_time = 3; - // Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - // Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation. + // Output only for the + // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + // operation. Required for the + // [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] + // operation. // // A globally unique identifier for the backup which cannot be // changed. Values are of the form @@ -89,10 +93,12 @@ message Backup { // `projects//instances/`. string name = 1; - // Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + // Output only. The time the + // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] // request is received. If the request does not specify `version_time`, the // `version_time` of the backup will be equivalent to the `create_time`. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Size of the backup in bytes. int64 size_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -115,10 +121,21 @@ message Backup { ]; // Output only. The encryption information for the backup. - EncryptionInfo encryption_info = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + EncryptionInfo encryption_info = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The encryption information for the backup, whether it is + // protected by one or more KMS keys. The information includes all Cloud + // KMS key versions used to encrypt the backup. The `encryption_status' field + // inside of each `EncryptionInfo` is not populated. At least one of the key + // versions must be available for the backup to be restored. If a key version + // is revoked in the middle of a restore, the restore behavior is undefined. + repeated EncryptionInfo encryption_information = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The database dialect information for the backup. - DatabaseDialect database_dialect = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + DatabaseDialect database_dialect = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The names of the destination backups being created by copying // this source backup. The backup names are of the form @@ -129,9 +146,7 @@ message Backup { // destination backup is deleted), the reference to the backup is removed. repeated string referencing_backups = 11 [ (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "spanner.googleapis.com/Backup" - } + (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" } ]; // Output only. The max allowed expiration time of the backup, with @@ -139,10 +154,12 @@ message Backup { // multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or // copying an existing backup, the expiration time specified must be // less than `Backup.max_expire_time`. - google.protobuf.Timestamp max_expire_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp max_expire_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; } -// The request for [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. +// The request for +// [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. message CreateBackupRequest { // Required. The name of the instance in which the backup will be // created. This must be the same instance that contains the database the @@ -165,29 +182,31 @@ message CreateBackupRequest { // Required. The backup to create. Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. The encryption configuration used to encrypt the backup. If this field is - // not specified, the backup will use the same - // encryption configuration as the database by default, namely - // [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] = - // `USE_DATABASE_ENCRYPTION`. - CreateBackupEncryptionConfig encryption_config = 4 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The encryption configuration used to encrypt the backup. If this + // field is not specified, the backup will use the same encryption + // configuration as the database by default, namely + // [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + // = `USE_DATABASE_ENCRYPTION`. + CreateBackupEncryptionConfig encryption_config = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Metadata type for the operation returned by // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. message CreateBackupMetadata { // The name of the backup being created. - string name = 1 [(google.api.resource_reference) = { - type: "spanner.googleapis.com/Backup" - }]; + string name = 1 [ + (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" } + ]; // The name of the database the backup is created from. string database = 2 [(google.api.resource_reference) = { - type: "spanner.googleapis.com/Database" - }]; + type: "spanner.googleapis.com/Database" + }]; // The progress of the - // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + // operation. OperationProgress progress = 3; // The time at which cancellation of this operation was received. @@ -205,10 +224,11 @@ message CreateBackupMetadata { google.protobuf.Timestamp cancel_time = 4; } -// The request for [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup]. +// The request for +// [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup]. message CopyBackupRequest { - // Required. The name of the destination instance that will contain the backup copy. - // Values are of the form: `projects//instances/`. + // Required. The name of the destination instance that will contain the backup + // copy. Values are of the form: `projects//instances/`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -229,9 +249,7 @@ message CopyBackupRequest { // `projects//instances//backups/`. string source_backup = 3 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "spanner.googleapis.com/Backup" - } + (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" } ]; // Required. The expiration time of the backup in microsecond granularity. @@ -239,35 +257,38 @@ message CopyBackupRequest { // from the `create_time` of the source backup. Once the `expire_time` has // passed, the backup is eligible to be automatically deleted by Cloud Spanner // to free the resources used by the backup. - google.protobuf.Timestamp expire_time = 4 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The encryption configuration used to encrypt the backup. If this field is - // not specified, the backup will use the same - // encryption configuration as the source backup by default, namely - // [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] = - // `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. - CopyBackupEncryptionConfig encryption_config = 5 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Timestamp expire_time = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The encryption configuration used to encrypt the backup. If this + // field is not specified, the backup will use the same encryption + // configuration as the source backup by default, namely + // [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] + // = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. + CopyBackupEncryptionConfig encryption_config = 5 + [(google.api.field_behavior) = OPTIONAL]; } -// Metadata type for the google.longrunning.Operation returned by +// Metadata type for the operation returned by // [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup]. message CopyBackupMetadata { // The name of the backup being created through the copy operation. // Values are of the form // `projects//instances//backups/`. - string name = 1 [(google.api.resource_reference) = { - type: "spanner.googleapis.com/Backup" - }]; + string name = 1 [ + (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" } + ]; // The name of the source backup that is being copied. // Values are of the form // `projects//instances//backups/`. - string source_backup = 2 [(google.api.resource_reference) = { - type: "spanner.googleapis.com/Backup" - }]; + string source_backup = 2 [ + (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" } + ]; // The progress of the - // [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation. + // [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] + // operation. OperationProgress progress = 3; // The time at which cancellation of CopyBackup operation was received. @@ -285,7 +306,8 @@ message CopyBackupMetadata { google.protobuf.Timestamp cancel_time = 4; } -// The request for [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup]. +// The request for +// [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup]. message UpdateBackupRequest { // Required. The backup to update. `backup.name`, and the fields to be updated // as specified by `update_mask` are required. Other fields are ignored. @@ -298,36 +320,36 @@ message UpdateBackupRequest { // resource, not to the request message. The field mask must always be // specified; this prevents any future fields from being erased accidentally // by clients that do not know about them. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } -// The request for [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup]. +// The request for +// [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup]. message GetBackupRequest { // Required. Name of the backup. // Values are of the form // `projects//instances//backups/`. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "spanner.googleapis.com/Backup" - } + (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" } ]; } -// The request for [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup]. +// The request for +// [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup]. message DeleteBackupRequest { // Required. Name of the backup to delete. // Values are of the form // `projects//instances//backups/`. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "spanner.googleapis.com/Backup" - } + (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" } ]; } -// The request for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]. +// The request for +// [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]. message ListBackupsRequest { // Required. The instance to list backups from. Values are of the // form `projects//instances/`. @@ -346,7 +368,9 @@ message ListBackupsRequest { // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. // Colon `:` is the contains operator. Filter rules are not case sensitive. // - // The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering: + // The following fields in the + // [Backup][google.spanner.admin.database.v1.Backup] are eligible for + // filtering: // // * `name` // * `database` @@ -380,21 +404,23 @@ message ListBackupsRequest { int32 page_size = 3; // If non-empty, `page_token` should contain a - // [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a - // previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same `parent` and with the same - // `filter`. + // [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] + // from a previous + // [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] + // to the same `parent` and with the same `filter`. string page_token = 4; } -// The response for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]. +// The response for +// [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]. message ListBackupsResponse { // The list of matching backups. Backups returned are ordered by `create_time` // in descending order, starting from the most recent `create_time`. repeated Backup backups = 1; // `next_page_token` can be sent in a subsequent - // [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more - // of the matching backups. + // [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] + // call to fetch more of the matching backups. string next_page_token = 2; } @@ -424,7 +450,9 @@ message ListBackupOperationsRequest { // * `name` - The name of the long-running operation // * `done` - False if the operation is in progress, else true. // * `metadata.@type` - the type of metadata. For example, the type string - // for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is + // for + // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + // is // `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. // * `metadata.` - any field in metadata.value. // `metadata.@type` must be specified first if filtering on metadata @@ -442,14 +470,15 @@ message ListBackupOperationsRequest { // * `done:true` - The operation is complete. // * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ // `metadata.database:prod` - Returns operations where: - // * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - // * The database the backup was taken from has a name containing the - // string "prod". + // * The operation's metadata type is + // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + // * The source database name of backup contains the string "prod". // * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ // `(metadata.name:howl) AND` \ // `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ // `(error:*)` - Returns operations where: - // * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + // * The operation's metadata type is + // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. // * The backup name contains the string "howl". // * The operation started before 2018-03-28T14:50:00Z. // * The operation resulted in an error. @@ -457,9 +486,9 @@ message ListBackupOperationsRequest { // `(metadata.source_backup:test) AND` \ // `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ // `(error:*)` - Returns operations where: - // * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. - // * The source backup of the copied backup name contains the string - // "test". + // * The operation's metadata type is + // [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + // * The source backup name contains the string "test". // * The operation started before 2022-01-18T14:50:00Z. // * The operation resulted in an error. // * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ @@ -469,12 +498,13 @@ message ListBackupOperationsRequest { // `(metadata.source_backup:test_bkp)) AND` \ // `(error:*)` - Returns operations where: // * The operation's metadata matches either of criteria: - // * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] AND the - // database the backup was taken from has name containing string + // * The operation's metadata type is + // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + // AND the source database name of the backup contains the string // "test_db" - // * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] AND the - // backup the backup was copied from has name containing string - // "test_bkp" + // * The operation's metadata type is + // [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] + // AND the source backup name contains the string "test_bkp" // * The operation resulted in an error. string filter = 2; @@ -484,8 +514,9 @@ message ListBackupOperationsRequest { // If non-empty, `page_token` should contain a // [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token] - // from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the - // same `parent` and with the same `filter`. + // from a previous + // [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] + // to the same `parent` and with the same `filter`. string page_token = 4; } @@ -512,25 +543,26 @@ message ListBackupOperationsResponse { // Information about a backup. message BackupInfo { // Name of the backup. - string backup = 1 [(google.api.resource_reference) = { - type: "spanner.googleapis.com/Backup" - }]; + string backup = 1 [ + (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" } + ]; // The backup contains an externally consistent copy of `source_database` at // the timestamp specified by `version_time`. If the - // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - // `version_time`, the `version_time` of the backup is equivalent to the - // `create_time`. + // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + // request did not specify `version_time`, the `version_time` of the backup is + // equivalent to the `create_time`. google.protobuf.Timestamp version_time = 4; - // The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - // received. + // The time the + // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + // request was received. google.protobuf.Timestamp create_time = 2; // Name of the database the backup was created from. string source_database = 3 [(google.api.resource_reference) = { - type: "spanner.googleapis.com/Database" - }]; + type: "spanner.googleapis.com/Database" + }]; } // Encryption configuration for the backup to create. @@ -542,9 +574,10 @@ message CreateBackupEncryptionConfig { // Use the same encryption configuration as the database. This is the // default option when - // [encryption_config][google.spanner.admin.database.v1.CreateBackupEncryptionConfig] is empty. - // For example, if the database is using `Customer_Managed_Encryption`, the - // backup will be using the same Cloud KMS key as the database. + // [encryption_config][google.spanner.admin.database.v1.CreateBackupEncryptionConfig] + // is empty. For example, if the database is using + // `Customer_Managed_Encryption`, the backup will be using the same Cloud + // KMS key as the database. USE_DATABASE_ENCRYPTION = 1; // Use Google default encryption. @@ -560,8 +593,8 @@ message CreateBackupEncryptionConfig { // Optional. The Cloud KMS key that will be used to protect the backup. // This field should be set only when - // [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] is - // `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form + // [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + // is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form // `projects//locations//keyRings//cryptoKeys/`. string kms_key_name = 2 [ (google.api.field_behavior) = OPTIONAL, @@ -569,6 +602,28 @@ message CreateBackupEncryptionConfig { type: "cloudkms.googleapis.com/CryptoKey" } ]; + + // Optional. Specifies the KMS configuration for the one or more keys used to + // protect the backup. Values are of the form + // `projects//locations//keyRings//cryptoKeys/`. + // + // The keys referenced by kms_key_names must fully cover all + // regions of the backup's instance configuration. Some examples: + // * For single region instance configs, specify a single regional + // location KMS key. + // * For multi-regional instance configs of type GOOGLE_MANAGED, + // either specify a multi-regional location KMS key or multiple regional + // location KMS keys that cover all regions in the instance config. + // * For an instance config of type USER_MANAGED, please specify only + // regional location KMS keys to cover each region in the instance config. + // Multi-regional location KMS keys are not supported for USER_MANAGED + // instance configs. + repeated string kms_key_names = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; } // Encryption configuration for the copied backup. @@ -578,17 +633,20 @@ message CopyBackupEncryptionConfig { // Unspecified. Do not use. ENCRYPTION_TYPE_UNSPECIFIED = 0; - // This is the default option for [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] - // when [encryption_config][google.spanner.admin.database.v1.CopyBackupEncryptionConfig] is not specified. - // For example, if the source backup is using `Customer_Managed_Encryption`, - // the backup will be using the same Cloud KMS key as the source backup. + // This is the default option for + // [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] + // when + // [encryption_config][google.spanner.admin.database.v1.CopyBackupEncryptionConfig] + // is not specified. For example, if the source backup is using + // `Customer_Managed_Encryption`, the backup will be using the same Cloud + // KMS key as the source backup. USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1; // Use Google default encryption. GOOGLE_DEFAULT_ENCRYPTION = 2; - // Use customer managed encryption. If specified, `kms_key_name` - // must contain a valid Cloud KMS key. + // Use customer managed encryption. If specified, either `kms_key_name` or + // `kms_key_names` must contain valid Cloud KMS key(s). CUSTOMER_MANAGED_ENCRYPTION = 3; } @@ -597,8 +655,8 @@ message CopyBackupEncryptionConfig { // Optional. The Cloud KMS key that will be used to protect the backup. // This field should be set only when - // [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] is - // `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form + // [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] + // is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form // `projects//locations//keyRings//cryptoKeys/`. string kms_key_name = 2 [ (google.api.field_behavior) = OPTIONAL, @@ -606,4 +664,27 @@ message CopyBackupEncryptionConfig { type: "cloudkms.googleapis.com/CryptoKey" } ]; + + // Optional. Specifies the KMS configuration for the one or more keys used to + // protect the backup. Values are of the form + // `projects//locations//keyRings//cryptoKeys/`. + // Kms keys specified can be in any order. + // + // The keys referenced by kms_key_names must fully cover all + // regions of the backup's instance configuration. Some examples: + // * For single region instance configs, specify a single regional + // location KMS key. + // * For multi-regional instance configs of type GOOGLE_MANAGED, + // either specify a multi-regional location KMS key or multiple regional + // location KMS keys that cover all regions in the instance config. + // * For an instance config of type USER_MANAGED, please specify only + // regional location KMS keys to cover each region in the instance config. + // Multi-regional location KMS keys are not supported for USER_MANAGED + // instance configs. + repeated string kms_key_names = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; } diff --git a/protos/google/spanner/admin/database/v1/common.proto b/protos/google/spanner/admin/database/v1/common.proto index 32d7519e3..a91012306 100644 --- a/protos/google/spanner/admin/database/v1/common.proto +++ b/protos/google/spanner/admin/database/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -58,8 +58,27 @@ message EncryptionConfig { // the database. Values are of the form // `projects//locations//keyRings//cryptoKeys/`. string kms_key_name = 2 [(google.api.resource_reference) = { - type: "cloudkms.googleapis.com/CryptoKey" - }]; + type: "cloudkms.googleapis.com/CryptoKey" + }]; + + // Specifies the KMS configuration for the one or more keys used to encrypt + // the database. Values are of the form + // `projects//locations//keyRings//cryptoKeys/`. + // + // The keys referenced by kms_key_names must fully cover all + // regions of the database instance configuration. Some examples: + // * For single region database instance configs, specify a single regional + // location KMS key. + // * For multi-regional database instance configs of type GOOGLE_MANAGED, + // either specify a multi-regional location KMS key or multiple regional + // location KMS keys that cover all regions in the instance config. + // * For a database instance config of type USER_MANAGED, please specify only + // regional location KMS keys to cover each region in the instance config. + // Multi-regional location KMS keys are not supported for USER_MANAGED + // instance configs. + repeated string kms_key_names = 3 [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + }]; } // Encryption information for a Cloud Spanner database or backup. @@ -83,13 +102,14 @@ message EncryptionInfo { // Output only. The type of encryption. Type encryption_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. If present, the status of a recent encrypt/decrypt call on underlying data - // for this database or backup. Regardless of status, data is always encrypted - // at rest. - google.rpc.Status encryption_status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. If present, the status of a recent encrypt/decrypt call on + // underlying data for this database or backup. Regardless of status, data is + // always encrypted at rest. + google.rpc.Status encryption_status = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A Cloud KMS key version that is being used to protect the database or - // backup. + // Output only. A Cloud KMS key version that is being used to protect the + // database or backup. string kms_key_version = 2 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -104,7 +124,7 @@ enum DatabaseDialect { // GOOGLE_STANDARD_SQL dialect. DATABASE_DIALECT_UNSPECIFIED = 0; - // Google standard SQL. + // GoogleSQL supported SQL. GOOGLE_STANDARD_SQL = 1; // PostgreSQL supported SQL. diff --git a/protos/google/spanner/admin/database/v1/spanner_database_admin.proto b/protos/google/spanner/admin/database/v1/spanner_database_admin.proto index a522c08c1..0d4e26170 100644 --- a/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +++ b/protos/google/spanner/admin/database/v1/spanner_database_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ option (google.api.resource_definition) = { // The Cloud Spanner Database Admin API can be used to: // * create, drop, and list databases // * update the schema of pre-existing databases -// * create, delete and list backups for a database +// * create, delete, copy and list backups for a database // * restore a database from an existing backup service DatabaseAdmin { option (google.api.default_host) = "spanner.googleapis.com"; @@ -67,10 +67,11 @@ service DatabaseAdmin { // have a name of the format `/operations/` and // can be used to track preparation of the database. The // [metadata][google.longrunning.Operation.metadata] field type is - // [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The - // [response][google.longrunning.Operation.response] field type is + // [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. + // The [response][google.longrunning.Operation.response] field type is // [Database][google.spanner.admin.database.v1.Database], if successful. - rpc CreateDatabase(CreateDatabaseRequest) returns (google.longrunning.Operation) { + rpc CreateDatabase(CreateDatabaseRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/instances/*}/databases" body: "*" @@ -145,8 +146,10 @@ service DatabaseAdmin { // the format `/operations/` and can be used to // track execution of the schema change(s). The // [metadata][google.longrunning.Operation.metadata] field type is - // [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response. - rpc UpdateDatabaseDdl(UpdateDatabaseDdlRequest) returns (google.longrunning.Operation) { + // [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. + // The operation has no response. + rpc UpdateDatabaseDdl(UpdateDatabaseDdlRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{database=projects/*/instances/*/databases/*}/ddl" body: "*" @@ -187,7 +190,8 @@ service DatabaseAdmin { // permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. // For backups, authorization requires `spanner.backups.setIamPolicy` // permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy" body: "*" @@ -207,7 +211,8 @@ service DatabaseAdmin { // [resource][google.iam.v1.GetIamPolicyRequest.resource]. // For backups, authorization requires `spanner.backups.getIamPolicy` // permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy" body: "*" @@ -229,7 +234,8 @@ service DatabaseAdmin { // Calling this method on a backup that does not exist will // result in a NOT_FOUND error if the user has // `spanner.backups.list` permission on the containing instance. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1/{resource=projects/*/instances/*/databases/*}:testIamPermissions" body: "*" @@ -251,12 +257,12 @@ service DatabaseAdmin { // `projects//instances//backups//operations/` // and can be used to track creation of the backup. The // [metadata][google.longrunning.Operation.metadata] field type is - // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The - // [response][google.longrunning.Operation.response] field type is - // [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the - // creation and delete the backup. - // There can be only one pending backup creation per database. Backup creation - // of different databases can run concurrently. + // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + // The [response][google.longrunning.Operation.response] field type is + // [Backup][google.spanner.admin.database.v1.Backup], if successful. + // Cancelling the returned operation will stop the creation and delete the + // backup. There can be only one pending backup creation per database. Backup + // creation of different databases can run concurrently. rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/instances/*}/backups" @@ -278,22 +284,25 @@ service DatabaseAdmin { // The [metadata][google.longrunning.Operation.metadata] field type is // [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. // The [response][google.longrunning.Operation.response] field type is - // [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the - // copying and delete the backup. - // Concurrent CopyBackup requests can run on the same source backup. + // [Backup][google.spanner.admin.database.v1.Backup], if successful. + // Cancelling the returned operation will stop the copying and delete the + // destination backup. Concurrent CopyBackup requests can run on the same + // source backup. rpc CopyBackup(CopyBackupRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/instances/*}/backups:copy" body: "*" }; - option (google.api.method_signature) = "parent,backup_id,source_backup,expire_time"; + option (google.api.method_signature) = + "parent,backup_id,source_backup,expire_time"; option (google.longrunning.operation_info) = { response_type: "google.spanner.admin.database.v1.Backup" metadata_type: "google.spanner.admin.database.v1.CopyBackupMetadata" }; } - // Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + // Gets metadata on a pending or completed + // [Backup][google.spanner.admin.database.v1.Backup]. rpc GetBackup(GetBackupRequest) returns (Backup) { option (google.api.http) = { get: "/v1/{name=projects/*/instances/*/backups/*}" @@ -301,7 +310,8 @@ service DatabaseAdmin { option (google.api.method_signature) = "name"; } - // Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + // Updates a pending or completed + // [Backup][google.spanner.admin.database.v1.Backup]. rpc UpdateBackup(UpdateBackupRequest) returns (Backup) { option (google.api.http) = { patch: "/v1/{backup.name=projects/*/instances/*/backups/*}" @@ -310,7 +320,8 @@ service DatabaseAdmin { option (google.api.method_signature) = "backup,update_mask"; } - // Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + // Deletes a pending or completed + // [Backup][google.spanner.admin.database.v1.Backup]. rpc DeleteBackup(DeleteBackupRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/instances/*/backups/*}" @@ -345,7 +356,8 @@ service DatabaseAdmin { // Once the restore operation completes, a new restore operation can be // initiated, without waiting for the optimize operation associated with the // first restore to complete. - rpc RestoreDatabase(RestoreDatabaseRequest) returns (google.longrunning.Operation) { + rpc RestoreDatabase(RestoreDatabaseRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/instances/*}/databases:restore" body: "*" @@ -365,7 +377,8 @@ service DatabaseAdmin { // `metadata.type_url` describes the type of the metadata. Operations returned // include those that have completed/failed/canceled within the last 7 days, // and pending operations. - rpc ListDatabaseOperations(ListDatabaseOperationsRequest) returns (ListDatabaseOperationsResponse) { + rpc ListDatabaseOperations(ListDatabaseOperationsRequest) + returns (ListDatabaseOperationsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/instances/*}/databaseOperations" }; @@ -382,7 +395,8 @@ service DatabaseAdmin { // and pending operations. Operations returned are ordered by // `operation.metadata.value.progress.start_time` in descending order starting // from the most recently started operation. - rpc ListBackupOperations(ListBackupOperationsRequest) returns (ListBackupOperationsResponse) { + rpc ListBackupOperations(ListBackupOperationsRequest) + returns (ListBackupOperationsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/instances/*}/backupOperations" }; @@ -390,7 +404,8 @@ service DatabaseAdmin { } // Lists Cloud Spanner database roles. - rpc ListDatabaseRoles(ListDatabaseRolesRequest) returns (ListDatabaseRolesResponse) { + rpc ListDatabaseRoles(ListDatabaseRolesRequest) + returns (ListDatabaseRolesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/instances/*/databases/*}/databaseRoles" }; @@ -452,7 +467,8 @@ message Database { State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. If exists, the time at which the database creation started. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Applicable only for restored databases. Contains information // about the restore source. @@ -462,32 +478,37 @@ message Database { // field contains the encryption configuration for the database. // For databases that are using Google default or other types of encryption, // this field is empty. - EncryptionConfig encryption_config = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + EncryptionConfig encryption_config = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. For databases that are using customer managed encryption, this // field contains the encryption information for the database, such as - // encryption state and the Cloud KMS key versions that are in use. + // all Cloud KMS key versions that are in use. The `encryption_status' field + // inside of each `EncryptionInfo` is not populated. // // For databases that are using Google default or other types of encryption, // this field is empty. // // This field is propagated lazily from the backend. There might be a delay // from when a key version is being used and when it appears in this field. - repeated EncryptionInfo encryption_info = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated EncryptionInfo encryption_info = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The period in which Cloud Spanner retains all versions of data // for the database. This is the same as the value of version_retention_period // database option set using - // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour, - // if not set. - string version_retention_period = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. + // Defaults to 1 hour, if not set. + string version_retention_period = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Earliest timestamp at which older versions of the data can be // read. This value is continuously updated by Cloud Spanner and becomes stale // the moment it is queried. If you are using this value to recover data, make // sure to account for the time from the moment when the value is queried to // the moment when you initiate the recovery. - google.protobuf.Timestamp earliest_version_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp earliest_version_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The read-write region which contains the database's leader // replicas. @@ -498,10 +519,13 @@ message Database { string default_leader = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The dialect of the Cloud Spanner Database. - DatabaseDialect database_dialect = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + DatabaseDialect database_dialect = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Whether drop protection is enabled for this database. Defaults to false, - // if not set. + // if not set. For more details, please see how to [prevent accidental + // database + // deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion). bool enable_drop_protection = 11; // Output only. If true, the database is being updated. If false, there are no @@ -509,7 +533,8 @@ message Database { bool reconciling = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. +// The request for +// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. message ListDatabasesRequest { // Required. The instance whose databases should be listed. // Values are of the form `projects//instances/`. @@ -525,23 +550,26 @@ message ListDatabasesRequest { int32 page_size = 3; // If non-empty, `page_token` should contain a - // [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a - // previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse]. + // [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] + // from a previous + // [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse]. string page_token = 4; } -// The response for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. +// The response for +// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. message ListDatabasesResponse { // Databases that matched the request. repeated Database databases = 1; // `next_page_token` can be sent in a subsequent - // [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more - // of the matching databases. + // [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] + // call to fetch more of the matching databases. string next_page_token = 2; } -// The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. +// The request for +// [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. message CreateDatabaseRequest { // Required. The name of the instance that will serve the new database. // Values are of the form `projects//instances/`. @@ -565,10 +593,11 @@ message CreateDatabaseRequest { // if there is an error in any statement, the database is not created. repeated string extra_statements = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The encryption configuration for the database. If this field is not - // specified, Cloud Spanner will encrypt/decrypt all data at rest using + // Optional. The encryption configuration for the database. If this field is + // not specified, Cloud Spanner will encrypt/decrypt all data at rest using // Google default encryption. - EncryptionConfig encryption_config = 4 [(google.api.field_behavior) = OPTIONAL]; + EncryptionConfig encryption_config = 4 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The dialect of the Cloud Spanner Database. DatabaseDialect database_dialect = 5 [(google.api.field_behavior) = OPTIONAL]; @@ -596,11 +625,12 @@ message CreateDatabaseRequest { message CreateDatabaseMetadata { // The database being created. string database = 1 [(google.api.resource_reference) = { - type: "spanner.googleapis.com/Database" - }]; + type: "spanner.googleapis.com/Database" + }]; } -// The request for [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase]. +// The request for +// [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase]. message GetDatabaseRequest { // Required. The name of the requested database. Values are of the form // `projects//instances//databases/`. @@ -657,8 +687,8 @@ message UpdateDatabaseMetadata { // Each batch of statements is assigned a name which can be used with // the [Operations][google.longrunning.Operations] API to monitor // progress. See the -// [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more -// details. +// [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] +// field for more details. message UpdateDatabaseDdlRequest { // Required. The database to update. string database = 1 [ @@ -678,18 +708,20 @@ message UpdateDatabaseDdlRequest { // // Specifying an explicit operation ID simplifies determining // whether the statements were executed in the event that the - // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed, - // or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and - // `operation_id` fields can be combined to form the + // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] + // call is replayed, or the return value is otherwise lost: the + // [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] + // and `operation_id` fields can be combined to form the // [name][google.longrunning.Operation.name] of the resulting - // [longrunning.Operation][google.longrunning.Operation]: `/operations/`. + // [longrunning.Operation][google.longrunning.Operation]: + // `/operations/`. // // `operation_id` should be unique within the database, and must be // a valid identifier: `[a-z][a-z0-9_]*`. Note that // automatically-generated operation IDs always begin with an // underscore. If the named operation already exists, - // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns - // `ALREADY_EXISTS`. + // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] + // returns `ALREADY_EXISTS`. string operation_id = 3; // Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. @@ -735,8 +767,8 @@ message DdlStatementActionInfo { message UpdateDatabaseDdlMetadata { // The database being modified. string database = 1 [(google.api.resource_reference) = { - type: "spanner.googleapis.com/Database" - }]; + type: "spanner.googleapis.com/Database" + }]; // For an update this list contains all the statements. For an // individual statement, this list contains only that statement. @@ -766,7 +798,8 @@ message UpdateDatabaseDdlMetadata { repeated DdlStatementActionInfo actions = 6; } -// The request for [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase]. +// The request for +// [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase]. message DropDatabaseRequest { // Required. The database to be dropped. string database = 1 [ @@ -777,7 +810,8 @@ message DropDatabaseRequest { ]; } -// The request for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. +// The request for +// [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. message GetDatabaseDdlRequest { // Required. The database whose schema we wish to get. // Values are of the form @@ -790,7 +824,8 @@ message GetDatabaseDdlRequest { ]; } -// The response for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. +// The response for +// [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. message GetDatabaseDdlResponse { // A list of formatted DDL statements defining the schema of the database // specified in the request. @@ -830,7 +865,9 @@ message ListDatabaseOperationsRequest { // * `name` - The name of the long-running operation // * `done` - False if the operation is in progress, else true. // * `metadata.@type` - the type of metadata. For example, the type string - // for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is + // for + // [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] + // is // `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. // * `metadata.` - any field in metadata.value. // `metadata.@type` must be specified first, if filtering on metadata @@ -852,7 +889,8 @@ message ListDatabaseOperationsRequest { // `(metadata.name:restored_howl) AND` \ // `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ // `(error:*)` - Return operations where: - // * The operation's metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. + // * The operation's metadata type is + // [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. // * The database is restored from a backup. // * The backup name contains "backup_howl". // * The restored database's name contains "restored_howl". @@ -866,8 +904,9 @@ message ListDatabaseOperationsRequest { // If non-empty, `page_token` should contain a // [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token] - // from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the - // same `parent` and with the same `filter`. + // from a previous + // [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] + // to the same `parent` and with the same `filter`. string page_token = 4; } @@ -913,17 +952,18 @@ message RestoreDatabaseRequest { // Name of the backup from which to restore. Values are of the form // `projects//instances//backups/`. string backup = 3 [(google.api.resource_reference) = { - type: "spanner.googleapis.com/Backup" - }]; + type: "spanner.googleapis.com/Backup" + }]; } - // Optional. An encryption configuration describing the encryption type and key - // resources in Cloud KMS used to encrypt/decrypt the database to restore to. - // If this field is not specified, the restored database will use - // the same encryption configuration as the backup by default, namely - // [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] = - // `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. - RestoreDatabaseEncryptionConfig encryption_config = 4 [(google.api.field_behavior) = OPTIONAL]; + // Optional. An encryption configuration describing the encryption type and + // key resources in Cloud KMS used to encrypt/decrypt the database to restore + // to. If this field is not specified, the restored database will use the same + // encryption configuration as the backup by default, namely + // [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] + // = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. + RestoreDatabaseEncryptionConfig encryption_config = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Encryption configuration for the restored database. @@ -934,7 +974,8 @@ message RestoreDatabaseEncryptionConfig { ENCRYPTION_TYPE_UNSPECIFIED = 0; // This is the default option when - // [encryption_config][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig] is not specified. + // [encryption_config][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig] + // is not specified. USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1; // Use Google default encryption. @@ -948,10 +989,10 @@ message RestoreDatabaseEncryptionConfig { // Required. The encryption type of the restored database. EncryptionType encryption_type = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The Cloud KMS key that will be used to encrypt/decrypt the restored - // database. This field should be set only when - // [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] is - // `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form + // Optional. The Cloud KMS key that will be used to encrypt/decrypt the + // restored database. This field should be set only when + // [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] + // is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form // `projects//locations//keyRings//cryptoKeys/`. string kms_key_name = 2 [ (google.api.field_behavior) = OPTIONAL, @@ -959,6 +1000,28 @@ message RestoreDatabaseEncryptionConfig { type: "cloudkms.googleapis.com/CryptoKey" } ]; + + // Optional. Specifies the KMS configuration for the one or more keys used to + // encrypt the database. Values are of the form + // `projects//locations//keyRings//cryptoKeys/`. + // + // The keys referenced by kms_key_names must fully cover all + // regions of the database instance configuration. Some examples: + // * For single region database instance configs, specify a single regional + // location KMS key. + // * For multi-regional database instance configs of type GOOGLE_MANAGED, + // either specify a multi-regional location KMS key or multiple regional + // location KMS keys that cover all regions in the instance config. + // * For a database instance config of type USER_MANAGED, please specify only + // regional location KMS keys to cover each region in the instance config. + // Multi-regional location KMS keys are not supported for USER_MANAGED + // instance configs. + repeated string kms_key_names = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; } // Metadata type for the long-running operation returned by @@ -966,14 +1029,15 @@ message RestoreDatabaseEncryptionConfig { message RestoreDatabaseMetadata { // Name of the database being created and restored to. string name = 1 [(google.api.resource_reference) = { - type: "spanner.googleapis.com/Database" - }]; + type: "spanner.googleapis.com/Database" + }]; // The type of the restore source. RestoreSourceType source_type = 2; // Information about the source used to restore the database, as specified by - // `source` in [RestoreDatabaseRequest][google.spanner.admin.database.v1.RestoreDatabaseRequest]. + // `source` in + // [RestoreDatabaseRequest][google.spanner.admin.database.v1.RestoreDatabaseRequest]. oneof source_info { // Information about the backup used to restore the database. BackupInfo backup_info = 3; @@ -994,7 +1058,8 @@ message RestoreDatabaseMetadata { // operation completed despite cancellation. On successful cancellation, // the operation is not deleted; instead, it becomes an operation with // an [Operation.error][google.longrunning.Operation.error] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`. + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. google.protobuf.Timestamp cancel_time = 5; // If exists, the name of the long-running operation that will be used to @@ -1004,10 +1069,10 @@ message RestoreDatabaseMetadata { // `projects//instances//databases//operations/` // where the is the name of database being created and restored to. // The metadata type of the long-running operation is - // [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be - // automatically created by the system after the RestoreDatabase long-running - // operation completes successfully. This operation will not be created if the - // restore was not successful. + // [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. + // This long-running operation will be automatically created by the system + // after the RestoreDatabase long-running operation completes successfully. + // This operation will not be created if the restore was not successful. string optimize_database_operation_name = 6; } @@ -1018,8 +1083,8 @@ message RestoreDatabaseMetadata { message OptimizeRestoredDatabaseMetadata { // Name of the restored database being optimized. string name = 1 [(google.api.resource_reference) = { - type: "spanner.googleapis.com/Database" - }]; + type: "spanner.googleapis.com/Database" + }]; // The progress of the post-restore optimizations. OperationProgress progress = 2; @@ -1042,18 +1107,17 @@ message DatabaseRole { }; // Required. The name of the database role. Values are of the form - // `projects//instances//databases//databaseRoles/ - // {role}`, where `` is as specified in the `CREATE ROLE` - // DDL statement. This name can be passed to Get/Set IAMPolicy methods to - // identify the database role. + // `projects//instances//databases//databaseRoles/` + // where `` is as specified in the `CREATE ROLE` DDL statement. string name = 1 [(google.api.field_behavior) = REQUIRED]; } -// The request for [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles]. +// The request for +// [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles]. message ListDatabaseRolesRequest { // Required. The database whose roles should be listed. // Values are of the form - // `projects//instances//databases//databaseRoles`. + // `projects//instances//databases/`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1066,12 +1130,14 @@ message ListDatabaseRolesRequest { int32 page_size = 2; // If non-empty, `page_token` should contain a - // [next_page_token][google.spanner.admin.database.v1.ListDatabaseRolesResponse.next_page_token] from a - // previous [ListDatabaseRolesResponse][google.spanner.admin.database.v1.ListDatabaseRolesResponse]. + // [next_page_token][google.spanner.admin.database.v1.ListDatabaseRolesResponse.next_page_token] + // from a previous + // [ListDatabaseRolesResponse][google.spanner.admin.database.v1.ListDatabaseRolesResponse]. string page_token = 3; } -// The response for [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles]. +// The response for +// [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles]. message ListDatabaseRolesResponse { // Database roles that matched the request. repeated DatabaseRole database_roles = 1; diff --git a/protos/google/spanner/admin/instance/v1/common.proto b/protos/google/spanner/admin/instance/v1/common.proto index ab6293acf..075b45fea 100644 --- a/protos/google/spanner/admin/instance/v1/common.proto +++ b/protos/google/spanner/admin/instance/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protos/google/spanner/executor/v1/cloud_executor.proto b/protos/google/spanner/executor/v1/cloud_executor.proto index 3ad36e3ee..73474a650 100644 --- a/protos/google/spanner/executor/v1/cloud_executor.proto +++ b/protos/google/spanner/executor/v1/cloud_executor.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protos/google/spanner/v1/commit_response.proto b/protos/google/spanner/v1/commit_response.proto index 436a002b8..d44aad63b 100644 --- a/protos/google/spanner/v1/commit_response.proto +++ b/protos/google/spanner/v1/commit_response.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protos/google/spanner/v1/keys.proto b/protos/google/spanner/v1/keys.proto index 8fb4757f5..82f073b96 100644 --- a/protos/google/spanner/v1/keys.proto +++ b/protos/google/spanner/v1/keys.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protos/google/spanner/v1/mutation.proto b/protos/google/spanner/v1/mutation.proto index cced61f33..7fbf93f8a 100644 --- a/protos/google/spanner/v1/mutation.proto +++ b/protos/google/spanner/v1/mutation.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protos/google/spanner/v1/query_plan.proto b/protos/google/spanner/v1/query_plan.proto index c0903bdd7..ba18055e3 100644 --- a/protos/google/spanner/v1/query_plan.proto +++ b/protos/google/spanner/v1/query_plan.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protos/google/spanner/v1/result_set.proto b/protos/google/spanner/v1/result_set.proto index cfa5719c4..f392c1d7d 100644 --- a/protos/google/spanner/v1/result_set.proto +++ b/protos/google/spanner/v1/result_set.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protos/google/spanner/v1/spanner.proto b/protos/google/spanner/v1/spanner.proto index 440ebf785..25c67f155 100644 --- a/protos/google/spanner/v1/spanner.proto +++ b/protos/google/spanner/v1/spanner.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protos/google/spanner/v1/transaction.proto b/protos/google/spanner/v1/transaction.proto index e3f22ee3c..8af513d15 100644 --- a/protos/google/spanner/v1/transaction.proto +++ b/protos/google/spanner/v1/transaction.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protos/google/spanner/v1/type.proto b/protos/google/spanner/v1/type.proto index 8e28fa7fd..4e77106c9 100644 --- a/protos/google/spanner/v1/type.proto +++ b/protos/google/spanner/v1/type.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 98bfcb679..0003e5dd4 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -6558,6 +6558,9 @@ export namespace google { /** Backup encryptionInfo */ encryptionInfo?: (google.spanner.admin.database.v1.IEncryptionInfo|null); + /** Backup encryptionInformation */ + encryptionInformation?: (google.spanner.admin.database.v1.IEncryptionInfo[]|null); + /** Backup databaseDialect */ databaseDialect?: (google.spanner.admin.database.v1.DatabaseDialect|keyof typeof google.spanner.admin.database.v1.DatabaseDialect|null); @@ -6604,6 +6607,9 @@ export namespace google { /** Backup encryptionInfo. */ public encryptionInfo?: (google.spanner.admin.database.v1.IEncryptionInfo|null); + /** Backup encryptionInformation. */ + public encryptionInformation: google.spanner.admin.database.v1.IEncryptionInfo[]; + /** Backup databaseDialect. */ public databaseDialect: (google.spanner.admin.database.v1.DatabaseDialect|keyof typeof google.spanner.admin.database.v1.DatabaseDialect); @@ -8023,6 +8029,9 @@ export namespace google { /** CreateBackupEncryptionConfig kmsKeyName */ kmsKeyName?: (string|null); + + /** CreateBackupEncryptionConfig kmsKeyNames */ + kmsKeyNames?: (string[]|null); } /** Represents a CreateBackupEncryptionConfig. */ @@ -8040,6 +8049,9 @@ export namespace google { /** CreateBackupEncryptionConfig kmsKeyName. */ public kmsKeyName: string; + /** CreateBackupEncryptionConfig kmsKeyNames. */ + public kmsKeyNames: string[]; + /** * Creates a new CreateBackupEncryptionConfig instance using the specified properties. * @param [properties] Properties to set @@ -8137,6 +8149,9 @@ export namespace google { /** CopyBackupEncryptionConfig kmsKeyName */ kmsKeyName?: (string|null); + + /** CopyBackupEncryptionConfig kmsKeyNames */ + kmsKeyNames?: (string[]|null); } /** Represents a CopyBackupEncryptionConfig. */ @@ -8154,6 +8169,9 @@ export namespace google { /** CopyBackupEncryptionConfig kmsKeyName. */ public kmsKeyName: string; + /** CopyBackupEncryptionConfig kmsKeyNames. */ + public kmsKeyNames: string[]; + /** * Creates a new CopyBackupEncryptionConfig instance using the specified properties. * @param [properties] Properties to set @@ -8357,6 +8375,9 @@ export namespace google { /** EncryptionConfig kmsKeyName */ kmsKeyName?: (string|null); + + /** EncryptionConfig kmsKeyNames */ + kmsKeyNames?: (string[]|null); } /** Represents an EncryptionConfig. */ @@ -8371,6 +8392,9 @@ export namespace google { /** EncryptionConfig kmsKeyName. */ public kmsKeyName: string; + /** EncryptionConfig kmsKeyNames. */ + public kmsKeyNames: string[]; + /** * Creates a new EncryptionConfig instance using the specified properties. * @param [properties] Properties to set @@ -11036,6 +11060,9 @@ export namespace google { /** RestoreDatabaseEncryptionConfig kmsKeyName */ kmsKeyName?: (string|null); + + /** RestoreDatabaseEncryptionConfig kmsKeyNames */ + kmsKeyNames?: (string[]|null); } /** Represents a RestoreDatabaseEncryptionConfig. */ @@ -11053,6 +11080,9 @@ export namespace google { /** RestoreDatabaseEncryptionConfig kmsKeyName. */ public kmsKeyName: string; + /** RestoreDatabaseEncryptionConfig kmsKeyNames. */ + public kmsKeyNames: string[]; + /** * Creates a new RestoreDatabaseEncryptionConfig instance using the specified properties. * @param [properties] Properties to set diff --git a/protos/protos.js b/protos/protos.js index feb8d0198..239a3074d 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -17698,6 +17698,7 @@ * @property {google.spanner.admin.database.v1.Backup.State|null} [state] Backup state * @property {Array.|null} [referencingDatabases] Backup referencingDatabases * @property {google.spanner.admin.database.v1.IEncryptionInfo|null} [encryptionInfo] Backup encryptionInfo + * @property {Array.|null} [encryptionInformation] Backup encryptionInformation * @property {google.spanner.admin.database.v1.DatabaseDialect|null} [databaseDialect] Backup databaseDialect * @property {Array.|null} [referencingBackups] Backup referencingBackups * @property {google.protobuf.ITimestamp|null} [maxExpireTime] Backup maxExpireTime @@ -17713,6 +17714,7 @@ */ function Backup(properties) { this.referencingDatabases = []; + this.encryptionInformation = []; this.referencingBackups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -17792,6 +17794,14 @@ */ Backup.prototype.encryptionInfo = null; + /** + * Backup encryptionInformation. + * @member {Array.} encryptionInformation + * @memberof google.spanner.admin.database.v1.Backup + * @instance + */ + Backup.prototype.encryptionInformation = $util.emptyArray; + /** * Backup databaseDialect. * @member {google.spanner.admin.database.v1.DatabaseDialect} databaseDialect @@ -17866,6 +17876,9 @@ writer.uint32(/* id 11, wireType 2 =*/90).string(message.referencingBackups[i]); if (message.maxExpireTime != null && Object.hasOwnProperty.call(message, "maxExpireTime")) $root.google.protobuf.Timestamp.encode(message.maxExpireTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.encryptionInformation != null && message.encryptionInformation.length) + for (var i = 0; i < message.encryptionInformation.length; ++i) + $root.google.spanner.admin.database.v1.EncryptionInfo.encode(message.encryptionInformation[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; @@ -17938,6 +17951,12 @@ message.encryptionInfo = $root.google.spanner.admin.database.v1.EncryptionInfo.decode(reader, reader.uint32()); break; } + case 13: { + if (!(message.encryptionInformation && message.encryptionInformation.length)) + message.encryptionInformation = []; + message.encryptionInformation.push($root.google.spanner.admin.database.v1.EncryptionInfo.decode(reader, reader.uint32())); + break; + } case 10: { message.databaseDialect = reader.int32(); break; @@ -18032,6 +18051,15 @@ if (error) return "encryptionInfo." + error; } + if (message.encryptionInformation != null && message.hasOwnProperty("encryptionInformation")) { + if (!Array.isArray(message.encryptionInformation)) + return "encryptionInformation: array expected"; + for (var i = 0; i < message.encryptionInformation.length; ++i) { + var error = $root.google.spanner.admin.database.v1.EncryptionInfo.verify(message.encryptionInformation[i]); + if (error) + return "encryptionInformation." + error; + } + } if (message.databaseDialect != null && message.hasOwnProperty("databaseDialect")) switch (message.databaseDialect) { default: @@ -18128,6 +18156,16 @@ throw TypeError(".google.spanner.admin.database.v1.Backup.encryptionInfo: object expected"); message.encryptionInfo = $root.google.spanner.admin.database.v1.EncryptionInfo.fromObject(object.encryptionInfo); } + if (object.encryptionInformation) { + if (!Array.isArray(object.encryptionInformation)) + throw TypeError(".google.spanner.admin.database.v1.Backup.encryptionInformation: array expected"); + message.encryptionInformation = []; + for (var i = 0; i < object.encryptionInformation.length; ++i) { + if (typeof object.encryptionInformation[i] !== "object") + throw TypeError(".google.spanner.admin.database.v1.Backup.encryptionInformation: object expected"); + message.encryptionInformation[i] = $root.google.spanner.admin.database.v1.EncryptionInfo.fromObject(object.encryptionInformation[i]); + } + } switch (object.databaseDialect) { default: if (typeof object.databaseDialect === "number") { @@ -18179,6 +18217,7 @@ if (options.arrays || options.defaults) { object.referencingDatabases = []; object.referencingBackups = []; + object.encryptionInformation = []; } if (options.defaults) { object.name = ""; @@ -18229,6 +18268,11 @@ } if (message.maxExpireTime != null && message.hasOwnProperty("maxExpireTime")) object.maxExpireTime = $root.google.protobuf.Timestamp.toObject(message.maxExpireTime, options); + if (message.encryptionInformation && message.encryptionInformation.length) { + object.encryptionInformation = []; + for (var j = 0; j < message.encryptionInformation.length; ++j) + object.encryptionInformation[j] = $root.google.spanner.admin.database.v1.EncryptionInfo.toObject(message.encryptionInformation[j], options); + } return object; }; @@ -21408,6 +21452,7 @@ * @interface ICreateBackupEncryptionConfig * @property {google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType|null} [encryptionType] CreateBackupEncryptionConfig encryptionType * @property {string|null} [kmsKeyName] CreateBackupEncryptionConfig kmsKeyName + * @property {Array.|null} [kmsKeyNames] CreateBackupEncryptionConfig kmsKeyNames */ /** @@ -21419,6 +21464,7 @@ * @param {google.spanner.admin.database.v1.ICreateBackupEncryptionConfig=} [properties] Properties to set */ function CreateBackupEncryptionConfig(properties) { + this.kmsKeyNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21441,6 +21487,14 @@ */ CreateBackupEncryptionConfig.prototype.kmsKeyName = ""; + /** + * CreateBackupEncryptionConfig kmsKeyNames. + * @member {Array.} kmsKeyNames + * @memberof google.spanner.admin.database.v1.CreateBackupEncryptionConfig + * @instance + */ + CreateBackupEncryptionConfig.prototype.kmsKeyNames = $util.emptyArray; + /** * Creates a new CreateBackupEncryptionConfig instance using the specified properties. * @function create @@ -21469,6 +21523,9 @@ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encryptionType); if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); + if (message.kmsKeyNames != null && message.kmsKeyNames.length) + for (var i = 0; i < message.kmsKeyNames.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyNames[i]); return writer; }; @@ -21511,6 +21568,12 @@ message.kmsKeyName = reader.string(); break; } + case 3: { + if (!(message.kmsKeyNames && message.kmsKeyNames.length)) + message.kmsKeyNames = []; + message.kmsKeyNames.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -21559,6 +21622,13 @@ if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; + if (message.kmsKeyNames != null && message.hasOwnProperty("kmsKeyNames")) { + if (!Array.isArray(message.kmsKeyNames)) + return "kmsKeyNames: array expected"; + for (var i = 0; i < message.kmsKeyNames.length; ++i) + if (!$util.isString(message.kmsKeyNames[i])) + return "kmsKeyNames: string[] expected"; + } return null; }; @@ -21600,6 +21670,13 @@ } if (object.kmsKeyName != null) message.kmsKeyName = String(object.kmsKeyName); + if (object.kmsKeyNames) { + if (!Array.isArray(object.kmsKeyNames)) + throw TypeError(".google.spanner.admin.database.v1.CreateBackupEncryptionConfig.kmsKeyNames: array expected"); + message.kmsKeyNames = []; + for (var i = 0; i < object.kmsKeyNames.length; ++i) + message.kmsKeyNames[i] = String(object.kmsKeyNames[i]); + } return message; }; @@ -21616,6 +21693,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.kmsKeyNames = []; if (options.defaults) { object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; object.kmsKeyName = ""; @@ -21624,6 +21703,11 @@ object.encryptionType = options.enums === String ? $root.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType[message.encryptionType] : message.encryptionType; if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) object.kmsKeyName = message.kmsKeyName; + if (message.kmsKeyNames && message.kmsKeyNames.length) { + object.kmsKeyNames = []; + for (var j = 0; j < message.kmsKeyNames.length; ++j) + object.kmsKeyNames[j] = message.kmsKeyNames[j]; + } return object; }; @@ -21682,6 +21766,7 @@ * @interface ICopyBackupEncryptionConfig * @property {google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType|null} [encryptionType] CopyBackupEncryptionConfig encryptionType * @property {string|null} [kmsKeyName] CopyBackupEncryptionConfig kmsKeyName + * @property {Array.|null} [kmsKeyNames] CopyBackupEncryptionConfig kmsKeyNames */ /** @@ -21693,6 +21778,7 @@ * @param {google.spanner.admin.database.v1.ICopyBackupEncryptionConfig=} [properties] Properties to set */ function CopyBackupEncryptionConfig(properties) { + this.kmsKeyNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21715,6 +21801,14 @@ */ CopyBackupEncryptionConfig.prototype.kmsKeyName = ""; + /** + * CopyBackupEncryptionConfig kmsKeyNames. + * @member {Array.} kmsKeyNames + * @memberof google.spanner.admin.database.v1.CopyBackupEncryptionConfig + * @instance + */ + CopyBackupEncryptionConfig.prototype.kmsKeyNames = $util.emptyArray; + /** * Creates a new CopyBackupEncryptionConfig instance using the specified properties. * @function create @@ -21743,6 +21837,9 @@ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encryptionType); if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); + if (message.kmsKeyNames != null && message.kmsKeyNames.length) + for (var i = 0; i < message.kmsKeyNames.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyNames[i]); return writer; }; @@ -21785,6 +21882,12 @@ message.kmsKeyName = reader.string(); break; } + case 3: { + if (!(message.kmsKeyNames && message.kmsKeyNames.length)) + message.kmsKeyNames = []; + message.kmsKeyNames.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -21833,6 +21936,13 @@ if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; + if (message.kmsKeyNames != null && message.hasOwnProperty("kmsKeyNames")) { + if (!Array.isArray(message.kmsKeyNames)) + return "kmsKeyNames: array expected"; + for (var i = 0; i < message.kmsKeyNames.length; ++i) + if (!$util.isString(message.kmsKeyNames[i])) + return "kmsKeyNames: string[] expected"; + } return null; }; @@ -21874,6 +21984,13 @@ } if (object.kmsKeyName != null) message.kmsKeyName = String(object.kmsKeyName); + if (object.kmsKeyNames) { + if (!Array.isArray(object.kmsKeyNames)) + throw TypeError(".google.spanner.admin.database.v1.CopyBackupEncryptionConfig.kmsKeyNames: array expected"); + message.kmsKeyNames = []; + for (var i = 0; i < object.kmsKeyNames.length; ++i) + message.kmsKeyNames[i] = String(object.kmsKeyNames[i]); + } return message; }; @@ -21890,6 +22007,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.kmsKeyNames = []; if (options.defaults) { object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; object.kmsKeyName = ""; @@ -21898,6 +22017,11 @@ object.encryptionType = options.enums === String ? $root.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType[message.encryptionType] : message.encryptionType; if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) object.kmsKeyName = message.kmsKeyName; + if (message.kmsKeyNames && message.kmsKeyNames.length) { + object.kmsKeyNames = []; + for (var j = 0; j < message.kmsKeyNames.length; ++j) + object.kmsKeyNames[j] = message.kmsKeyNames[j]; + } return object; }; @@ -22215,6 +22339,7 @@ * @memberof google.spanner.admin.database.v1 * @interface IEncryptionConfig * @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName + * @property {Array.|null} [kmsKeyNames] EncryptionConfig kmsKeyNames */ /** @@ -22226,6 +22351,7 @@ * @param {google.spanner.admin.database.v1.IEncryptionConfig=} [properties] Properties to set */ function EncryptionConfig(properties) { + this.kmsKeyNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22240,6 +22366,14 @@ */ EncryptionConfig.prototype.kmsKeyName = ""; + /** + * EncryptionConfig kmsKeyNames. + * @member {Array.} kmsKeyNames + * @memberof google.spanner.admin.database.v1.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.kmsKeyNames = $util.emptyArray; + /** * Creates a new EncryptionConfig instance using the specified properties. * @function create @@ -22266,6 +22400,9 @@ writer = $Writer.create(); if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); + if (message.kmsKeyNames != null && message.kmsKeyNames.length) + for (var i = 0; i < message.kmsKeyNames.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyNames[i]); return writer; }; @@ -22304,6 +22441,12 @@ message.kmsKeyName = reader.string(); break; } + case 3: { + if (!(message.kmsKeyNames && message.kmsKeyNames.length)) + message.kmsKeyNames = []; + message.kmsKeyNames.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -22342,6 +22485,13 @@ if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; + if (message.kmsKeyNames != null && message.hasOwnProperty("kmsKeyNames")) { + if (!Array.isArray(message.kmsKeyNames)) + return "kmsKeyNames: array expected"; + for (var i = 0; i < message.kmsKeyNames.length; ++i) + if (!$util.isString(message.kmsKeyNames[i])) + return "kmsKeyNames: string[] expected"; + } return null; }; @@ -22359,6 +22509,13 @@ var message = new $root.google.spanner.admin.database.v1.EncryptionConfig(); if (object.kmsKeyName != null) message.kmsKeyName = String(object.kmsKeyName); + if (object.kmsKeyNames) { + if (!Array.isArray(object.kmsKeyNames)) + throw TypeError(".google.spanner.admin.database.v1.EncryptionConfig.kmsKeyNames: array expected"); + message.kmsKeyNames = []; + for (var i = 0; i < object.kmsKeyNames.length; ++i) + message.kmsKeyNames[i] = String(object.kmsKeyNames[i]); + } return message; }; @@ -22375,10 +22532,17 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.kmsKeyNames = []; if (options.defaults) object.kmsKeyName = ""; if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) object.kmsKeyName = message.kmsKeyName; + if (message.kmsKeyNames && message.kmsKeyNames.length) { + object.kmsKeyNames = []; + for (var j = 0; j < message.kmsKeyNames.length; ++j) + object.kmsKeyNames[j] = message.kmsKeyNames[j]; + } return object; }; @@ -28487,6 +28651,7 @@ * @interface IRestoreDatabaseEncryptionConfig * @property {google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType|null} [encryptionType] RestoreDatabaseEncryptionConfig encryptionType * @property {string|null} [kmsKeyName] RestoreDatabaseEncryptionConfig kmsKeyName + * @property {Array.|null} [kmsKeyNames] RestoreDatabaseEncryptionConfig kmsKeyNames */ /** @@ -28498,6 +28663,7 @@ * @param {google.spanner.admin.database.v1.IRestoreDatabaseEncryptionConfig=} [properties] Properties to set */ function RestoreDatabaseEncryptionConfig(properties) { + this.kmsKeyNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28520,6 +28686,14 @@ */ RestoreDatabaseEncryptionConfig.prototype.kmsKeyName = ""; + /** + * RestoreDatabaseEncryptionConfig kmsKeyNames. + * @member {Array.} kmsKeyNames + * @memberof google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig + * @instance + */ + RestoreDatabaseEncryptionConfig.prototype.kmsKeyNames = $util.emptyArray; + /** * Creates a new RestoreDatabaseEncryptionConfig instance using the specified properties. * @function create @@ -28548,6 +28722,9 @@ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encryptionType); if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); + if (message.kmsKeyNames != null && message.kmsKeyNames.length) + for (var i = 0; i < message.kmsKeyNames.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyNames[i]); return writer; }; @@ -28590,6 +28767,12 @@ message.kmsKeyName = reader.string(); break; } + case 3: { + if (!(message.kmsKeyNames && message.kmsKeyNames.length)) + message.kmsKeyNames = []; + message.kmsKeyNames.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -28638,6 +28821,13 @@ if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; + if (message.kmsKeyNames != null && message.hasOwnProperty("kmsKeyNames")) { + if (!Array.isArray(message.kmsKeyNames)) + return "kmsKeyNames: array expected"; + for (var i = 0; i < message.kmsKeyNames.length; ++i) + if (!$util.isString(message.kmsKeyNames[i])) + return "kmsKeyNames: string[] expected"; + } return null; }; @@ -28679,6 +28869,13 @@ } if (object.kmsKeyName != null) message.kmsKeyName = String(object.kmsKeyName); + if (object.kmsKeyNames) { + if (!Array.isArray(object.kmsKeyNames)) + throw TypeError(".google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.kmsKeyNames: array expected"); + message.kmsKeyNames = []; + for (var i = 0; i < object.kmsKeyNames.length; ++i) + message.kmsKeyNames[i] = String(object.kmsKeyNames[i]); + } return message; }; @@ -28695,6 +28892,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.kmsKeyNames = []; if (options.defaults) { object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; object.kmsKeyName = ""; @@ -28703,6 +28902,11 @@ object.encryptionType = options.enums === String ? $root.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType[message.encryptionType] : message.encryptionType; if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) object.kmsKeyName = message.kmsKeyName; + if (message.kmsKeyNames && message.kmsKeyNames.length) { + object.kmsKeyNames = []; + for (var j = 0; j < message.kmsKeyNames.length; ++j) + object.kmsKeyNames[j] = message.kmsKeyNames[j]; + } return object; }; diff --git a/protos/protos.json b/protos/protos.json index 2c8db5995..f1daeaffc 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -1690,6 +1690,14 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "encryptionInformation": { + "rule": "repeated", + "type": "EncryptionInfo", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "databaseDialect": { "type": "DatabaseDialect", "id": 10, @@ -2008,6 +2016,15 @@ "(google.api.field_behavior)": "OPTIONAL", "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" } + }, + "kmsKeyNames": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" + } } }, "nested": { @@ -2037,6 +2054,15 @@ "(google.api.field_behavior)": "OPTIONAL", "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" } + }, + "kmsKeyNames": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" + } } }, "nested": { @@ -2074,6 +2100,14 @@ "options": { "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" } + }, + "kmsKeyNames": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" + } } } }, @@ -3052,6 +3086,15 @@ "(google.api.field_behavior)": "OPTIONAL", "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" } + }, + "kmsKeyNames": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" + } } }, "nested": { diff --git a/src/v1/database_admin_client.ts b/src/v1/database_admin_client.ts index a4e26200a..3fae88a1d 100644 --- a/src/v1/database_admin_client.ts +++ b/src/v1/database_admin_client.ts @@ -46,7 +46,7 @@ const version = require('../../../package.json').version; * The Cloud Spanner Database Admin API can be used to: * * create, drop, and list databases * * update the schema of pre-existing databases - * * create, delete and list backups for a database + * * create, delete, copy and list backups for a database * * restore a database from an existing backup * @class * @memberof v1 @@ -1139,7 +1139,8 @@ export class DatabaseAdminClient { return this.innerApiCalls.testIamPermissions(request, options, callback); } /** - * Gets metadata on a pending or completed {@link protos.google.spanner.admin.database.v1.Backup|Backup}. + * Gets metadata on a pending or completed + * {@link protos.google.spanner.admin.database.v1.Backup|Backup}. * * @param {Object} request * The request object that will be sent. @@ -1229,7 +1230,8 @@ export class DatabaseAdminClient { return this.innerApiCalls.getBackup(request, options, callback); } /** - * Updates a pending or completed {@link protos.google.spanner.admin.database.v1.Backup|Backup}. + * Updates a pending or completed + * {@link protos.google.spanner.admin.database.v1.Backup|Backup}. * * @param {Object} request * The request object that will be sent. @@ -1326,7 +1328,8 @@ export class DatabaseAdminClient { return this.innerApiCalls.updateBackup(request, options, callback); } /** - * Deletes a pending or completed {@link protos.google.spanner.admin.database.v1.Backup|Backup}. + * Deletes a pending or completed + * {@link protos.google.spanner.admin.database.v1.Backup|Backup}. * * @param {Object} request * The request object that will be sent. @@ -1422,8 +1425,8 @@ export class DatabaseAdminClient { * have a name of the format `/operations/` and * can be used to track preparation of the database. The * {@link protos.google.longrunning.Operation.metadata|metadata} field type is - * {@link protos.google.spanner.admin.database.v1.CreateDatabaseMetadata|CreateDatabaseMetadata}. The - * {@link protos.google.longrunning.Operation.response|response} field type is + * {@link protos.google.spanner.admin.database.v1.CreateDatabaseMetadata|CreateDatabaseMetadata}. + * The {@link protos.google.longrunning.Operation.response|response} field type is * {@link protos.google.spanner.admin.database.v1.Database|Database}, if successful. * * @param {Object} request @@ -1443,8 +1446,8 @@ export class DatabaseAdminClient { * statements execute atomically with the creation of the database: * if there is an error in any statement, the database is not created. * @param {google.spanner.admin.database.v1.EncryptionConfig} [request.encryptionConfig] - * Optional. The encryption configuration for the database. If this field is not - * specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Optional. The encryption configuration for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using * Google default encryption. * @param {google.spanner.admin.database.v1.DatabaseDialect} [request.databaseDialect] * Optional. The dialect of the Cloud Spanner Database. @@ -1768,7 +1771,8 @@ export class DatabaseAdminClient { * the format `/operations/` and can be used to * track execution of the schema change(s). The * {@link protos.google.longrunning.Operation.metadata|metadata} field type is - * {@link protos.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata|UpdateDatabaseDdlMetadata}. The operation has no response. + * {@link protos.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata|UpdateDatabaseDdlMetadata}. + * The operation has no response. * * @param {Object} request * The request object that will be sent. @@ -1784,18 +1788,20 @@ export class DatabaseAdminClient { * * Specifying an explicit operation ID simplifies determining * whether the statements were executed in the event that the - * {@link protos.google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl|UpdateDatabaseDdl} call is replayed, - * or the return value is otherwise lost: the {@link protos.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database|database} and - * `operation_id` fields can be combined to form the + * {@link protos.google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl|UpdateDatabaseDdl} + * call is replayed, or the return value is otherwise lost: the + * {@link protos.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database|database} + * and `operation_id` fields can be combined to form the * {@link protos.google.longrunning.Operation.name|name} of the resulting - * {@link protos.google.longrunning.Operation|longrunning.Operation}: `/operations/`. + * {@link protos.google.longrunning.Operation|longrunning.Operation}: + * `/operations/`. * * `operation_id` should be unique within the database, and must be * a valid identifier: `{@link protos.a-z0-9_|a-z}*`. Note that * automatically-generated operation IDs always begin with an * underscore. If the named operation already exists, - * {@link protos.google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl|UpdateDatabaseDdl} returns - * `ALREADY_EXISTS`. + * {@link protos.google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl|UpdateDatabaseDdl} + * returns `ALREADY_EXISTS`. * @param {Buffer} [request.protoDescriptors] * Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. * Contains a protobuf-serialized @@ -1943,12 +1949,12 @@ export class DatabaseAdminClient { * `projects//instances//backups//operations/` * and can be used to track creation of the backup. The * {@link protos.google.longrunning.Operation.metadata|metadata} field type is - * {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. The - * {@link protos.google.longrunning.Operation.response|response} field type is - * {@link protos.google.spanner.admin.database.v1.Backup|Backup}, if successful. Cancelling the returned operation will stop the - * creation and delete the backup. - * There can be only one pending backup creation per database. Backup creation - * of different databases can run concurrently. + * {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. + * The {@link protos.google.longrunning.Operation.response|response} field type is + * {@link protos.google.spanner.admin.database.v1.Backup|Backup}, if successful. + * Cancelling the returned operation will stop the creation and delete the + * backup. There can be only one pending backup creation per database. Backup + * creation of different databases can run concurrently. * * @param {Object} request * The request object that will be sent. @@ -1966,11 +1972,11 @@ export class DatabaseAdminClient { * @param {google.spanner.admin.database.v1.Backup} request.backup * Required. The backup to create. * @param {google.spanner.admin.database.v1.CreateBackupEncryptionConfig} [request.encryptionConfig] - * Optional. The encryption configuration used to encrypt the backup. If this field is - * not specified, the backup will use the same - * encryption configuration as the database by default, namely - * {@link protos.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type|encryption_type} = - * `USE_DATABASE_ENCRYPTION`. + * Optional. The encryption configuration used to encrypt the backup. If this + * field is not specified, the backup will use the same encryption + * configuration as the database by default, namely + * {@link protos.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type|encryption_type} + * = `USE_DATABASE_ENCRYPTION`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2106,15 +2112,16 @@ export class DatabaseAdminClient { * The {@link protos.google.longrunning.Operation.metadata|metadata} field type is * {@link protos.google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata}. * The {@link protos.google.longrunning.Operation.response|response} field type is - * {@link protos.google.spanner.admin.database.v1.Backup|Backup}, if successful. Cancelling the returned operation will stop the - * copying and delete the backup. - * Concurrent CopyBackup requests can run on the same source backup. + * {@link protos.google.spanner.admin.database.v1.Backup|Backup}, if successful. + * Cancelling the returned operation will stop the copying and delete the + * destination backup. Concurrent CopyBackup requests can run on the same + * source backup. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the destination instance that will contain the backup copy. - * Values are of the form: `projects//instances/`. + * Required. The name of the destination instance that will contain the backup + * copy. Values are of the form: `projects//instances/`. * @param {string} request.backupId * Required. The id of the backup copy. * The `backup_id` appended to `parent` forms the full backup_uri of the form @@ -2133,11 +2140,11 @@ export class DatabaseAdminClient { * passed, the backup is eligible to be automatically deleted by Cloud Spanner * to free the resources used by the backup. * @param {google.spanner.admin.database.v1.CopyBackupEncryptionConfig} [request.encryptionConfig] - * Optional. The encryption configuration used to encrypt the backup. If this field is - * not specified, the backup will use the same - * encryption configuration as the source backup by default, namely - * {@link protos.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type|encryption_type} = - * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. + * Optional. The encryption configuration used to encrypt the backup. If this + * field is not specified, the backup will use the same encryption + * configuration as the source backup by default, namely + * {@link protos.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type|encryption_type} + * = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2299,12 +2306,12 @@ export class DatabaseAdminClient { * Name of the backup from which to restore. Values are of the form * `projects//instances//backups/`. * @param {google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig} [request.encryptionConfig] - * Optional. An encryption configuration describing the encryption type and key - * resources in Cloud KMS used to encrypt/decrypt the database to restore to. - * If this field is not specified, the restored database will use - * the same encryption configuration as the backup by default, namely - * {@link protos.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type|encryption_type} = - * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. + * Optional. An encryption configuration describing the encryption type and + * key resources in Cloud KMS used to encrypt/decrypt the database to restore + * to. If this field is not specified, the restored database will use the same + * encryption configuration as the backup by default, namely + * {@link protos.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type|encryption_type} + * = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2443,8 +2450,9 @@ export class DatabaseAdminClient { * defaults to the server's maximum allowed page size. * @param {string} request.pageToken * If non-empty, `page_token` should contain a - * {@link protos.google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token|next_page_token} from a - * previous {@link protos.google.spanner.admin.database.v1.ListDatabasesResponse|ListDatabasesResponse}. + * {@link protos.google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token|next_page_token} + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListDatabasesResponse|ListDatabasesResponse}. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2544,8 +2552,9 @@ export class DatabaseAdminClient { * defaults to the server's maximum allowed page size. * @param {string} request.pageToken * If non-empty, `page_token` should contain a - * {@link protos.google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token|next_page_token} from a - * previous {@link protos.google.spanner.admin.database.v1.ListDatabasesResponse|ListDatabasesResponse}. + * {@link protos.google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token|next_page_token} + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListDatabasesResponse|ListDatabasesResponse}. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2593,8 +2602,9 @@ export class DatabaseAdminClient { * defaults to the server's maximum allowed page size. * @param {string} request.pageToken * If non-empty, `page_token` should contain a - * {@link protos.google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token|next_page_token} from a - * previous {@link protos.google.spanner.admin.database.v1.ListDatabasesResponse|ListDatabasesResponse}. + * {@link protos.google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token|next_page_token} + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListDatabasesResponse|ListDatabasesResponse}. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -2645,7 +2655,9 @@ export class DatabaseAdminClient { * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. * Colon `:` is the contains operator. Filter rules are not case sensitive. * - * The following fields in the {@link protos.google.spanner.admin.database.v1.Backup|Backup} are eligible for filtering: + * The following fields in the + * {@link protos.google.spanner.admin.database.v1.Backup|Backup} are eligible for + * filtering: * * * `name` * * `database` @@ -2677,9 +2689,10 @@ export class DatabaseAdminClient { * less, defaults to the server's maximum allowed page size. * @param {string} request.pageToken * If non-empty, `page_token` should contain a - * {@link protos.google.spanner.admin.database.v1.ListBackupsResponse.next_page_token|next_page_token} from a - * previous {@link protos.google.spanner.admin.database.v1.ListBackupsResponse|ListBackupsResponse} to the same `parent` and with the same - * `filter`. + * {@link protos.google.spanner.admin.database.v1.ListBackupsResponse.next_page_token|next_page_token} + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListBackupsResponse|ListBackupsResponse} + * to the same `parent` and with the same `filter`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2783,7 +2796,9 @@ export class DatabaseAdminClient { * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. * Colon `:` is the contains operator. Filter rules are not case sensitive. * - * The following fields in the {@link protos.google.spanner.admin.database.v1.Backup|Backup} are eligible for filtering: + * The following fields in the + * {@link protos.google.spanner.admin.database.v1.Backup|Backup} are eligible for + * filtering: * * * `name` * * `database` @@ -2815,9 +2830,10 @@ export class DatabaseAdminClient { * less, defaults to the server's maximum allowed page size. * @param {string} request.pageToken * If non-empty, `page_token` should contain a - * {@link protos.google.spanner.admin.database.v1.ListBackupsResponse.next_page_token|next_page_token} from a - * previous {@link protos.google.spanner.admin.database.v1.ListBackupsResponse|ListBackupsResponse} to the same `parent` and with the same - * `filter`. + * {@link protos.google.spanner.admin.database.v1.ListBackupsResponse.next_page_token|next_page_token} + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListBackupsResponse|ListBackupsResponse} + * to the same `parent` and with the same `filter`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2869,7 +2885,9 @@ export class DatabaseAdminClient { * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. * Colon `:` is the contains operator. Filter rules are not case sensitive. * - * The following fields in the {@link protos.google.spanner.admin.database.v1.Backup|Backup} are eligible for filtering: + * The following fields in the + * {@link protos.google.spanner.admin.database.v1.Backup|Backup} are eligible for + * filtering: * * * `name` * * `database` @@ -2901,9 +2919,10 @@ export class DatabaseAdminClient { * less, defaults to the server's maximum allowed page size. * @param {string} request.pageToken * If non-empty, `page_token` should contain a - * {@link protos.google.spanner.admin.database.v1.ListBackupsResponse.next_page_token|next_page_token} from a - * previous {@link protos.google.spanner.admin.database.v1.ListBackupsResponse|ListBackupsResponse} to the same `parent` and with the same - * `filter`. + * {@link protos.google.spanner.admin.database.v1.ListBackupsResponse.next_page_token|next_page_token} + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListBackupsResponse|ListBackupsResponse} + * to the same `parent` and with the same `filter`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -2965,7 +2984,9 @@ export class DatabaseAdminClient { * * `name` - The name of the long-running operation * * `done` - False if the operation is in progress, else true. * * `metadata.@type` - the type of metadata. For example, the type string - * for {@link protos.google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata} is + * for + * {@link protos.google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata} + * is * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * * `metadata.` - any field in metadata.value. * `metadata.@type` must be specified first, if filtering on metadata @@ -2987,7 +3008,8 @@ export class DatabaseAdminClient { * `(metadata.name:restored_howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ * `(error:*)` - Return operations where: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata}. + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata}. * * The database is restored from a backup. * * The backup name contains "backup_howl". * * The restored database's name contains "restored_howl". @@ -2999,8 +3021,9 @@ export class DatabaseAdminClient { * @param {string} request.pageToken * If non-empty, `page_token` should contain a * {@link protos.google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token|next_page_token} - * from a previous {@link protos.google.spanner.admin.database.v1.ListDatabaseOperationsResponse|ListDatabaseOperationsResponse} to the - * same `parent` and with the same `filter`. + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListDatabaseOperationsResponse|ListDatabaseOperationsResponse} + * to the same `parent` and with the same `filter`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3114,7 +3137,9 @@ export class DatabaseAdminClient { * * `name` - The name of the long-running operation * * `done` - False if the operation is in progress, else true. * * `metadata.@type` - the type of metadata. For example, the type string - * for {@link protos.google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata} is + * for + * {@link protos.google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata} + * is * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * * `metadata.` - any field in metadata.value. * `metadata.@type` must be specified first, if filtering on metadata @@ -3136,7 +3161,8 @@ export class DatabaseAdminClient { * `(metadata.name:restored_howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ * `(error:*)` - Return operations where: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata}. + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata}. * * The database is restored from a backup. * * The backup name contains "backup_howl". * * The restored database's name contains "restored_howl". @@ -3148,8 +3174,9 @@ export class DatabaseAdminClient { * @param {string} request.pageToken * If non-empty, `page_token` should contain a * {@link protos.google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token|next_page_token} - * from a previous {@link protos.google.spanner.admin.database.v1.ListDatabaseOperationsResponse|ListDatabaseOperationsResponse} to the - * same `parent` and with the same `filter`. + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListDatabaseOperationsResponse|ListDatabaseOperationsResponse} + * to the same `parent` and with the same `filter`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -3207,7 +3234,9 @@ export class DatabaseAdminClient { * * `name` - The name of the long-running operation * * `done` - False if the operation is in progress, else true. * * `metadata.@type` - the type of metadata. For example, the type string - * for {@link protos.google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata} is + * for + * {@link protos.google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata} + * is * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * * `metadata.` - any field in metadata.value. * `metadata.@type` must be specified first, if filtering on metadata @@ -3229,7 +3258,8 @@ export class DatabaseAdminClient { * `(metadata.name:restored_howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ * `(error:*)` - Return operations where: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata}. + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata}. * * The database is restored from a backup. * * The backup name contains "backup_howl". * * The restored database's name contains "restored_howl". @@ -3241,8 +3271,9 @@ export class DatabaseAdminClient { * @param {string} request.pageToken * If non-empty, `page_token` should contain a * {@link protos.google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token|next_page_token} - * from a previous {@link protos.google.spanner.admin.database.v1.ListDatabaseOperationsResponse|ListDatabaseOperationsResponse} to the - * same `parent` and with the same `filter`. + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListDatabaseOperationsResponse|ListDatabaseOperationsResponse} + * to the same `parent` and with the same `filter`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -3306,7 +3337,9 @@ export class DatabaseAdminClient { * * `name` - The name of the long-running operation * * `done` - False if the operation is in progress, else true. * * `metadata.@type` - the type of metadata. For example, the type string - * for {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} is + * for + * {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} + * is * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * * `metadata.` - any field in metadata.value. * `metadata.@type` must be specified first if filtering on metadata @@ -3324,14 +3357,15 @@ export class DatabaseAdminClient { * * `done:true` - The operation is complete. * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `metadata.database:prod` - Returns operations where: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. - * * The database the backup was taken from has a name containing the - * string "prod". + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. + * * The source database name of backup contains the string "prod". * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `(metadata.name:howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ * `(error:*)` - Returns operations where: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. * * The backup name contains the string "howl". * * The operation started before 2018-03-28T14:50:00Z. * * The operation resulted in an error. @@ -3339,9 +3373,9 @@ export class DatabaseAdminClient { * `(metadata.source_backup:test) AND` \ * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ * `(error:*)` - Returns operations where: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata}. - * * The source backup of the copied backup name contains the string - * "test". + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata}. + * * The source backup name contains the string "test". * * The operation started before 2022-01-18T14:50:00Z. * * The operation resulted in an error. * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ @@ -3351,12 +3385,13 @@ export class DatabaseAdminClient { * `(metadata.source_backup:test_bkp)) AND` \ * `(error:*)` - Returns operations where: * * The operation's metadata matches either of criteria: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} AND the - * database the backup was taken from has name containing string + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} + * AND the source database name of the backup contains the string * "test_db" - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata} AND the - * backup the backup was copied from has name containing string - * "test_bkp" + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata} + * AND the source backup name contains the string "test_bkp" * * The operation resulted in an error. * @param {number} request.pageSize * Number of operations to be returned in the response. If 0 or @@ -3364,8 +3399,9 @@ export class DatabaseAdminClient { * @param {string} request.pageToken * If non-empty, `page_token` should contain a * {@link protos.google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token|next_page_token} - * from a previous {@link protos.google.spanner.admin.database.v1.ListBackupOperationsResponse|ListBackupOperationsResponse} to the - * same `parent` and with the same `filter`. + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListBackupOperationsResponse|ListBackupOperationsResponse} + * to the same `parent` and with the same `filter`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3475,7 +3511,9 @@ export class DatabaseAdminClient { * * `name` - The name of the long-running operation * * `done` - False if the operation is in progress, else true. * * `metadata.@type` - the type of metadata. For example, the type string - * for {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} is + * for + * {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} + * is * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * * `metadata.` - any field in metadata.value. * `metadata.@type` must be specified first if filtering on metadata @@ -3493,14 +3531,15 @@ export class DatabaseAdminClient { * * `done:true` - The operation is complete. * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `metadata.database:prod` - Returns operations where: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. - * * The database the backup was taken from has a name containing the - * string "prod". + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. + * * The source database name of backup contains the string "prod". * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `(metadata.name:howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ * `(error:*)` - Returns operations where: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. * * The backup name contains the string "howl". * * The operation started before 2018-03-28T14:50:00Z. * * The operation resulted in an error. @@ -3508,9 +3547,9 @@ export class DatabaseAdminClient { * `(metadata.source_backup:test) AND` \ * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ * `(error:*)` - Returns operations where: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata}. - * * The source backup of the copied backup name contains the string - * "test". + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata}. + * * The source backup name contains the string "test". * * The operation started before 2022-01-18T14:50:00Z. * * The operation resulted in an error. * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ @@ -3520,12 +3559,13 @@ export class DatabaseAdminClient { * `(metadata.source_backup:test_bkp)) AND` \ * `(error:*)` - Returns operations where: * * The operation's metadata matches either of criteria: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} AND the - * database the backup was taken from has name containing string + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} + * AND the source database name of the backup contains the string * "test_db" - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata} AND the - * backup the backup was copied from has name containing string - * "test_bkp" + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata} + * AND the source backup name contains the string "test_bkp" * * The operation resulted in an error. * @param {number} request.pageSize * Number of operations to be returned in the response. If 0 or @@ -3533,8 +3573,9 @@ export class DatabaseAdminClient { * @param {string} request.pageToken * If non-empty, `page_token` should contain a * {@link protos.google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token|next_page_token} - * from a previous {@link protos.google.spanner.admin.database.v1.ListBackupOperationsResponse|ListBackupOperationsResponse} to the - * same `parent` and with the same `filter`. + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListBackupOperationsResponse|ListBackupOperationsResponse} + * to the same `parent` and with the same `filter`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -3592,7 +3633,9 @@ export class DatabaseAdminClient { * * `name` - The name of the long-running operation * * `done` - False if the operation is in progress, else true. * * `metadata.@type` - the type of metadata. For example, the type string - * for {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} is + * for + * {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} + * is * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * * `metadata.` - any field in metadata.value. * `metadata.@type` must be specified first if filtering on metadata @@ -3610,14 +3653,15 @@ export class DatabaseAdminClient { * * `done:true` - The operation is complete. * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `metadata.database:prod` - Returns operations where: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. - * * The database the backup was taken from has a name containing the - * string "prod". + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. + * * The source database name of backup contains the string "prod". * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `(metadata.name:howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ * `(error:*)` - Returns operations where: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. * * The backup name contains the string "howl". * * The operation started before 2018-03-28T14:50:00Z. * * The operation resulted in an error. @@ -3625,9 +3669,9 @@ export class DatabaseAdminClient { * `(metadata.source_backup:test) AND` \ * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ * `(error:*)` - Returns operations where: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata}. - * * The source backup of the copied backup name contains the string - * "test". + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata}. + * * The source backup name contains the string "test". * * The operation started before 2022-01-18T14:50:00Z. * * The operation resulted in an error. * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ @@ -3637,12 +3681,13 @@ export class DatabaseAdminClient { * `(metadata.source_backup:test_bkp)) AND` \ * `(error:*)` - Returns operations where: * * The operation's metadata matches either of criteria: - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} AND the - * database the backup was taken from has name containing string + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} + * AND the source database name of the backup contains the string * "test_db" - * * The operation's metadata type is {@link protos.google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata} AND the - * backup the backup was copied from has name containing string - * "test_bkp" + * * The operation's metadata type is + * {@link protos.google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata} + * AND the source backup name contains the string "test_bkp" * * The operation resulted in an error. * @param {number} request.pageSize * Number of operations to be returned in the response. If 0 or @@ -3650,8 +3695,9 @@ export class DatabaseAdminClient { * @param {string} request.pageToken * If non-empty, `page_token` should contain a * {@link protos.google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token|next_page_token} - * from a previous {@link protos.google.spanner.admin.database.v1.ListBackupOperationsResponse|ListBackupOperationsResponse} to the - * same `parent` and with the same `filter`. + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListBackupOperationsResponse|ListBackupOperationsResponse} + * to the same `parent` and with the same `filter`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -3691,14 +3737,15 @@ export class DatabaseAdminClient { * @param {string} request.parent * Required. The database whose roles should be listed. * Values are of the form - * `projects//instances//databases//databaseRoles`. + * `projects//instances//databases/`. * @param {number} request.pageSize * Number of database roles to be returned in the response. If 0 or less, * defaults to the server's maximum allowed page size. * @param {string} request.pageToken * If non-empty, `page_token` should contain a - * {@link protos.google.spanner.admin.database.v1.ListDatabaseRolesResponse.next_page_token|next_page_token} from a - * previous {@link protos.google.spanner.admin.database.v1.ListDatabaseRolesResponse|ListDatabaseRolesResponse}. + * {@link protos.google.spanner.admin.database.v1.ListDatabaseRolesResponse.next_page_token|next_page_token} + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListDatabaseRolesResponse|ListDatabaseRolesResponse}. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3793,14 +3840,15 @@ export class DatabaseAdminClient { * @param {string} request.parent * Required. The database whose roles should be listed. * Values are of the form - * `projects//instances//databases//databaseRoles`. + * `projects//instances//databases/`. * @param {number} request.pageSize * Number of database roles to be returned in the response. If 0 or less, * defaults to the server's maximum allowed page size. * @param {string} request.pageToken * If non-empty, `page_token` should contain a - * {@link protos.google.spanner.admin.database.v1.ListDatabaseRolesResponse.next_page_token|next_page_token} from a - * previous {@link protos.google.spanner.admin.database.v1.ListDatabaseRolesResponse|ListDatabaseRolesResponse}. + * {@link protos.google.spanner.admin.database.v1.ListDatabaseRolesResponse.next_page_token|next_page_token} + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListDatabaseRolesResponse|ListDatabaseRolesResponse}. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -3843,14 +3891,15 @@ export class DatabaseAdminClient { * @param {string} request.parent * Required. The database whose roles should be listed. * Values are of the form - * `projects//instances//databases//databaseRoles`. + * `projects//instances//databases/`. * @param {number} request.pageSize * Number of database roles to be returned in the response. If 0 or less, * defaults to the server's maximum allowed page size. * @param {string} request.pageToken * If non-empty, `page_token` should contain a - * {@link protos.google.spanner.admin.database.v1.ListDatabaseRolesResponse.next_page_token|next_page_token} from a - * previous {@link protos.google.spanner.admin.database.v1.ListDatabaseRolesResponse|ListDatabaseRolesResponse}. + * {@link protos.google.spanner.admin.database.v1.ListDatabaseRolesResponse.next_page_token|next_page_token} + * from a previous + * {@link protos.google.spanner.admin.database.v1.ListDatabaseRolesResponse|ListDatabaseRolesResponse}. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object}