diff --git a/protos/google/bigtable/admin/v2/instance.proto b/protos/google/bigtable/admin/v2/instance.proto index 2086f9707..d590788b2 100644 --- a/protos/google/bigtable/admin/v2/instance.proto +++ b/protos/google/bigtable/admin/v2/instance.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -28,6 +27,10 @@ option java_outer_classname = "InstanceProto"; option java_package = "com.google.bigtable.admin.v2"; option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; option ruby_package = "Google::Cloud::Bigtable::Admin::V2"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" +}; // A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and // the resources that serve them. @@ -113,6 +116,22 @@ message Cluster { pattern: "projects/{project}/instances/{instance}/clusters/{cluster}" }; + // Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected + // cluster. + message EncryptionConfig { + // Describes the Cloud KMS encryption key that will be used to protect the + // destination Bigtable cluster. The requirements for this key are: + // 1) The Cloud Bigtable service account associated with the project that + // contains this cluster must be granted the + // `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. + // 2) Only regional keys can be used and the region of the CMEK key must + // match the region of the cluster. + // 3) All clusters within an instance must use the same CMEK key. + string kms_key_name = 1 [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + }]; + } + // Possible states of a cluster. enum State { // The state of the cluster could not be determined. @@ -162,6 +181,10 @@ message Cluster { // The type of storage used by this cluster to serve its // parent instance's tables, unless explicitly overridden. StorageType default_storage_type = 5; + + // Immutable. The encryption configuration for CMEK-protected clusters. + EncryptionConfig encryption_config = 6 + [(google.api.field_behavior) = IMMUTABLE]; } // A configuration object describing how Cloud Bigtable should treat traffic @@ -194,7 +217,7 @@ message AppProfile { // (`OutputOnly`) // The unique name of the app profile. Values are of the form - // `projects//instances//appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + // `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. string name = 1; // Strongly validated etag for optimistic concurrency control. Preserve the diff --git a/protos/google/bigtable/admin/v2/table.proto b/protos/google/bigtable/admin/v2/table.proto index e85ca8ca9..a5578225e 100644 --- a/protos/google/bigtable/admin/v2/table.proto +++ b/protos/google/bigtable/admin/v2/table.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; @@ -28,6 +29,10 @@ option java_outer_classname = "TableProto"; option java_package = "com.google.bigtable.admin.v2"; option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; option ruby_package = "Google::Cloud::Bigtable::Admin::V2"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" +}; // Indicates the type of the restore source. enum RestoreSourceType { @@ -92,6 +97,14 @@ message Table { // Output only. The state of replication for the table in this cluster. ReplicationState replication_state = 1; + + // Output only. The encryption information for the table in this cluster. + // If the encryption key protecting this resource is customer managed, then + // its version can be rotated in Cloud Key Management Service (Cloud KMS). + // The primary version of the key and its status will be reflected here when + // changes propagate from Cloud KMS. + repeated EncryptionInfo encryption_info = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Possible timestamp granularities to use when keeping multiple versions @@ -120,12 +133,15 @@ message Table { // state. REPLICATION_VIEW = 3; + // Only populates 'name' and fields related to the table's encryption state. + ENCRYPTION_VIEW = 5; + // Populates all fields. FULL = 4; } - // Output only. The unique name of the table. Values are of the form - // `projects//instances//tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + // The unique name of the table. Values are of the form + // `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. // Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` string name = 1; @@ -133,7 +149,7 @@ message Table { // If it could not be determined whether or not the table has data in a // particular cluster (for example, if its zone is unavailable), then // there will be an entry for the cluster with UNKNOWN `replication_status`. - // Views: `REPLICATION_VIEW`, `FULL` + // Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` map cluster_states = 2; // (`CreationOnly`) @@ -196,6 +212,51 @@ message GcRule { } } +// Encryption information for a given resource. +// If this resource is protected with customer managed encryption, the in-use +// Cloud Key Management Service (Cloud KMS) key version is specified along with +// its status. +message EncryptionInfo { + // Possible encryption types for a resource. + enum EncryptionType { + // Encryption type was not specified, though data at rest remains encrypted. + ENCRYPTION_TYPE_UNSPECIFIED = 0; + + // The data backing this resource is encrypted at rest with a key that is + // fully managed by Google. No key version or status will be populated. + // This is the default state. + GOOGLE_DEFAULT_ENCRYPTION = 1; + + // The data backing this resource is encrypted at rest with a key that is + // managed by the customer. + // The in-use version of the key and its status are populated for + // CMEK-protected tables. + // CMEK-protected backups are pinned to the key version that was in use at + // the time the backup was taken. This key version is populated but its + // status is not tracked and is reported as `UNKNOWN`. + CUSTOMER_MANAGED_ENCRYPTION = 2; + } + + // Output only. The type of encryption used to protect this resource. + EncryptionType encryption_type = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The status of encrypt/decrypt calls on underlying data for + // this resource. Regardless of status, the existing data is always encrypted + // at rest. + google.rpc.Status encryption_status = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The version of the Cloud KMS key specified in the parent + // cluster that is in use for the data underlying this table. + string kms_key_version = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + } + ]; +} + // A snapshot of a table at a particular time. A snapshot can be used as a // checkpoint for data restoration or a data source for a new table. // @@ -225,7 +286,7 @@ message Snapshot { // Output only. The unique name of the snapshot. // Values are of the form - // `projects//instances//clusters//snapshots/`. + // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. string name = 1; // Output only. The source table at the time the snapshot was taken. @@ -318,6 +379,10 @@ message Backup { // Output only. The current state of the backup. State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The encryption information for the backup. + EncryptionInfo encryption_info = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Information about a backup. diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 1d9292cbf..076f81e2e 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -2751,6 +2751,9 @@ export namespace google { /** Cluster defaultStorageType */ defaultStorageType?: (google.bigtable.admin.v2.StorageType|keyof typeof google.bigtable.admin.v2.StorageType|null); + + /** Cluster encryptionConfig */ + encryptionConfig?: (google.bigtable.admin.v2.Cluster.IEncryptionConfig|null); } /** Represents a Cluster. */ @@ -2777,6 +2780,9 @@ export namespace google { /** Cluster defaultStorageType. */ public defaultStorageType: (google.bigtable.admin.v2.StorageType|keyof typeof google.bigtable.admin.v2.StorageType); + /** Cluster encryptionConfig. */ + public encryptionConfig?: (google.bigtable.admin.v2.Cluster.IEncryptionConfig|null); + /** * Creates a new Cluster instance using the specified properties. * @param [properties] Properties to set @@ -2850,6 +2856,96 @@ export namespace google { namespace Cluster { + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { + + /** EncryptionConfig kmsKeyName */ + kmsKeyName?: (string|null); + } + + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { + + /** + * Constructs a new EncryptionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Cluster.IEncryptionConfig); + + /** EncryptionConfig kmsKeyName. */ + public kmsKeyName: string; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionConfig instance + */ + public static create(properties?: google.bigtable.admin.v2.Cluster.IEncryptionConfig): google.bigtable.admin.v2.Cluster.EncryptionConfig; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Cluster.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Cluster.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.Cluster.EncryptionConfig; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.Cluster.EncryptionConfig; + + /** + * Verifies an EncryptionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionConfig + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Cluster.EncryptionConfig; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @param message EncryptionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Cluster.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** State enum. */ enum State { STATE_NOT_KNOWN = 0, @@ -7065,6 +7161,9 @@ export namespace google { /** ClusterState replicationState */ replicationState?: (google.bigtable.admin.v2.Table.ClusterState.ReplicationState|keyof typeof google.bigtable.admin.v2.Table.ClusterState.ReplicationState|null); + + /** ClusterState encryptionInfo */ + encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo[]|null); } /** Represents a ClusterState. */ @@ -7079,6 +7178,9 @@ export namespace google { /** ClusterState replicationState. */ public replicationState: (google.bigtable.admin.v2.Table.ClusterState.ReplicationState|keyof typeof google.bigtable.admin.v2.Table.ClusterState.ReplicationState); + /** ClusterState encryptionInfo. */ + public encryptionInfo: google.bigtable.admin.v2.IEncryptionInfo[]; + /** * Creates a new ClusterState instance using the specified properties. * @param [properties] Properties to set @@ -7175,6 +7277,7 @@ export namespace google { NAME_ONLY = 1, SCHEMA_VIEW = 2, REPLICATION_VIEW = 3, + ENCRYPTION_VIEW = 5, FULL = 4 } } @@ -7563,6 +7666,118 @@ export namespace google { } } + /** Properties of an EncryptionInfo. */ + interface IEncryptionInfo { + + /** EncryptionInfo encryptionType */ + encryptionType?: (google.bigtable.admin.v2.EncryptionInfo.EncryptionType|keyof typeof google.bigtable.admin.v2.EncryptionInfo.EncryptionType|null); + + /** EncryptionInfo encryptionStatus */ + encryptionStatus?: (google.rpc.IStatus|null); + + /** EncryptionInfo kmsKeyVersion */ + kmsKeyVersion?: (string|null); + } + + /** Represents an EncryptionInfo. */ + class EncryptionInfo implements IEncryptionInfo { + + /** + * Constructs a new EncryptionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IEncryptionInfo); + + /** EncryptionInfo encryptionType. */ + public encryptionType: (google.bigtable.admin.v2.EncryptionInfo.EncryptionType|keyof typeof google.bigtable.admin.v2.EncryptionInfo.EncryptionType); + + /** EncryptionInfo encryptionStatus. */ + public encryptionStatus?: (google.rpc.IStatus|null); + + /** EncryptionInfo kmsKeyVersion. */ + public kmsKeyVersion: string; + + /** + * Creates a new EncryptionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionInfo instance + */ + public static create(properties?: google.bigtable.admin.v2.IEncryptionInfo): google.bigtable.admin.v2.EncryptionInfo; + + /** + * Encodes the specified EncryptionInfo message. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @param message EncryptionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IEncryptionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @param message EncryptionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IEncryptionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.EncryptionInfo; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.EncryptionInfo; + + /** + * Verifies an EncryptionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EncryptionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionInfo + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.EncryptionInfo; + + /** + * Creates a plain object from an EncryptionInfo message. Also converts values to other types if specified. + * @param message EncryptionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.EncryptionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EncryptionInfo { + + /** EncryptionType enum. */ + enum EncryptionType { + ENCRYPTION_TYPE_UNSPECIFIED = 0, + GOOGLE_DEFAULT_ENCRYPTION = 1, + CUSTOMER_MANAGED_ENCRYPTION = 2 + } + } + /** Properties of a Snapshot. */ interface ISnapshot { @@ -7722,6 +7937,9 @@ export namespace google { /** Backup state */ state?: (google.bigtable.admin.v2.Backup.State|keyof typeof google.bigtable.admin.v2.Backup.State|null); + + /** Backup encryptionInfo */ + encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo|null); } /** Represents a Backup. */ @@ -7754,6 +7972,9 @@ export namespace google { /** Backup state. */ public state: (google.bigtable.admin.v2.Backup.State|keyof typeof google.bigtable.admin.v2.Backup.State); + /** Backup encryptionInfo. */ + public encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo|null); + /** * Creates a new Backup instance using the specified properties. * @param [properties] Properties to set diff --git a/protos/protos.js b/protos/protos.js index 017fad50d..253e6b6c1 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -6134,6 +6134,7 @@ * @property {google.bigtable.admin.v2.Cluster.State|null} [state] Cluster state * @property {number|null} [serveNodes] Cluster serveNodes * @property {google.bigtable.admin.v2.StorageType|null} [defaultStorageType] Cluster defaultStorageType + * @property {google.bigtable.admin.v2.Cluster.IEncryptionConfig|null} [encryptionConfig] Cluster encryptionConfig */ /** @@ -6191,6 +6192,14 @@ */ Cluster.prototype.defaultStorageType = 0; + /** + * Cluster encryptionConfig. + * @member {google.bigtable.admin.v2.Cluster.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.encryptionConfig = null; + /** * Creates a new Cluster instance using the specified properties. * @function create @@ -6225,6 +6234,8 @@ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.serveNodes); if (message.defaultStorageType != null && Object.hasOwnProperty.call(message, "defaultStorageType")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.defaultStorageType); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -6274,6 +6285,9 @@ case 5: message.defaultStorageType = reader.int32(); break; + case 6: + message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -6338,6 +6352,11 @@ case 2: break; } + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + var error = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.verify(message.encryptionConfig); + if (error) + return "encryptionConfig." + error; + } return null; }; @@ -6395,6 +6414,11 @@ message.defaultStorageType = 2; break; } + if (object.encryptionConfig != null) { + if (typeof object.encryptionConfig !== "object") + throw TypeError(".google.bigtable.admin.v2.Cluster.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.fromObject(object.encryptionConfig); + } return message; }; @@ -6417,6 +6441,7 @@ object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; object.serveNodes = 0; object.defaultStorageType = options.enums === String ? "STORAGE_TYPE_UNSPECIFIED" : 0; + object.encryptionConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -6428,6 +6453,8 @@ object.serveNodes = message.serveNodes; if (message.defaultStorageType != null && message.hasOwnProperty("defaultStorageType")) object.defaultStorageType = options.enums === String ? $root.google.bigtable.admin.v2.StorageType[message.defaultStorageType] : message.defaultStorageType; + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) + object.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.toObject(message.encryptionConfig, options); return object; }; @@ -6442,6 +6469,193 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + Cluster.EncryptionConfig = (function() { + + /** + * Properties of an EncryptionConfig. + * @memberof google.bigtable.admin.v2.Cluster + * @interface IEncryptionConfig + * @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName + */ + + /** + * Constructs a new EncryptionConfig. + * @memberof google.bigtable.admin.v2.Cluster + * @classdesc Represents an EncryptionConfig. + * @implements IEncryptionConfig + * @constructor + * @param {google.bigtable.admin.v2.Cluster.IEncryptionConfig=} [properties] Properties to set + */ + function EncryptionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptionConfig kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.kmsKeyName = ""; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IEncryptionConfig=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Cluster.EncryptionConfig} EncryptionConfig instance + */ + EncryptionConfig.create = function create(properties) { + return new EncryptionConfig(properties); + }; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.EncryptionConfig.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); + return writer; + }; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.EncryptionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Cluster.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Cluster.EncryptionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kmsKeyName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Cluster.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionConfig message. + * @function verify + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + return null; + }; + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Cluster.EncryptionConfig} EncryptionConfig + */ + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Cluster.EncryptionConfig) + return object; + var message = new $root.google.bigtable.admin.v2.Cluster.EncryptionConfig(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + return message; + }; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.EncryptionConfig} message EncryptionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.kmsKeyName = ""; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + return object; + }; + + /** + * Converts this EncryptionConfig to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @instance + * @returns {Object.} JSON object + */ + EncryptionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EncryptionConfig; + })(); + /** * State enum. * @name google.bigtable.admin.v2.Cluster.State @@ -10103,6 +10317,7 @@ case 1: case 2: case 3: + case 5: case 4: break; } @@ -10146,6 +10361,10 @@ case 3: message.view = 3; break; + case "ENCRYPTION_VIEW": + case 5: + message.view = 5; + break; case "FULL": case 4: message.view = 4; @@ -10588,6 +10807,7 @@ case 1: case 2: case 3: + case 5: case 4: break; } @@ -10625,6 +10845,10 @@ case 3: message.view = 3; break; + case "ENCRYPTION_VIEW": + case 5: + message.view = 5; + break; case "FULL": case 4: message.view = 4; @@ -16014,6 +16238,7 @@ * @memberof google.bigtable.admin.v2.Table * @interface IClusterState * @property {google.bigtable.admin.v2.Table.ClusterState.ReplicationState|null} [replicationState] ClusterState replicationState + * @property {Array.|null} [encryptionInfo] ClusterState encryptionInfo */ /** @@ -16025,6 +16250,7 @@ * @param {google.bigtable.admin.v2.Table.IClusterState=} [properties] Properties to set */ function ClusterState(properties) { + this.encryptionInfo = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16039,6 +16265,14 @@ */ ClusterState.prototype.replicationState = 0; + /** + * ClusterState encryptionInfo. + * @member {Array.} encryptionInfo + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @instance + */ + ClusterState.prototype.encryptionInfo = $util.emptyArray; + /** * Creates a new ClusterState instance using the specified properties. * @function create @@ -16065,6 +16299,9 @@ writer = $Writer.create(); if (message.replicationState != null && Object.hasOwnProperty.call(message, "replicationState")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.replicationState); + if (message.encryptionInfo != null && message.encryptionInfo.length) + for (var i = 0; i < message.encryptionInfo.length; ++i) + $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -16102,6 +16339,11 @@ case 1: message.replicationState = reader.int32(); break; + case 2: + if (!(message.encryptionInfo && message.encryptionInfo.length)) + message.encryptionInfo = []; + message.encryptionInfo.push($root.google.bigtable.admin.v2.EncryptionInfo.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -16149,6 +16391,15 @@ case 5: break; } + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { + if (!Array.isArray(message.encryptionInfo)) + return "encryptionInfo: array expected"; + for (var i = 0; i < message.encryptionInfo.length; ++i) { + var error = $root.google.bigtable.admin.v2.EncryptionInfo.verify(message.encryptionInfo[i]); + if (error) + return "encryptionInfo." + error; + } + } return null; }; @@ -16190,6 +16441,16 @@ message.replicationState = 5; break; } + if (object.encryptionInfo) { + if (!Array.isArray(object.encryptionInfo)) + throw TypeError(".google.bigtable.admin.v2.Table.ClusterState.encryptionInfo: array expected"); + message.encryptionInfo = []; + for (var i = 0; i < object.encryptionInfo.length; ++i) { + if (typeof object.encryptionInfo[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.ClusterState.encryptionInfo: object expected"); + message.encryptionInfo[i] = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo[i]); + } + } return message; }; @@ -16206,10 +16467,17 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.encryptionInfo = []; if (options.defaults) object.replicationState = options.enums === String ? "STATE_NOT_KNOWN" : 0; if (message.replicationState != null && message.hasOwnProperty("replicationState")) object.replicationState = options.enums === String ? $root.google.bigtable.admin.v2.Table.ClusterState.ReplicationState[message.replicationState] : message.replicationState; + if (message.encryptionInfo && message.encryptionInfo.length) { + object.encryptionInfo = []; + for (var j = 0; j < message.encryptionInfo.length; ++j) + object.encryptionInfo[j] = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo[j], options); + } return object; }; @@ -16271,6 +16539,7 @@ * @property {number} NAME_ONLY=1 NAME_ONLY value * @property {number} SCHEMA_VIEW=2 SCHEMA_VIEW value * @property {number} REPLICATION_VIEW=3 REPLICATION_VIEW value + * @property {number} ENCRYPTION_VIEW=5 ENCRYPTION_VIEW value * @property {number} FULL=4 FULL value */ Table.View = (function() { @@ -16279,6 +16548,7 @@ values[valuesById[1] = "NAME_ONLY"] = 1; values[valuesById[2] = "SCHEMA_VIEW"] = 2; values[valuesById[3] = "REPLICATION_VIEW"] = 3; + values[valuesById[5] = "ENCRYPTION_VIEW"] = 5; values[valuesById[4] = "FULL"] = 4; return values; })(); @@ -17201,6 +17471,277 @@ return GcRule; })(); + v2.EncryptionInfo = (function() { + + /** + * Properties of an EncryptionInfo. + * @memberof google.bigtable.admin.v2 + * @interface IEncryptionInfo + * @property {google.bigtable.admin.v2.EncryptionInfo.EncryptionType|null} [encryptionType] EncryptionInfo encryptionType + * @property {google.rpc.IStatus|null} [encryptionStatus] EncryptionInfo encryptionStatus + * @property {string|null} [kmsKeyVersion] EncryptionInfo kmsKeyVersion + */ + + /** + * Constructs a new EncryptionInfo. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an EncryptionInfo. + * @implements IEncryptionInfo + * @constructor + * @param {google.bigtable.admin.v2.IEncryptionInfo=} [properties] Properties to set + */ + function EncryptionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptionInfo encryptionType. + * @member {google.bigtable.admin.v2.EncryptionInfo.EncryptionType} encryptionType + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + */ + EncryptionInfo.prototype.encryptionType = 0; + + /** + * EncryptionInfo encryptionStatus. + * @member {google.rpc.IStatus|null|undefined} encryptionStatus + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + */ + EncryptionInfo.prototype.encryptionStatus = null; + + /** + * EncryptionInfo kmsKeyVersion. + * @member {string} kmsKeyVersion + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + */ + EncryptionInfo.prototype.kmsKeyVersion = ""; + + /** + * Creates a new EncryptionInfo instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.IEncryptionInfo=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo instance + */ + EncryptionInfo.create = function create(properties) { + return new EncryptionInfo(properties); + }; + + /** + * Encodes the specified EncryptionInfo message. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.IEncryptionInfo} message EncryptionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyVersion != null && Object.hasOwnProperty.call(message, "kmsKeyVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyVersion); + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encryptionType); + if (message.encryptionStatus != null && Object.hasOwnProperty.call(message, "encryptionStatus")) + $root.google.rpc.Status.encode(message.encryptionStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EncryptionInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.IEncryptionInfo} message EncryptionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.EncryptionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.encryptionType = reader.int32(); + break; + case 4: + message.encryptionStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 2: + message.kmsKeyVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionInfo message. + * @function verify + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + switch (message.encryptionType) { + default: + return "encryptionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionStatus != null && message.hasOwnProperty("encryptionStatus")) { + var error = $root.google.rpc.Status.verify(message.encryptionStatus); + if (error) + return "encryptionStatus." + error; + } + if (message.kmsKeyVersion != null && message.hasOwnProperty("kmsKeyVersion")) + if (!$util.isString(message.kmsKeyVersion)) + return "kmsKeyVersion: string expected"; + return null; + }; + + /** + * Creates an EncryptionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo + */ + EncryptionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.EncryptionInfo) + return object; + var message = new $root.google.bigtable.admin.v2.EncryptionInfo(); + switch (object.encryptionType) { + case "ENCRYPTION_TYPE_UNSPECIFIED": + case 0: + message.encryptionType = 0; + break; + case "GOOGLE_DEFAULT_ENCRYPTION": + case 1: + message.encryptionType = 1; + break; + case "CUSTOMER_MANAGED_ENCRYPTION": + case 2: + message.encryptionType = 2; + break; + } + if (object.encryptionStatus != null) { + if (typeof object.encryptionStatus !== "object") + throw TypeError(".google.bigtable.admin.v2.EncryptionInfo.encryptionStatus: object expected"); + message.encryptionStatus = $root.google.rpc.Status.fromObject(object.encryptionStatus); + } + if (object.kmsKeyVersion != null) + message.kmsKeyVersion = String(object.kmsKeyVersion); + return message; + }; + + /** + * Creates a plain object from an EncryptionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.EncryptionInfo} message EncryptionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kmsKeyVersion = ""; + object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; + object.encryptionStatus = null; + } + if (message.kmsKeyVersion != null && message.hasOwnProperty("kmsKeyVersion")) + object.kmsKeyVersion = message.kmsKeyVersion; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + object.encryptionType = options.enums === String ? $root.google.bigtable.admin.v2.EncryptionInfo.EncryptionType[message.encryptionType] : message.encryptionType; + if (message.encryptionStatus != null && message.hasOwnProperty("encryptionStatus")) + object.encryptionStatus = $root.google.rpc.Status.toObject(message.encryptionStatus, options); + return object; + }; + + /** + * Converts this EncryptionInfo to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + * @returns {Object.} JSON object + */ + EncryptionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EncryptionType enum. + * @name google.bigtable.admin.v2.EncryptionInfo.EncryptionType + * @enum {number} + * @property {number} ENCRYPTION_TYPE_UNSPECIFIED=0 ENCRYPTION_TYPE_UNSPECIFIED value + * @property {number} GOOGLE_DEFAULT_ENCRYPTION=1 GOOGLE_DEFAULT_ENCRYPTION value + * @property {number} CUSTOMER_MANAGED_ENCRYPTION=2 CUSTOMER_MANAGED_ENCRYPTION value + */ + EncryptionInfo.EncryptionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENCRYPTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_DEFAULT_ENCRYPTION"] = 1; + values[valuesById[2] = "CUSTOMER_MANAGED_ENCRYPTION"] = 2; + return values; + })(); + + return EncryptionInfo; + })(); + v2.Snapshot = (function() { /** @@ -17597,6 +18138,7 @@ * @property {google.protobuf.ITimestamp|null} [endTime] Backup endTime * @property {number|Long|null} [sizeBytes] Backup sizeBytes * @property {google.bigtable.admin.v2.Backup.State|null} [state] Backup state + * @property {google.bigtable.admin.v2.IEncryptionInfo|null} [encryptionInfo] Backup encryptionInfo */ /** @@ -17670,6 +18212,14 @@ */ Backup.prototype.state = 0; + /** + * Backup encryptionInfo. + * @member {google.bigtable.admin.v2.IEncryptionInfo|null|undefined} encryptionInfo + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.encryptionInfo = null; + /** * Creates a new Backup instance using the specified properties. * @function create @@ -17708,6 +18258,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).int64(message.sizeBytes); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) + $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -17763,6 +18315,9 @@ case 7: message.state = reader.int32(); break; + case 9: + message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -17831,6 +18386,11 @@ case 2: break; } + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { + var error = $root.google.bigtable.admin.v2.EncryptionInfo.verify(message.encryptionInfo); + if (error) + return "encryptionInfo." + error; + } return null; }; @@ -17888,6 +18448,11 @@ message.state = 2; break; } + if (object.encryptionInfo != null) { + if (typeof object.encryptionInfo !== "object") + throw TypeError(".google.bigtable.admin.v2.Backup.encryptionInfo: object expected"); + message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo); + } return message; }; @@ -17916,6 +18481,7 @@ } else object.sizeBytes = options.longs === String ? "0" : 0; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.encryptionInfo = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -17934,6 +18500,8 @@ object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; if (message.state != null && message.hasOwnProperty("state")) object.state = options.enums === String ? $root.google.bigtable.admin.v2.Backup.State[message.state] : message.state; + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) + object.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo, options); return object; }; diff --git a/protos/protos.json b/protos/protos.json index 56314756c..f39720777 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -14,7 +14,9 @@ "java_outer_classname": "TableProto", "java_package": "com.google.bigtable.admin.v2", "php_namespace": "Google\\Cloud\\Bigtable\\Admin\\V2", - "ruby_package": "Google::Cloud::Bigtable::Admin::V2" + "ruby_package": "Google::Cloud::Bigtable::Admin::V2", + "(google.api.resource_definition).type": "cloudkms.googleapis.com/CryptoKeyVersion", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" }, "nested": { "BigtableInstanceAdmin": { @@ -889,9 +891,27 @@ "defaultStorageType": { "type": "StorageType", "id": 5 + }, + "encryptionConfig": { + "type": "EncryptionConfig", + "id": 6, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } } }, "nested": { + "EncryptionConfig": { + "fields": { + "kmsKeyName": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" + } + } + } + }, "State": { "values": { "STATE_NOT_KNOWN": 0, @@ -2099,6 +2119,14 @@ "replicationState": { "type": "ReplicationState", "id": 1 + }, + "encryptionInfo": { + "rule": "repeated", + "type": "EncryptionInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -2126,6 +2154,7 @@ "NAME_ONLY": 1, "SCHEMA_VIEW": 2, "REPLICATION_VIEW": 3, + "ENCRYPTION_VIEW": 5, "FULL": 4 } } @@ -2189,6 +2218,41 @@ } } }, + "EncryptionInfo": { + "fields": { + "encryptionType": { + "type": "EncryptionType", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "encryptionStatus": { + "type": "google.rpc.Status", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "kmsKeyVersion": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + } + }, + "nested": { + "EncryptionType": { + "values": { + "ENCRYPTION_TYPE_UNSPECIFIED": 0, + "GOOGLE_DEFAULT_ENCRYPTION": 1, + "CUSTOMER_MANAGED_ENCRYPTION": 2 + } + } + } + }, "Snapshot": { "options": { "(google.api.resource).type": "bigtable.googleapis.com/Snapshot", @@ -2288,6 +2352,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "encryptionInfo": { + "type": "EncryptionInfo", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { diff --git a/src/v2/bigtable_client_config.json b/src/v2/bigtable_client_config.json index 749f22e98..2c2765aa6 100644 --- a/src/v2/bigtable_client_config.json +++ b/src/v2/bigtable_client_config.json @@ -32,12 +32,12 @@ "ReadRows": { "timeout_millis": 43200000, "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" }, "SampleRowKeys": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" }, "MutateRow": { "timeout_millis": 60000, @@ -47,17 +47,17 @@ "MutateRows": { "timeout_millis": 600000, "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" }, "CheckAndMutateRow": { "timeout_millis": 20000, "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" }, "ReadModifyWriteRow": { "timeout_millis": 20000, "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" } } } diff --git a/src/v2/bigtable_instance_admin_client.ts b/src/v2/bigtable_instance_admin_client.ts index 66605f462..b0832d3ee 100644 --- a/src/v2/bigtable_instance_admin_client.ts +++ b/src/v2/bigtable_instance_admin_client.ts @@ -2141,6 +2141,8 @@ export class BigtableInstanceAdminClient { * (`CreationOnly`) * The type of storage used by this cluster to serve its * parent instance's tables, unless explicitly overridden. + * @param {google.bigtable.admin.v2.Cluster.EncryptionConfig} request.encryptionConfig + * Immutable. The encryption configuration for CMEK-protected clusters. * @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. diff --git a/src/v2/bigtable_table_admin_client_config.json b/src/v2/bigtable_table_admin_client_config.json index d392d4940..86321882e 100644 --- a/src/v2/bigtable_table_admin_client_config.json +++ b/src/v2/bigtable_table_admin_client_config.json @@ -35,7 +35,6 @@ "retry_params_name": "default" }, "CreateTableFromSnapshot": { - "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, @@ -75,7 +74,6 @@ "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" }, "SnapshotTable": { - "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, @@ -99,20 +97,24 @@ "retry_params_name": "default" }, "GetBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" }, "UpdateBackup": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteBackup": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ListBackups": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" }, "RestoreTable": { "retry_codes_name": "non_idempotent", diff --git a/synth.metadata b/synth.metadata index 4079075ee..5b71d3d55 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-bigtable.git", - "sha": "da875a17c8a7a20d020e534a5a315fec45630e83" + "sha": "278c4ddfb3085b7a2ee108efafdbc0ccfe806cc0" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d189e871205fea665a9648f7c4676f027495ccaf", - "internalRef": "345596855" + "sha": "eabec5a21219401bad79e1cc7d900c1658aee5fd", + "internalRef": "359130387" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "318e351e26ba65b2b3cfa3f61b3b64e3540c3525" + "sha": "79ab0b44a2cc7d803d07c107f9faf07729fc4012" } } ],