diff --git a/dev/protos/admin_v1.json b/dev/protos/admin_v1.json index 531dcec3a..05d19d0b5 100644 --- a/dev/protos/admin_v1.json +++ b/dev/protos/admin_v1.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { @@ -145,6 +148,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "deleteTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "locationId": { "type": "string", "id": 9 @@ -190,6 +200,27 @@ "type": "DeleteProtectionState", "id": 22 }, + "cmekConfig": { + "type": "CmekConfig", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "previousId": { + "type": "string", + "id": 25, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sourceInfo": { + "type": "SourceInfo", + "id": 26, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "etag": { "type": "string", "id": 99 @@ -231,6 +262,104 @@ "DELETE_PROTECTION_DISABLED": 1, "DELETE_PROTECTION_ENABLED": 2 } + }, + "CmekConfig": { + "fields": { + "kmsKeyName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "activeKeyVersion": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "SourceInfo": { + "oneofs": { + "source": { + "oneof": [ + "backup" + ] + } + }, + "fields": { + "backup": { + "type": "BackupSource", + "id": 1 + }, + "operation": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "firestore.googleapis.com/Operation" + } + } + }, + "nested": { + "BackupSource": { + "fields": { + "backup": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "firestore.googleapis.com/Backup" + } + } + } + } + } + }, + "EncryptionConfig": { + "oneofs": { + "encryptionType": { + "oneof": [ + "googleDefaultEncryption", + "useSourceEncryption", + "customerManagedEncryption" + ] + } + }, + "fields": { + "googleDefaultEncryption": { + "type": "GoogleDefaultEncryptionOptions", + "id": 1 + }, + "useSourceEncryption": { + "type": "SourceEncryptionOptions", + "id": 2 + }, + "customerManagedEncryption": { + "type": "CustomerManagedEncryptionOptions", + "id": 3 + } + }, + "nested": { + "GoogleDefaultEncryptionOptions": { + "fields": {} + }, + "SourceEncryptionOptions": { + "fields": {} + }, + "CustomerManagedEncryptionOptions": { + "fields": { + "kmsKeyName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } } } }, @@ -1445,6 +1574,13 @@ "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "firestore.googleapis.com/Backup" } + }, + "encryptionConfig": { + "type": "Database.EncryptionConfig", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -2176,6 +2312,20 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + } + } } } }, diff --git a/dev/protos/firestore_admin_v1_proto_api.d.ts b/dev/protos/firestore_admin_v1_proto_api.d.ts index a326cbb3b..4325d61e7 100644 --- a/dev/protos/firestore_admin_v1_proto_api.d.ts +++ b/dev/protos/firestore_admin_v1_proto_api.d.ts @@ -194,6 +194,9 @@ export namespace google { /** Database updateTime */ updateTime?: (google.protobuf.ITimestamp|null); + /** Database deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + /** Database locationId */ locationId?: (string|null); @@ -221,6 +224,15 @@ export namespace google { /** Database deleteProtectionState */ deleteProtectionState?: (google.firestore.admin.v1.Database.DeleteProtectionState|null); + /** Database cmekConfig */ + cmekConfig?: (google.firestore.admin.v1.Database.ICmekConfig|null); + + /** Database previousId */ + previousId?: (string|null); + + /** Database sourceInfo */ + sourceInfo?: (google.firestore.admin.v1.Database.ISourceInfo|null); + /** Database etag */ etag?: (string|null); } @@ -246,6 +258,9 @@ export namespace google { /** Database updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); + /** Database deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + /** Database locationId. */ public locationId: string; @@ -273,6 +288,15 @@ export namespace google { /** Database deleteProtectionState. */ public deleteProtectionState: google.firestore.admin.v1.Database.DeleteProtectionState; + /** Database cmekConfig. */ + public cmekConfig?: (google.firestore.admin.v1.Database.ICmekConfig|null); + + /** Database previousId. */ + public previousId: string; + + /** Database sourceInfo. */ + public sourceInfo?: (google.firestore.admin.v1.Database.ISourceInfo|null); + /** Database etag. */ public etag: string; @@ -326,6 +350,366 @@ export namespace google { /** DeleteProtectionState enum. */ type DeleteProtectionState = "DELETE_PROTECTION_STATE_UNSPECIFIED"| "DELETE_PROTECTION_DISABLED"| "DELETE_PROTECTION_ENABLED"; + + /** Properties of a CmekConfig. */ + interface ICmekConfig { + + /** CmekConfig kmsKeyName */ + kmsKeyName?: (string|null); + + /** CmekConfig activeKeyVersion */ + activeKeyVersion?: (string[]|null); + } + + /** Represents a CmekConfig. */ + class CmekConfig implements ICmekConfig { + + /** + * Constructs a new CmekConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Database.ICmekConfig); + + /** CmekConfig kmsKeyName. */ + public kmsKeyName: string; + + /** CmekConfig activeKeyVersion. */ + public activeKeyVersion: string[]; + + /** + * Creates a CmekConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CmekConfig + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.CmekConfig; + + /** + * Creates a plain object from a CmekConfig message. Also converts values to other types if specified. + * @param message CmekConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.Database.CmekConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CmekConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CmekConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SourceInfo. */ + interface ISourceInfo { + + /** SourceInfo backup */ + backup?: (google.firestore.admin.v1.Database.SourceInfo.IBackupSource|null); + + /** SourceInfo operation */ + operation?: (string|null); + } + + /** Represents a SourceInfo. */ + class SourceInfo implements ISourceInfo { + + /** + * Constructs a new SourceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Database.ISourceInfo); + + /** SourceInfo backup. */ + public backup?: (google.firestore.admin.v1.Database.SourceInfo.IBackupSource|null); + + /** SourceInfo operation. */ + public operation: string; + + /** SourceInfo source. */ + public source?: "backup"; + + /** + * Creates a SourceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceInfo + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.SourceInfo; + + /** + * Creates a plain object from a SourceInfo message. Also converts values to other types if specified. + * @param message SourceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.Database.SourceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceInfo { + + /** Properties of a BackupSource. */ + interface IBackupSource { + + /** BackupSource backup */ + backup?: (string|null); + } + + /** Represents a BackupSource. */ + class BackupSource implements IBackupSource { + + /** + * Constructs a new BackupSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Database.SourceInfo.IBackupSource); + + /** BackupSource backup. */ + public backup: string; + + /** + * Creates a BackupSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupSource + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.SourceInfo.BackupSource; + + /** + * Creates a plain object from a BackupSource message. Also converts values to other types if specified. + * @param message BackupSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.Database.SourceInfo.BackupSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { + + /** EncryptionConfig googleDefaultEncryption */ + googleDefaultEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.IGoogleDefaultEncryptionOptions|null); + + /** EncryptionConfig useSourceEncryption */ + useSourceEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.ISourceEncryptionOptions|null); + + /** EncryptionConfig customerManagedEncryption */ + customerManagedEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.ICustomerManagedEncryptionOptions|null); + } + + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { + + /** + * Constructs a new EncryptionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Database.IEncryptionConfig); + + /** EncryptionConfig googleDefaultEncryption. */ + public googleDefaultEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.IGoogleDefaultEncryptionOptions|null); + + /** EncryptionConfig useSourceEncryption. */ + public useSourceEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.ISourceEncryptionOptions|null); + + /** EncryptionConfig customerManagedEncryption. */ + public customerManagedEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.ICustomerManagedEncryptionOptions|null); + + /** EncryptionConfig encryptionType. */ + public encryptionType?: ("googleDefaultEncryption"|"useSourceEncryption"|"customerManagedEncryption"); + + /** + * 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.firestore.admin.v1.Database.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.firestore.admin.v1.Database.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EncryptionConfig { + + /** Properties of a GoogleDefaultEncryptionOptions. */ + interface IGoogleDefaultEncryptionOptions { + } + + /** Represents a GoogleDefaultEncryptionOptions. */ + class GoogleDefaultEncryptionOptions implements IGoogleDefaultEncryptionOptions { + + /** + * Constructs a new GoogleDefaultEncryptionOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Database.EncryptionConfig.IGoogleDefaultEncryptionOptions); + + /** + * Creates a GoogleDefaultEncryptionOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoogleDefaultEncryptionOptions + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions; + + /** + * Creates a plain object from a GoogleDefaultEncryptionOptions message. Also converts values to other types if specified. + * @param message GoogleDefaultEncryptionOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoogleDefaultEncryptionOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoogleDefaultEncryptionOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SourceEncryptionOptions. */ + interface ISourceEncryptionOptions { + } + + /** Represents a SourceEncryptionOptions. */ + class SourceEncryptionOptions implements ISourceEncryptionOptions { + + /** + * Constructs a new SourceEncryptionOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Database.EncryptionConfig.ISourceEncryptionOptions); + + /** + * Creates a SourceEncryptionOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceEncryptionOptions + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions; + + /** + * Creates a plain object from a SourceEncryptionOptions message. Also converts values to other types if specified. + * @param message SourceEncryptionOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceEncryptionOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceEncryptionOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomerManagedEncryptionOptions. */ + interface ICustomerManagedEncryptionOptions { + + /** CustomerManagedEncryptionOptions kmsKeyName */ + kmsKeyName?: (string|null); + } + + /** Represents a CustomerManagedEncryptionOptions. */ + class CustomerManagedEncryptionOptions implements ICustomerManagedEncryptionOptions { + + /** + * Constructs a new CustomerManagedEncryptionOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Database.EncryptionConfig.ICustomerManagedEncryptionOptions); + + /** CustomerManagedEncryptionOptions kmsKeyName. */ + public kmsKeyName: string; + + /** + * Creates a CustomerManagedEncryptionOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomerManagedEncryptionOptions + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions; + + /** + * Creates a plain object from a CustomerManagedEncryptionOptions message. Also converts values to other types if specified. + * @param message CustomerManagedEncryptionOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomerManagedEncryptionOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomerManagedEncryptionOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } /** Properties of a Field. */ @@ -2991,6 +3375,9 @@ export namespace google { /** RestoreDatabaseRequest backup */ backup?: (string|null); + + /** RestoreDatabaseRequest encryptionConfig */ + encryptionConfig?: (google.firestore.admin.v1.Database.IEncryptionConfig|null); } /** Represents a RestoreDatabaseRequest. */ @@ -3011,6 +3398,9 @@ export namespace google { /** RestoreDatabaseRequest backup. */ public backup: string; + /** RestoreDatabaseRequest encryptionConfig. */ + public encryptionConfig?: (google.firestore.admin.v1.Database.IEncryptionConfig|null); + /** * Creates a RestoreDatabaseRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -4803,6 +5193,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -4817,6 +5210,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -4846,6 +5242,57 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a NodeSettings. */ interface INodeSettings { diff --git a/dev/protos/firestore_admin_v1_proto_api.js b/dev/protos/firestore_admin_v1_proto_api.js index 1f923e0b4..5d1681d6f 100644 --- a/dev/protos/firestore_admin_v1_proto_api.js +++ b/dev/protos/firestore_admin_v1_proto_api.js @@ -479,6 +479,7 @@ * @property {string|null} [uid] Database uid * @property {google.protobuf.ITimestamp|null} [createTime] Database createTime * @property {google.protobuf.ITimestamp|null} [updateTime] Database updateTime + * @property {google.protobuf.ITimestamp|null} [deleteTime] Database deleteTime * @property {string|null} [locationId] Database locationId * @property {google.firestore.admin.v1.Database.DatabaseType|null} [type] Database type * @property {google.firestore.admin.v1.Database.ConcurrencyMode|null} [concurrencyMode] Database concurrencyMode @@ -488,6 +489,9 @@ * @property {google.firestore.admin.v1.Database.AppEngineIntegrationMode|null} [appEngineIntegrationMode] Database appEngineIntegrationMode * @property {string|null} [keyPrefix] Database keyPrefix * @property {google.firestore.admin.v1.Database.DeleteProtectionState|null} [deleteProtectionState] Database deleteProtectionState + * @property {google.firestore.admin.v1.Database.ICmekConfig|null} [cmekConfig] Database cmekConfig + * @property {string|null} [previousId] Database previousId + * @property {google.firestore.admin.v1.Database.ISourceInfo|null} [sourceInfo] Database sourceInfo * @property {string|null} [etag] Database etag */ @@ -538,6 +542,14 @@ */ Database.prototype.updateTime = null; + /** + * Database deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.firestore.admin.v1.Database + * @instance + */ + Database.prototype.deleteTime = null; + /** * Database locationId. * @member {string} locationId @@ -610,6 +622,30 @@ */ Database.prototype.deleteProtectionState = 0; + /** + * Database cmekConfig. + * @member {google.firestore.admin.v1.Database.ICmekConfig|null|undefined} cmekConfig + * @memberof google.firestore.admin.v1.Database + * @instance + */ + Database.prototype.cmekConfig = null; + + /** + * Database previousId. + * @member {string} previousId + * @memberof google.firestore.admin.v1.Database + * @instance + */ + Database.prototype.previousId = ""; + + /** + * Database sourceInfo. + * @member {google.firestore.admin.v1.Database.ISourceInfo|null|undefined} sourceInfo + * @memberof google.firestore.admin.v1.Database + * @instance + */ + Database.prototype.sourceInfo = null; + /** * Database etag. * @member {string} etag @@ -644,6 +680,11 @@ throw TypeError(".google.firestore.admin.v1.Database.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.firestore.admin.v1.Database.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } if (object.locationId != null) message.locationId = String(object.locationId); switch (object.type) { @@ -762,6 +803,18 @@ message.deleteProtectionState = 2; break; } + if (object.cmekConfig != null) { + if (typeof object.cmekConfig !== "object") + throw TypeError(".google.firestore.admin.v1.Database.cmekConfig: object expected"); + message.cmekConfig = $root.google.firestore.admin.v1.Database.CmekConfig.fromObject(object.cmekConfig); + } + if (object.previousId != null) + message.previousId = String(object.previousId); + if (object.sourceInfo != null) { + if (typeof object.sourceInfo !== "object") + throw TypeError(".google.firestore.admin.v1.Database.sourceInfo: object expected"); + message.sourceInfo = $root.google.firestore.admin.v1.Database.SourceInfo.fromObject(object.sourceInfo); + } if (object.etag != null) message.etag = String(object.etag); return message; @@ -785,6 +838,7 @@ object.uid = ""; object.createTime = null; object.updateTime = null; + object.deleteTime = null; object.locationId = ""; object.type = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; object.concurrencyMode = options.enums === String ? "CONCURRENCY_MODE_UNSPECIFIED" : 0; @@ -794,6 +848,9 @@ object.keyPrefix = ""; object.pointInTimeRecoveryEnablement = options.enums === String ? "POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED" : 0; object.deleteProtectionState = options.enums === String ? "DELETE_PROTECTION_STATE_UNSPECIFIED" : 0; + object.cmekConfig = null; + object.previousId = ""; + object.sourceInfo = null; object.etag = ""; } if (message.name != null && message.hasOwnProperty("name")) @@ -804,6 +861,8 @@ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); if (message.locationId != null && message.hasOwnProperty("locationId")) object.locationId = message.locationId; if (message.type != null && message.hasOwnProperty("type")) @@ -822,117 +881,884 @@ object.pointInTimeRecoveryEnablement = options.enums === String ? $root.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement[message.pointInTimeRecoveryEnablement] === undefined ? message.pointInTimeRecoveryEnablement : $root.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement[message.pointInTimeRecoveryEnablement] : message.pointInTimeRecoveryEnablement; if (message.deleteProtectionState != null && message.hasOwnProperty("deleteProtectionState")) object.deleteProtectionState = options.enums === String ? $root.google.firestore.admin.v1.Database.DeleteProtectionState[message.deleteProtectionState] === undefined ? message.deleteProtectionState : $root.google.firestore.admin.v1.Database.DeleteProtectionState[message.deleteProtectionState] : message.deleteProtectionState; + if (message.cmekConfig != null && message.hasOwnProperty("cmekConfig")) + object.cmekConfig = $root.google.firestore.admin.v1.Database.CmekConfig.toObject(message.cmekConfig, options); + if (message.previousId != null && message.hasOwnProperty("previousId")) + object.previousId = message.previousId; + if (message.sourceInfo != null && message.hasOwnProperty("sourceInfo")) + object.sourceInfo = $root.google.firestore.admin.v1.Database.SourceInfo.toObject(message.sourceInfo, options); if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; return object; }; - /** - * Converts this Database to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.Database - * @instance - * @returns {Object.} JSON object - */ - Database.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Database to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Database + * @instance + * @returns {Object.} JSON object + */ + Database.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Database + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Database + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Database.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Database"; + }; + + /** + * DatabaseType enum. + * @name google.firestore.admin.v1.Database.DatabaseType + * @enum {string} + * @property {string} DATABASE_TYPE_UNSPECIFIED=DATABASE_TYPE_UNSPECIFIED DATABASE_TYPE_UNSPECIFIED value + * @property {string} FIRESTORE_NATIVE=FIRESTORE_NATIVE FIRESTORE_NATIVE value + * @property {string} DATASTORE_MODE=DATASTORE_MODE DATASTORE_MODE value + */ + Database.DatabaseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = "DATABASE_TYPE_UNSPECIFIED"; + values[valuesById[1] = "FIRESTORE_NATIVE"] = "FIRESTORE_NATIVE"; + values[valuesById[2] = "DATASTORE_MODE"] = "DATASTORE_MODE"; + return values; + })(); + + /** + * ConcurrencyMode enum. + * @name google.firestore.admin.v1.Database.ConcurrencyMode + * @enum {string} + * @property {string} CONCURRENCY_MODE_UNSPECIFIED=CONCURRENCY_MODE_UNSPECIFIED CONCURRENCY_MODE_UNSPECIFIED value + * @property {string} OPTIMISTIC=OPTIMISTIC OPTIMISTIC value + * @property {string} PESSIMISTIC=PESSIMISTIC PESSIMISTIC value + * @property {string} OPTIMISTIC_WITH_ENTITY_GROUPS=OPTIMISTIC_WITH_ENTITY_GROUPS OPTIMISTIC_WITH_ENTITY_GROUPS value + */ + Database.ConcurrencyMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONCURRENCY_MODE_UNSPECIFIED"] = "CONCURRENCY_MODE_UNSPECIFIED"; + values[valuesById[1] = "OPTIMISTIC"] = "OPTIMISTIC"; + values[valuesById[2] = "PESSIMISTIC"] = "PESSIMISTIC"; + values[valuesById[3] = "OPTIMISTIC_WITH_ENTITY_GROUPS"] = "OPTIMISTIC_WITH_ENTITY_GROUPS"; + return values; + })(); + + /** + * PointInTimeRecoveryEnablement enum. + * @name google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement + * @enum {string} + * @property {string} POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED=POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED value + * @property {string} POINT_IN_TIME_RECOVERY_ENABLED=POINT_IN_TIME_RECOVERY_ENABLED POINT_IN_TIME_RECOVERY_ENABLED value + * @property {string} POINT_IN_TIME_RECOVERY_DISABLED=POINT_IN_TIME_RECOVERY_DISABLED POINT_IN_TIME_RECOVERY_DISABLED value + */ + Database.PointInTimeRecoveryEnablement = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED"] = "POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED"; + values[valuesById[1] = "POINT_IN_TIME_RECOVERY_ENABLED"] = "POINT_IN_TIME_RECOVERY_ENABLED"; + values[valuesById[2] = "POINT_IN_TIME_RECOVERY_DISABLED"] = "POINT_IN_TIME_RECOVERY_DISABLED"; + return values; + })(); + + /** + * AppEngineIntegrationMode enum. + * @name google.firestore.admin.v1.Database.AppEngineIntegrationMode + * @enum {string} + * @property {string} APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED=APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED value + * @property {string} ENABLED=ENABLED ENABLED value + * @property {string} DISABLED=DISABLED DISABLED value + */ + Database.AppEngineIntegrationMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED"] = "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED"; + values[valuesById[1] = "ENABLED"] = "ENABLED"; + values[valuesById[2] = "DISABLED"] = "DISABLED"; + return values; + })(); + + /** + * DeleteProtectionState enum. + * @name google.firestore.admin.v1.Database.DeleteProtectionState + * @enum {string} + * @property {string} DELETE_PROTECTION_STATE_UNSPECIFIED=DELETE_PROTECTION_STATE_UNSPECIFIED DELETE_PROTECTION_STATE_UNSPECIFIED value + * @property {string} DELETE_PROTECTION_DISABLED=DELETE_PROTECTION_DISABLED DELETE_PROTECTION_DISABLED value + * @property {string} DELETE_PROTECTION_ENABLED=DELETE_PROTECTION_ENABLED DELETE_PROTECTION_ENABLED value + */ + Database.DeleteProtectionState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DELETE_PROTECTION_STATE_UNSPECIFIED"] = "DELETE_PROTECTION_STATE_UNSPECIFIED"; + values[valuesById[1] = "DELETE_PROTECTION_DISABLED"] = "DELETE_PROTECTION_DISABLED"; + values[valuesById[2] = "DELETE_PROTECTION_ENABLED"] = "DELETE_PROTECTION_ENABLED"; + return values; + })(); + + Database.CmekConfig = (function() { + + /** + * Properties of a CmekConfig. + * @memberof google.firestore.admin.v1.Database + * @interface ICmekConfig + * @property {string|null} [kmsKeyName] CmekConfig kmsKeyName + * @property {Array.|null} [activeKeyVersion] CmekConfig activeKeyVersion + */ + + /** + * Constructs a new CmekConfig. + * @memberof google.firestore.admin.v1.Database + * @classdesc Represents a CmekConfig. + * @implements ICmekConfig + * @constructor + * @param {google.firestore.admin.v1.Database.ICmekConfig=} [properties] Properties to set + */ + function CmekConfig(properties) { + this.activeKeyVersion = []; + 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]]; + } + + /** + * CmekConfig kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.firestore.admin.v1.Database.CmekConfig + * @instance + */ + CmekConfig.prototype.kmsKeyName = ""; + + /** + * CmekConfig activeKeyVersion. + * @member {Array.} activeKeyVersion + * @memberof google.firestore.admin.v1.Database.CmekConfig + * @instance + */ + CmekConfig.prototype.activeKeyVersion = $util.emptyArray; + + /** + * Creates a CmekConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.Database.CmekConfig + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.Database.CmekConfig} CmekConfig + */ + CmekConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.Database.CmekConfig) + return object; + var message = new $root.google.firestore.admin.v1.Database.CmekConfig(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.activeKeyVersion) { + if (!Array.isArray(object.activeKeyVersion)) + throw TypeError(".google.firestore.admin.v1.Database.CmekConfig.activeKeyVersion: array expected"); + message.activeKeyVersion = []; + for (var i = 0; i < object.activeKeyVersion.length; ++i) + message.activeKeyVersion[i] = String(object.activeKeyVersion[i]); + } + return message; + }; + + /** + * Creates a plain object from a CmekConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.Database.CmekConfig + * @static + * @param {google.firestore.admin.v1.Database.CmekConfig} message CmekConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CmekConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.activeKeyVersion = []; + if (options.defaults) + object.kmsKeyName = ""; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + if (message.activeKeyVersion && message.activeKeyVersion.length) { + object.activeKeyVersion = []; + for (var j = 0; j < message.activeKeyVersion.length; ++j) + object.activeKeyVersion[j] = message.activeKeyVersion[j]; + } + return object; + }; + + /** + * Converts this CmekConfig to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Database.CmekConfig + * @instance + * @returns {Object.} JSON object + */ + CmekConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CmekConfig + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Database.CmekConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CmekConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Database.CmekConfig"; + }; + + return CmekConfig; + })(); + + Database.SourceInfo = (function() { + + /** + * Properties of a SourceInfo. + * @memberof google.firestore.admin.v1.Database + * @interface ISourceInfo + * @property {google.firestore.admin.v1.Database.SourceInfo.IBackupSource|null} [backup] SourceInfo backup + * @property {string|null} [operation] SourceInfo operation + */ + + /** + * Constructs a new SourceInfo. + * @memberof google.firestore.admin.v1.Database + * @classdesc Represents a SourceInfo. + * @implements ISourceInfo + * @constructor + * @param {google.firestore.admin.v1.Database.ISourceInfo=} [properties] Properties to set + */ + function SourceInfo(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]]; + } + + /** + * SourceInfo backup. + * @member {google.firestore.admin.v1.Database.SourceInfo.IBackupSource|null|undefined} backup + * @memberof google.firestore.admin.v1.Database.SourceInfo + * @instance + */ + SourceInfo.prototype.backup = null; + + /** + * SourceInfo operation. + * @member {string} operation + * @memberof google.firestore.admin.v1.Database.SourceInfo + * @instance + */ + SourceInfo.prototype.operation = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SourceInfo source. + * @member {"backup"|undefined} source + * @memberof google.firestore.admin.v1.Database.SourceInfo + * @instance + */ + Object.defineProperty(SourceInfo.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["backup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a SourceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.Database.SourceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.Database.SourceInfo} SourceInfo + */ + SourceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.Database.SourceInfo) + return object; + var message = new $root.google.firestore.admin.v1.Database.SourceInfo(); + if (object.backup != null) { + if (typeof object.backup !== "object") + throw TypeError(".google.firestore.admin.v1.Database.SourceInfo.backup: object expected"); + message.backup = $root.google.firestore.admin.v1.Database.SourceInfo.BackupSource.fromObject(object.backup); + } + if (object.operation != null) + message.operation = String(object.operation); + return message; + }; + + /** + * Creates a plain object from a SourceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.Database.SourceInfo + * @static + * @param {google.firestore.admin.v1.Database.SourceInfo} message SourceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.operation = ""; + if (message.backup != null && message.hasOwnProperty("backup")) { + object.backup = $root.google.firestore.admin.v1.Database.SourceInfo.BackupSource.toObject(message.backup, options); + if (options.oneofs) + object.source = "backup"; + } + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = message.operation; + return object; + }; + + /** + * Converts this SourceInfo to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Database.SourceInfo + * @instance + * @returns {Object.} JSON object + */ + SourceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceInfo + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Database.SourceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Database.SourceInfo"; + }; + + SourceInfo.BackupSource = (function() { + + /** + * Properties of a BackupSource. + * @memberof google.firestore.admin.v1.Database.SourceInfo + * @interface IBackupSource + * @property {string|null} [backup] BackupSource backup + */ + + /** + * Constructs a new BackupSource. + * @memberof google.firestore.admin.v1.Database.SourceInfo + * @classdesc Represents a BackupSource. + * @implements IBackupSource + * @constructor + * @param {google.firestore.admin.v1.Database.SourceInfo.IBackupSource=} [properties] Properties to set + */ + function BackupSource(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]]; + } + + /** + * BackupSource backup. + * @member {string} backup + * @memberof google.firestore.admin.v1.Database.SourceInfo.BackupSource + * @instance + */ + BackupSource.prototype.backup = ""; + + /** + * Creates a BackupSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.Database.SourceInfo.BackupSource + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.Database.SourceInfo.BackupSource} BackupSource + */ + BackupSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.Database.SourceInfo.BackupSource) + return object; + var message = new $root.google.firestore.admin.v1.Database.SourceInfo.BackupSource(); + if (object.backup != null) + message.backup = String(object.backup); + return message; + }; + + /** + * Creates a plain object from a BackupSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.Database.SourceInfo.BackupSource + * @static + * @param {google.firestore.admin.v1.Database.SourceInfo.BackupSource} message BackupSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.backup = ""; + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = message.backup; + return object; + }; + + /** + * Converts this BackupSource to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Database.SourceInfo.BackupSource + * @instance + * @returns {Object.} JSON object + */ + BackupSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupSource + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Database.SourceInfo.BackupSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Database.SourceInfo.BackupSource"; + }; + + return BackupSource; + })(); + + return SourceInfo; + })(); + + Database.EncryptionConfig = (function() { + + /** + * Properties of an EncryptionConfig. + * @memberof google.firestore.admin.v1.Database + * @interface IEncryptionConfig + * @property {google.firestore.admin.v1.Database.EncryptionConfig.IGoogleDefaultEncryptionOptions|null} [googleDefaultEncryption] EncryptionConfig googleDefaultEncryption + * @property {google.firestore.admin.v1.Database.EncryptionConfig.ISourceEncryptionOptions|null} [useSourceEncryption] EncryptionConfig useSourceEncryption + * @property {google.firestore.admin.v1.Database.EncryptionConfig.ICustomerManagedEncryptionOptions|null} [customerManagedEncryption] EncryptionConfig customerManagedEncryption + */ + + /** + * Constructs a new EncryptionConfig. + * @memberof google.firestore.admin.v1.Database + * @classdesc Represents an EncryptionConfig. + * @implements IEncryptionConfig + * @constructor + * @param {google.firestore.admin.v1.Database.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 googleDefaultEncryption. + * @member {google.firestore.admin.v1.Database.EncryptionConfig.IGoogleDefaultEncryptionOptions|null|undefined} googleDefaultEncryption + * @memberof google.firestore.admin.v1.Database.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.googleDefaultEncryption = null; + + /** + * EncryptionConfig useSourceEncryption. + * @member {google.firestore.admin.v1.Database.EncryptionConfig.ISourceEncryptionOptions|null|undefined} useSourceEncryption + * @memberof google.firestore.admin.v1.Database.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.useSourceEncryption = null; + + /** + * EncryptionConfig customerManagedEncryption. + * @member {google.firestore.admin.v1.Database.EncryptionConfig.ICustomerManagedEncryptionOptions|null|undefined} customerManagedEncryption + * @memberof google.firestore.admin.v1.Database.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.customerManagedEncryption = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EncryptionConfig encryptionType. + * @member {"googleDefaultEncryption"|"useSourceEncryption"|"customerManagedEncryption"|undefined} encryptionType + * @memberof google.firestore.admin.v1.Database.EncryptionConfig + * @instance + */ + Object.defineProperty(EncryptionConfig.prototype, "encryptionType", { + get: $util.oneOfGetter($oneOfFields = ["googleDefaultEncryption", "useSourceEncryption", "customerManagedEncryption"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.Database.EncryptionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.Database.EncryptionConfig} EncryptionConfig + */ + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.Database.EncryptionConfig) + return object; + var message = new $root.google.firestore.admin.v1.Database.EncryptionConfig(); + if (object.googleDefaultEncryption != null) { + if (typeof object.googleDefaultEncryption !== "object") + throw TypeError(".google.firestore.admin.v1.Database.EncryptionConfig.googleDefaultEncryption: object expected"); + message.googleDefaultEncryption = $root.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions.fromObject(object.googleDefaultEncryption); + } + if (object.useSourceEncryption != null) { + if (typeof object.useSourceEncryption !== "object") + throw TypeError(".google.firestore.admin.v1.Database.EncryptionConfig.useSourceEncryption: object expected"); + message.useSourceEncryption = $root.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions.fromObject(object.useSourceEncryption); + } + if (object.customerManagedEncryption != null) { + if (typeof object.customerManagedEncryption !== "object") + throw TypeError(".google.firestore.admin.v1.Database.EncryptionConfig.customerManagedEncryption: object expected"); + message.customerManagedEncryption = $root.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions.fromObject(object.customerManagedEncryption); + } + return message; + }; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.Database.EncryptionConfig + * @static + * @param {google.firestore.admin.v1.Database.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 (message.googleDefaultEncryption != null && message.hasOwnProperty("googleDefaultEncryption")) { + object.googleDefaultEncryption = $root.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions.toObject(message.googleDefaultEncryption, options); + if (options.oneofs) + object.encryptionType = "googleDefaultEncryption"; + } + if (message.useSourceEncryption != null && message.hasOwnProperty("useSourceEncryption")) { + object.useSourceEncryption = $root.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions.toObject(message.useSourceEncryption, options); + if (options.oneofs) + object.encryptionType = "useSourceEncryption"; + } + if (message.customerManagedEncryption != null && message.hasOwnProperty("customerManagedEncryption")) { + object.customerManagedEncryption = $root.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions.toObject(message.customerManagedEncryption, options); + if (options.oneofs) + object.encryptionType = "customerManagedEncryption"; + } + return object; + }; + + /** + * Converts this EncryptionConfig to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Database.EncryptionConfig + * @instance + * @returns {Object.} JSON object + */ + EncryptionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptionConfig + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Database.EncryptionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Database.EncryptionConfig"; + }; + + EncryptionConfig.GoogleDefaultEncryptionOptions = (function() { + + /** + * Properties of a GoogleDefaultEncryptionOptions. + * @memberof google.firestore.admin.v1.Database.EncryptionConfig + * @interface IGoogleDefaultEncryptionOptions + */ + + /** + * Constructs a new GoogleDefaultEncryptionOptions. + * @memberof google.firestore.admin.v1.Database.EncryptionConfig + * @classdesc Represents a GoogleDefaultEncryptionOptions. + * @implements IGoogleDefaultEncryptionOptions + * @constructor + * @param {google.firestore.admin.v1.Database.EncryptionConfig.IGoogleDefaultEncryptionOptions=} [properties] Properties to set + */ + function GoogleDefaultEncryptionOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a GoogleDefaultEncryptionOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions} GoogleDefaultEncryptionOptions + */ + GoogleDefaultEncryptionOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions) + return object; + return new $root.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions(); + }; + + /** + * Creates a plain object from a GoogleDefaultEncryptionOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + * @static + * @param {google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions} message GoogleDefaultEncryptionOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoogleDefaultEncryptionOptions.toObject = function toObject() { + return {}; + }; + + /** + * Converts this GoogleDefaultEncryptionOptions to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + * @instance + * @returns {Object.} JSON object + */ + GoogleDefaultEncryptionOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoogleDefaultEncryptionOptions + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoogleDefaultEncryptionOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions"; + }; + + return GoogleDefaultEncryptionOptions; + })(); + + EncryptionConfig.SourceEncryptionOptions = (function() { + + /** + * Properties of a SourceEncryptionOptions. + * @memberof google.firestore.admin.v1.Database.EncryptionConfig + * @interface ISourceEncryptionOptions + */ + + /** + * Constructs a new SourceEncryptionOptions. + * @memberof google.firestore.admin.v1.Database.EncryptionConfig + * @classdesc Represents a SourceEncryptionOptions. + * @implements ISourceEncryptionOptions + * @constructor + * @param {google.firestore.admin.v1.Database.EncryptionConfig.ISourceEncryptionOptions=} [properties] Properties to set + */ + function SourceEncryptionOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a SourceEncryptionOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions} SourceEncryptionOptions + */ + SourceEncryptionOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions) + return object; + return new $root.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions(); + }; + + /** + * Creates a plain object from a SourceEncryptionOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + * @static + * @param {google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions} message SourceEncryptionOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceEncryptionOptions.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SourceEncryptionOptions to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + * @instance + * @returns {Object.} JSON object + */ + SourceEncryptionOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for Database - * @function getTypeUrl - * @memberof google.firestore.admin.v1.Database - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Database.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.firestore.admin.v1.Database"; - }; + /** + * Gets the default type url for SourceEncryptionOptions + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceEncryptionOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions"; + }; - /** - * DatabaseType enum. - * @name google.firestore.admin.v1.Database.DatabaseType - * @enum {string} - * @property {string} DATABASE_TYPE_UNSPECIFIED=DATABASE_TYPE_UNSPECIFIED DATABASE_TYPE_UNSPECIFIED value - * @property {string} FIRESTORE_NATIVE=FIRESTORE_NATIVE FIRESTORE_NATIVE value - * @property {string} DATASTORE_MODE=DATASTORE_MODE DATASTORE_MODE value - */ - Database.DatabaseType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = "DATABASE_TYPE_UNSPECIFIED"; - values[valuesById[1] = "FIRESTORE_NATIVE"] = "FIRESTORE_NATIVE"; - values[valuesById[2] = "DATASTORE_MODE"] = "DATASTORE_MODE"; - return values; - })(); + return SourceEncryptionOptions; + })(); - /** - * ConcurrencyMode enum. - * @name google.firestore.admin.v1.Database.ConcurrencyMode - * @enum {string} - * @property {string} CONCURRENCY_MODE_UNSPECIFIED=CONCURRENCY_MODE_UNSPECIFIED CONCURRENCY_MODE_UNSPECIFIED value - * @property {string} OPTIMISTIC=OPTIMISTIC OPTIMISTIC value - * @property {string} PESSIMISTIC=PESSIMISTIC PESSIMISTIC value - * @property {string} OPTIMISTIC_WITH_ENTITY_GROUPS=OPTIMISTIC_WITH_ENTITY_GROUPS OPTIMISTIC_WITH_ENTITY_GROUPS value - */ - Database.ConcurrencyMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONCURRENCY_MODE_UNSPECIFIED"] = "CONCURRENCY_MODE_UNSPECIFIED"; - values[valuesById[1] = "OPTIMISTIC"] = "OPTIMISTIC"; - values[valuesById[2] = "PESSIMISTIC"] = "PESSIMISTIC"; - values[valuesById[3] = "OPTIMISTIC_WITH_ENTITY_GROUPS"] = "OPTIMISTIC_WITH_ENTITY_GROUPS"; - return values; - })(); + EncryptionConfig.CustomerManagedEncryptionOptions = (function() { - /** - * PointInTimeRecoveryEnablement enum. - * @name google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement - * @enum {string} - * @property {string} POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED=POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED value - * @property {string} POINT_IN_TIME_RECOVERY_ENABLED=POINT_IN_TIME_RECOVERY_ENABLED POINT_IN_TIME_RECOVERY_ENABLED value - * @property {string} POINT_IN_TIME_RECOVERY_DISABLED=POINT_IN_TIME_RECOVERY_DISABLED POINT_IN_TIME_RECOVERY_DISABLED value - */ - Database.PointInTimeRecoveryEnablement = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED"] = "POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED"; - values[valuesById[1] = "POINT_IN_TIME_RECOVERY_ENABLED"] = "POINT_IN_TIME_RECOVERY_ENABLED"; - values[valuesById[2] = "POINT_IN_TIME_RECOVERY_DISABLED"] = "POINT_IN_TIME_RECOVERY_DISABLED"; - return values; - })(); + /** + * Properties of a CustomerManagedEncryptionOptions. + * @memberof google.firestore.admin.v1.Database.EncryptionConfig + * @interface ICustomerManagedEncryptionOptions + * @property {string|null} [kmsKeyName] CustomerManagedEncryptionOptions kmsKeyName + */ - /** - * AppEngineIntegrationMode enum. - * @name google.firestore.admin.v1.Database.AppEngineIntegrationMode - * @enum {string} - * @property {string} APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED=APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED value - * @property {string} ENABLED=ENABLED ENABLED value - * @property {string} DISABLED=DISABLED DISABLED value - */ - Database.AppEngineIntegrationMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED"] = "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED"; - values[valuesById[1] = "ENABLED"] = "ENABLED"; - values[valuesById[2] = "DISABLED"] = "DISABLED"; - return values; - })(); + /** + * Constructs a new CustomerManagedEncryptionOptions. + * @memberof google.firestore.admin.v1.Database.EncryptionConfig + * @classdesc Represents a CustomerManagedEncryptionOptions. + * @implements ICustomerManagedEncryptionOptions + * @constructor + * @param {google.firestore.admin.v1.Database.EncryptionConfig.ICustomerManagedEncryptionOptions=} [properties] Properties to set + */ + function CustomerManagedEncryptionOptions(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]]; + } - /** - * DeleteProtectionState enum. - * @name google.firestore.admin.v1.Database.DeleteProtectionState - * @enum {string} - * @property {string} DELETE_PROTECTION_STATE_UNSPECIFIED=DELETE_PROTECTION_STATE_UNSPECIFIED DELETE_PROTECTION_STATE_UNSPECIFIED value - * @property {string} DELETE_PROTECTION_DISABLED=DELETE_PROTECTION_DISABLED DELETE_PROTECTION_DISABLED value - * @property {string} DELETE_PROTECTION_ENABLED=DELETE_PROTECTION_ENABLED DELETE_PROTECTION_ENABLED value - */ - Database.DeleteProtectionState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DELETE_PROTECTION_STATE_UNSPECIFIED"] = "DELETE_PROTECTION_STATE_UNSPECIFIED"; - values[valuesById[1] = "DELETE_PROTECTION_DISABLED"] = "DELETE_PROTECTION_DISABLED"; - values[valuesById[2] = "DELETE_PROTECTION_ENABLED"] = "DELETE_PROTECTION_ENABLED"; - return values; + /** + * CustomerManagedEncryptionOptions kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + * @instance + */ + CustomerManagedEncryptionOptions.prototype.kmsKeyName = ""; + + /** + * Creates a CustomerManagedEncryptionOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions} CustomerManagedEncryptionOptions + */ + CustomerManagedEncryptionOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions) + return object; + var message = new $root.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + return message; + }; + + /** + * Creates a plain object from a CustomerManagedEncryptionOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + * @static + * @param {google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions} message CustomerManagedEncryptionOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomerManagedEncryptionOptions.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 CustomerManagedEncryptionOptions to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + * @instance + * @returns {Object.} JSON object + */ + CustomerManagedEncryptionOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomerManagedEncryptionOptions + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomerManagedEncryptionOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions"; + }; + + return CustomerManagedEncryptionOptions; + })(); + + return EncryptionConfig; })(); return Database; @@ -6532,6 +7358,7 @@ * @property {string|null} [parent] RestoreDatabaseRequest parent * @property {string|null} [databaseId] RestoreDatabaseRequest databaseId * @property {string|null} [backup] RestoreDatabaseRequest backup + * @property {google.firestore.admin.v1.Database.IEncryptionConfig|null} [encryptionConfig] RestoreDatabaseRequest encryptionConfig */ /** @@ -6573,6 +7400,14 @@ */ RestoreDatabaseRequest.prototype.backup = ""; + /** + * RestoreDatabaseRequest encryptionConfig. + * @member {google.firestore.admin.v1.Database.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.firestore.admin.v1.RestoreDatabaseRequest + * @instance + */ + RestoreDatabaseRequest.prototype.encryptionConfig = null; + /** * Creates a RestoreDatabaseRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -6591,6 +7426,11 @@ message.databaseId = String(object.databaseId); if (object.backup != null) message.backup = String(object.backup); + if (object.encryptionConfig != null) { + if (typeof object.encryptionConfig !== "object") + throw TypeError(".google.firestore.admin.v1.RestoreDatabaseRequest.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.firestore.admin.v1.Database.EncryptionConfig.fromObject(object.encryptionConfig); + } return message; }; @@ -6611,6 +7451,7 @@ object.parent = ""; object.databaseId = ""; object.backup = ""; + object.encryptionConfig = null; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -6618,6 +7459,8 @@ object.databaseId = message.databaseId; if (message.backup != null && message.hasOwnProperty("backup")) object.backup = message.backup; + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) + object.encryptionConfig = $root.google.firestore.admin.v1.Database.EncryptionConfig.toObject(message.encryptionConfig, options); return object; }; @@ -11244,6 +12087,7 @@ * @memberof google.api * @interface IPythonSettings * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures */ /** @@ -11269,6 +12113,14 @@ */ PythonSettings.prototype.common = null; + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + /** * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -11286,6 +12138,11 @@ throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } return message; }; @@ -11302,10 +12159,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.common = null; + object.experimentalFeatures = null; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); return object; }; @@ -11335,6 +12196,104 @@ return typeUrlPrefix + "/google.api.PythonSettings"; }; + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(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]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.restAsyncIoEnabled = false; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + return PythonSettings; })(); diff --git a/dev/protos/firestore_v1_proto_api.d.ts b/dev/protos/firestore_v1_proto_api.d.ts index c387e89a6..503aa0037 100644 --- a/dev/protos/firestore_v1_proto_api.d.ts +++ b/dev/protos/firestore_v1_proto_api.d.ts @@ -5865,6 +5865,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -5879,6 +5882,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -5908,6 +5914,57 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a NodeSettings. */ interface INodeSettings { diff --git a/dev/protos/firestore_v1_proto_api.js b/dev/protos/firestore_v1_proto_api.js index a3938bc4c..7f5310a37 100644 --- a/dev/protos/firestore_v1_proto_api.js +++ b/dev/protos/firestore_v1_proto_api.js @@ -13973,6 +13973,7 @@ * @memberof google.api * @interface IPythonSettings * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures */ /** @@ -13998,6 +13999,14 @@ */ PythonSettings.prototype.common = null; + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + /** * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -14015,6 +14024,11 @@ throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } return message; }; @@ -14031,10 +14045,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.common = null; + object.experimentalFeatures = null; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); return object; }; @@ -14064,6 +14082,104 @@ return typeUrlPrefix + "/google.api.PythonSettings"; }; + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(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]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.restAsyncIoEnabled = false; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + return PythonSettings; })(); diff --git a/dev/protos/firestore_v1beta1_proto_api.d.ts b/dev/protos/firestore_v1beta1_proto_api.d.ts index 1a37aaa0e..22789468e 100644 --- a/dev/protos/firestore_v1beta1_proto_api.d.ts +++ b/dev/protos/firestore_v1beta1_proto_api.d.ts @@ -8038,6 +8038,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -8052,6 +8055,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -8081,6 +8087,57 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a NodeSettings. */ interface INodeSettings { diff --git a/dev/protos/firestore_v1beta1_proto_api.js b/dev/protos/firestore_v1beta1_proto_api.js index 14cdf1c2a..68bba5cb4 100644 --- a/dev/protos/firestore_v1beta1_proto_api.js +++ b/dev/protos/firestore_v1beta1_proto_api.js @@ -19934,6 +19934,7 @@ * @memberof google.api * @interface IPythonSettings * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures */ /** @@ -19959,6 +19960,14 @@ */ PythonSettings.prototype.common = null; + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + /** * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -19976,6 +19985,11 @@ throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } return message; }; @@ -19992,10 +20006,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.common = null; + object.experimentalFeatures = null; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); return object; }; @@ -20025,6 +20043,104 @@ return typeUrlPrefix + "/google.api.PythonSettings"; }; + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(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]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.restAsyncIoEnabled = false; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + return PythonSettings; })(); diff --git a/dev/protos/google/api/client.proto b/dev/protos/google/api/client.proto index 7f6ef41f5..211575880 100644 --- a/dev/protos/google/api/client.proto +++ b/dev/protos/google/api/client.proto @@ -263,8 +263,22 @@ message PhpSettings { // Settings for Python client libraries. message PythonSettings { + // Experimental features to be included during client library generation. + // These fields will be deprecated once the feature graduates and is enabled + // by default. + message ExperimentalFeatures { + // Enables generation of asynchronous REST clients if `rest` transport is + // enabled. By default, asynchronous REST clients will not be generated. + // This feature will be enabled by default 1 month after launching the + // feature in preview packages. + bool rest_async_io_enabled = 1; + } + // Some settings. CommonLanguageSettings common = 1; + + // Experimental features to be included during client library generation. + ExperimentalFeatures experimental_features = 2; } // Settings for Node client libraries. diff --git a/dev/protos/google/firestore/admin/v1/database.proto b/dev/protos/google/firestore/admin/v1/database.proto index 67c8371df..848e2ec76 100644 --- a/dev/protos/google/firestore/admin/v1/database.proto +++ b/dev/protos/google/firestore/admin/v1/database.proto @@ -29,6 +29,10 @@ option java_package = "com.google.firestore.admin.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1"; option ruby_package = "Google::Cloud::Firestore::Admin::V1"; +option (google.api.resource_definition) = { + type: "firestore.googleapis.com/Operation" + pattern: "projects/{project}/databases/{database}/operations/{operation}" +}; // A Cloud Firestore Database. message Database { @@ -44,7 +48,7 @@ message Database { // // Mode changes are only allowed if the database is empty. enum DatabaseType { - // The default value. This value is used if the database type is omitted. + // Not used. DATABASE_TYPE_UNSPECIFIED = 0; // Firestore Native Mode @@ -128,6 +132,101 @@ message Database { DELETE_PROTECTION_ENABLED = 2; } + // The CMEK (Customer Managed Encryption Key) configuration for a Firestore + // database. If not present, the database is secured by the default Google + // encryption key. + message CmekConfig { + // Required. Only keys in the same location as this database are allowed to + // be used for encryption. + // + // For Firestore's nam5 multi-region, this corresponds to Cloud KMS + // multi-region us. For Firestore's eur3 multi-region, this corresponds to + // Cloud KMS multi-region europe. See + // https://cloud.google.com/kms/docs/locations. + // + // The expected format is + // `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + string kms_key_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Currently in-use [KMS key + // versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). + // During [key rotation](https://cloud.google.com/kms/docs/key-rotation), + // there can be multiple in-use key versions. + // + // The expected format is + // `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. + repeated string active_key_version = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Information about the provenance of this database. + message SourceInfo { + // Information about a backup that was used to restore a database. + message BackupSource { + // The resource name of the backup that was used to restore this + // database. Format: + // `projects/{project}/locations/{location}/backups/{backup}`. + string backup = 1 [(google.api.resource_reference) = { + type: "firestore.googleapis.com/Backup" + }]; + } + + // The source from which this database is derived. + oneof source { + // If set, this database was restored from the specified backup (or a + // snapshot thereof). + BackupSource backup = 1; + } + + // The associated long-running operation. This field may not be set after + // the operation has completed. Format: + // `projects/{project}/databases/{database}/operations/{operation}`. + string operation = 3 [(google.api.resource_reference) = { + type: "firestore.googleapis.com/Operation" + }]; + } + + // Encryption configuration for a new database being created from another + // source. + // + // The source could be a [Backup][google.firestore.admin.v1.Backup] . + message EncryptionConfig { + // The configuration options for using Google default encryption. + message GoogleDefaultEncryptionOptions {} + + // The configuration options for using the same encryption method as the + // source. + message SourceEncryptionOptions {} + + // The configuration options for using CMEK (Customer Managed Encryption + // Key) encryption. + message CustomerManagedEncryptionOptions { + // Required. Only keys in the same location as the database are allowed to + // be used for encryption. + // + // For Firestore's nam5 multi-region, this corresponds to Cloud KMS + // multi-region us. For Firestore's eur3 multi-region, this corresponds to + // Cloud KMS multi-region europe. See + // https://cloud.google.com/kms/docs/locations. + // + // The expected format is + // `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + string kms_key_name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The method for encrypting the database. + oneof encryption_type { + // Use Google default encryption. + GoogleDefaultEncryptionOptions google_default_encryption = 1; + + // The database will use the same encryption configuration as the source. + SourceEncryptionOptions use_source_encryption = 2; + + // Use Customer Managed Encryption Keys (CMEK) for encryption. + CustomerManagedEncryptionOptions customer_managed_encryption = 3; + } + } + // The resource name of the Database. // Format: `projects/{project}/databases/{database}` string name = 1; @@ -146,6 +245,11 @@ message Database { google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The timestamp at which this database was deleted. Only set if + // the database has been deleted. + google.protobuf.Timestamp delete_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // The location of the database. Available locations are listed at // https://cloud.google.com/firestore/docs/locations. string location_id = 9; @@ -189,8 +293,8 @@ message Database { AppEngineIntegrationMode app_engine_integration_mode = 19; // Output only. The key_prefix for this database. This key_prefix is used, in - // combination with the project id ("~") to construct - // the application id that is returned from the Cloud Datastore APIs in Google + // combination with the project ID ("~") to construct + // the application ID that is returned from the Cloud Datastore APIs in Google // App Engine first generation runtimes. // // This value may be empty in which case the appid to use for URL-encoded keys @@ -200,6 +304,16 @@ message Database { // State of delete protection for the database. DeleteProtectionState delete_protection_state = 22; + // Optional. Presence indicates CMEK is enabled for this database. + CmekConfig cmek_config = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The database resource's prior database ID. This field is only + // populated for deleted databases. + string previous_id = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Information about the provenance of this database. + SourceInfo source_info = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; + // This checksum is computed by the server based on the value of other // fields, and may be sent on update and delete requests to ensure the // client has an up-to-date value before proceeding. diff --git a/dev/protos/google/firestore/admin/v1/field.proto b/dev/protos/google/firestore/admin/v1/field.proto index eefee763c..e187b45d4 100644 --- a/dev/protos/google/firestore/admin/v1/field.proto +++ b/dev/protos/google/firestore/admin/v1/field.proto @@ -32,7 +32,7 @@ option ruby_package = "Google::Cloud::Firestore::Admin::V1"; // Represents a single field in the database. // // Fields are grouped by their "Collection Group", which represent all -// collections in the database with the same id. +// collections in the database with the same ID. message Field { option (google.api.resource) = { type: "firestore.googleapis.com/Field" diff --git a/dev/protos/google/firestore/admin/v1/firestore_admin.proto b/dev/protos/google/firestore/admin/v1/firestore_admin.proto index dd95c2ce7..ef6eb87e4 100644 --- a/dev/protos/google/firestore/admin/v1/firestore_admin.proto +++ b/dev/protos/google/firestore/admin/v1/firestore_admin.proto @@ -434,7 +434,7 @@ message CreateDatabaseRequest { // with first character a letter and the last a letter or a number. Must not // be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. // - // "(default)" database id is also valid. + // "(default)" database ID is also valid. string database_id = 3 [(google.api.field_behavior) = REQUIRED]; } @@ -730,8 +730,8 @@ message ExportDocumentsRequest { } ]; - // Which collection ids to export. Unspecified means all collections. Each - // collection id in this list must be unique. + // Which collection IDs to export. Unspecified means all collections. Each + // collection ID in this list must be unique. repeated string collection_ids = 2; // The output URI. Currently only supports Google Cloud Storage URIs of the @@ -774,8 +774,8 @@ message ImportDocumentsRequest { } ]; - // Which collection ids to import. Unspecified means all collections included - // in the import. Each collection id in this list must be unique. + // Which collection IDs to import. Unspecified means all collections included + // in the import. Each collection ID in this list must be unique. repeated string collection_ids = 2; // Location of the exported files. @@ -898,7 +898,7 @@ message DeleteBackupRequest { } // The request message for -// [FirestoreAdmin.RestoreDatabase][google.firestore.admin.v1.RestoreDatabase]. +// [FirestoreAdmin.RestoreDatabase][google.firestore.admin.v1.FirestoreAdmin.RestoreDatabase]. message RestoreDatabaseRequest { // Required. The project to restore the database in. Format is // `projects/{project_id}`. @@ -910,19 +910,22 @@ message RestoreDatabaseRequest { ]; // Required. The ID to use for the database, which will become the final - // component of the database's resource name. This database id must not be + // component of the database's resource name. This database ID must not be // associated with an existing database. // // This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ // with first character a letter and the last a letter or a number. Must not // be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. // - // "(default)" database id is also valid. + // "(default)" database ID is also valid. string database_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. Backup to restore from. Must be from the same project as the // parent. // + // The restored database will be created in the same location as the source + // backup. + // // Format is: `projects/{project_id}/locations/{location}/backups/{backup}` string backup = 3 [ (google.api.field_behavior) = REQUIRED, @@ -930,4 +933,12 @@ message RestoreDatabaseRequest { type: "firestore.googleapis.com/Backup" } ]; + + // Optional. Encryption configuration for the restored database. + // + // If this field is not specified, the restored database will use + // the same encryption configuration as the backup, namely + // [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + Database.EncryptionConfig encryption_config = 9 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/dev/protos/google/firestore/admin/v1/index.proto b/dev/protos/google/firestore/admin/v1/index.proto index f2a3cc373..1b8b0a48a 100644 --- a/dev/protos/google/firestore/admin/v1/index.proto +++ b/dev/protos/google/firestore/admin/v1/index.proto @@ -44,11 +44,11 @@ message Index { // Indexes with a collection query scope specified allow queries // against a collection that is the child of a specific document, specified - // at query time, and that has the collection id specified by the index. + // at query time, and that has the collection ID specified by the index. COLLECTION = 1; // Indexes with a collection group query scope specified allow queries - // against all collections that has the collection id specified by the + // against all collections that has the collection ID specified by the // index. COLLECTION_GROUP = 2; @@ -170,11 +170,11 @@ message Index { // Indexes with a collection query scope specified allow queries // against a collection that is the child of a specific document, specified at - // query time, and that has the same collection id. + // query time, and that has the same collection ID. // // Indexes with a collection group query scope specified allow queries against // all collections descended from a specific document, specified at query - // time, and that have the same collection id as this index. + // time, and that have the same collection ID as this index. QueryScope query_scope = 2; // The API scope supported by this index. diff --git a/dev/protos/google/firestore/admin/v1/operation.proto b/dev/protos/google/firestore/admin/v1/operation.proto index 80b133764..39a20ecfd 100644 --- a/dev/protos/google/firestore/admin/v1/operation.proto +++ b/dev/protos/google/firestore/admin/v1/operation.proto @@ -146,13 +146,13 @@ message ExportDocumentsMetadata { // The progress, in bytes, of this operation. Progress progress_bytes = 5; - // Which collection ids are being exported. + // Which collection IDs are being exported. repeated string collection_ids = 6; // Where the documents are being exported to. string output_uri_prefix = 7; - // Which namespace ids are being exported. + // Which namespace IDs are being exported. repeated string namespace_ids = 8; // The timestamp that corresponds to the version of the database that is being @@ -181,13 +181,13 @@ message ImportDocumentsMetadata { // The progress, in bytes, of this operation. Progress progress_bytes = 5; - // Which collection ids are being imported. + // Which collection IDs are being imported. repeated string collection_ids = 6; // The location of the documents being imported. string input_uri_prefix = 7; - // Which namespace ids are being imported. + // Which namespace IDs are being imported. repeated string namespace_ids = 8; } @@ -211,10 +211,10 @@ message BulkDeleteDocumentsMetadata { // The progress, in bytes, of this operation. Progress progress_bytes = 5; - // The ids of the collection groups that are being deleted. + // The IDs of the collection groups that are being deleted. repeated string collection_ids = 6; - // Which namespace ids are being deleted. + // Which namespace IDs are being deleted. repeated string namespace_ids = 7; // The timestamp that corresponds to the version of the database that is being diff --git a/dev/protos/google/firestore/admin/v1/schedule.proto b/dev/protos/google/firestore/admin/v1/schedule.proto index 52200e8e5..46bc03920 100644 --- a/dev/protos/google/firestore/admin/v1/schedule.proto +++ b/dev/protos/google/firestore/admin/v1/schedule.proto @@ -65,6 +65,8 @@ message BackupSchedule { // At what relative time in the future, compared to its creation time, // the backup should be deleted, e.g. keep backups for 7 days. + // + // The maximum supported retention period is 14 weeks. google.protobuf.Duration retention = 6; // A oneof field to represent when backups will be taken. @@ -77,7 +79,7 @@ message BackupSchedule { } } -// Represents a recurring schedule that runs at a specific time every day. +// Represents a recurring schedule that runs every day. // // The time zone is UTC. message DailyRecurrence {} diff --git a/dev/protos/v1.json b/dev/protos/v1.json index 3472c827d..1605e27cc 100644 --- a/dev/protos/v1.json +++ b/dev/protos/v1.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { @@ -2277,6 +2280,20 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + } + } } } }, diff --git a/dev/protos/v1beta1.json b/dev/protos/v1beta1.json index e892f5e33..c0984bb5a 100644 --- a/dev/protos/v1beta1.json +++ b/dev/protos/v1beta1.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { @@ -3412,6 +3415,20 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + } + } } } }, diff --git a/dev/src/v1/firestore_admin_client.ts b/dev/src/v1/firestore_admin_client.ts index bd38f2156..b3eff8857 100644 --- a/dev/src/v1/firestore_admin_client.ts +++ b/dev/src/v1/firestore_admin_client.ts @@ -2073,8 +2073,8 @@ export class FirestoreAdminClient { * Required. Database to export. Should be of the form: * `projects/{project_id}/databases/{database_id}`. * @param {string[]} request.collectionIds - * Which collection ids to export. Unspecified means all collections. Each - * collection id in this list must be unique. + * Which collection IDs to export. Unspecified means all collections. Each + * collection ID in this list must be unique. * @param {string} request.outputUriPrefix * The output URI. Currently only supports Google Cloud Storage URIs of the * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name @@ -2241,8 +2241,8 @@ export class FirestoreAdminClient { * Required. Database to import into. Should be of the form: * `projects/{project_id}/databases/{database_id}`. * @param {string[]} request.collectionIds - * Which collection ids to import. Unspecified means all collections included - * in the import. Each collection id in this list must be unique. + * Which collection IDs to import. Unspecified means all collections included + * in the import. Each collection ID in this list must be unique. * @param {string} request.inputUriPrefix * Location of the exported files. * This must match the output_uri_prefix of an ExportDocumentsResponse from @@ -2563,7 +2563,7 @@ export class FirestoreAdminClient { * with first character a letter and the last a letter or a number. Must not * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. * - * "(default)" database id is also valid. + * "(default)" database ID is also valid. * @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. @@ -2998,19 +2998,28 @@ export class FirestoreAdminClient { * `projects/{project_id}`. * @param {string} request.databaseId * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database id must not be + * component of the database's resource name. This database ID must not be * associated with an existing database. * * This value should be 4-63 characters. Valid characters are /{@link protos.0-9|a-z}-/ * with first character a letter and the last a letter or a number. Must not * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. * - * "(default)" database id is also valid. + * "(default)" database ID is also valid. * @param {string} request.backup * Required. Backup to restore from. Must be from the same project as the * parent. * + * The restored database will be created in the same location as the source + * backup. + * * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` + * @param {google.firestore.admin.v1.Database.EncryptionConfig} [request.encryptionConfig] + * Optional. Encryption configuration for the restored database. + * + * If this field is not specified, the restored database will use + * the same encryption configuration as the backup, namely + * {@link protos.google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption|use_source_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. diff --git a/types/protos/firestore_admin_v1_proto_api.d.ts b/types/protos/firestore_admin_v1_proto_api.d.ts index a326cbb3b..4325d61e7 100644 --- a/types/protos/firestore_admin_v1_proto_api.d.ts +++ b/types/protos/firestore_admin_v1_proto_api.d.ts @@ -194,6 +194,9 @@ export namespace google { /** Database updateTime */ updateTime?: (google.protobuf.ITimestamp|null); + /** Database deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + /** Database locationId */ locationId?: (string|null); @@ -221,6 +224,15 @@ export namespace google { /** Database deleteProtectionState */ deleteProtectionState?: (google.firestore.admin.v1.Database.DeleteProtectionState|null); + /** Database cmekConfig */ + cmekConfig?: (google.firestore.admin.v1.Database.ICmekConfig|null); + + /** Database previousId */ + previousId?: (string|null); + + /** Database sourceInfo */ + sourceInfo?: (google.firestore.admin.v1.Database.ISourceInfo|null); + /** Database etag */ etag?: (string|null); } @@ -246,6 +258,9 @@ export namespace google { /** Database updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); + /** Database deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + /** Database locationId. */ public locationId: string; @@ -273,6 +288,15 @@ export namespace google { /** Database deleteProtectionState. */ public deleteProtectionState: google.firestore.admin.v1.Database.DeleteProtectionState; + /** Database cmekConfig. */ + public cmekConfig?: (google.firestore.admin.v1.Database.ICmekConfig|null); + + /** Database previousId. */ + public previousId: string; + + /** Database sourceInfo. */ + public sourceInfo?: (google.firestore.admin.v1.Database.ISourceInfo|null); + /** Database etag. */ public etag: string; @@ -326,6 +350,366 @@ export namespace google { /** DeleteProtectionState enum. */ type DeleteProtectionState = "DELETE_PROTECTION_STATE_UNSPECIFIED"| "DELETE_PROTECTION_DISABLED"| "DELETE_PROTECTION_ENABLED"; + + /** Properties of a CmekConfig. */ + interface ICmekConfig { + + /** CmekConfig kmsKeyName */ + kmsKeyName?: (string|null); + + /** CmekConfig activeKeyVersion */ + activeKeyVersion?: (string[]|null); + } + + /** Represents a CmekConfig. */ + class CmekConfig implements ICmekConfig { + + /** + * Constructs a new CmekConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Database.ICmekConfig); + + /** CmekConfig kmsKeyName. */ + public kmsKeyName: string; + + /** CmekConfig activeKeyVersion. */ + public activeKeyVersion: string[]; + + /** + * Creates a CmekConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CmekConfig + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.CmekConfig; + + /** + * Creates a plain object from a CmekConfig message. Also converts values to other types if specified. + * @param message CmekConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.Database.CmekConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CmekConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CmekConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SourceInfo. */ + interface ISourceInfo { + + /** SourceInfo backup */ + backup?: (google.firestore.admin.v1.Database.SourceInfo.IBackupSource|null); + + /** SourceInfo operation */ + operation?: (string|null); + } + + /** Represents a SourceInfo. */ + class SourceInfo implements ISourceInfo { + + /** + * Constructs a new SourceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Database.ISourceInfo); + + /** SourceInfo backup. */ + public backup?: (google.firestore.admin.v1.Database.SourceInfo.IBackupSource|null); + + /** SourceInfo operation. */ + public operation: string; + + /** SourceInfo source. */ + public source?: "backup"; + + /** + * Creates a SourceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceInfo + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.SourceInfo; + + /** + * Creates a plain object from a SourceInfo message. Also converts values to other types if specified. + * @param message SourceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.Database.SourceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceInfo { + + /** Properties of a BackupSource. */ + interface IBackupSource { + + /** BackupSource backup */ + backup?: (string|null); + } + + /** Represents a BackupSource. */ + class BackupSource implements IBackupSource { + + /** + * Constructs a new BackupSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Database.SourceInfo.IBackupSource); + + /** BackupSource backup. */ + public backup: string; + + /** + * Creates a BackupSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupSource + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.SourceInfo.BackupSource; + + /** + * Creates a plain object from a BackupSource message. Also converts values to other types if specified. + * @param message BackupSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.Database.SourceInfo.BackupSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { + + /** EncryptionConfig googleDefaultEncryption */ + googleDefaultEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.IGoogleDefaultEncryptionOptions|null); + + /** EncryptionConfig useSourceEncryption */ + useSourceEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.ISourceEncryptionOptions|null); + + /** EncryptionConfig customerManagedEncryption */ + customerManagedEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.ICustomerManagedEncryptionOptions|null); + } + + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { + + /** + * Constructs a new EncryptionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Database.IEncryptionConfig); + + /** EncryptionConfig googleDefaultEncryption. */ + public googleDefaultEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.IGoogleDefaultEncryptionOptions|null); + + /** EncryptionConfig useSourceEncryption. */ + public useSourceEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.ISourceEncryptionOptions|null); + + /** EncryptionConfig customerManagedEncryption. */ + public customerManagedEncryption?: (google.firestore.admin.v1.Database.EncryptionConfig.ICustomerManagedEncryptionOptions|null); + + /** EncryptionConfig encryptionType. */ + public encryptionType?: ("googleDefaultEncryption"|"useSourceEncryption"|"customerManagedEncryption"); + + /** + * 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.firestore.admin.v1.Database.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.firestore.admin.v1.Database.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EncryptionConfig { + + /** Properties of a GoogleDefaultEncryptionOptions. */ + interface IGoogleDefaultEncryptionOptions { + } + + /** Represents a GoogleDefaultEncryptionOptions. */ + class GoogleDefaultEncryptionOptions implements IGoogleDefaultEncryptionOptions { + + /** + * Constructs a new GoogleDefaultEncryptionOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Database.EncryptionConfig.IGoogleDefaultEncryptionOptions); + + /** + * Creates a GoogleDefaultEncryptionOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoogleDefaultEncryptionOptions + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions; + + /** + * Creates a plain object from a GoogleDefaultEncryptionOptions message. Also converts values to other types if specified. + * @param message GoogleDefaultEncryptionOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoogleDefaultEncryptionOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoogleDefaultEncryptionOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SourceEncryptionOptions. */ + interface ISourceEncryptionOptions { + } + + /** Represents a SourceEncryptionOptions. */ + class SourceEncryptionOptions implements ISourceEncryptionOptions { + + /** + * Constructs a new SourceEncryptionOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Database.EncryptionConfig.ISourceEncryptionOptions); + + /** + * Creates a SourceEncryptionOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceEncryptionOptions + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions; + + /** + * Creates a plain object from a SourceEncryptionOptions message. Also converts values to other types if specified. + * @param message SourceEncryptionOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceEncryptionOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceEncryptionOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomerManagedEncryptionOptions. */ + interface ICustomerManagedEncryptionOptions { + + /** CustomerManagedEncryptionOptions kmsKeyName */ + kmsKeyName?: (string|null); + } + + /** Represents a CustomerManagedEncryptionOptions. */ + class CustomerManagedEncryptionOptions implements ICustomerManagedEncryptionOptions { + + /** + * Constructs a new CustomerManagedEncryptionOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Database.EncryptionConfig.ICustomerManagedEncryptionOptions); + + /** CustomerManagedEncryptionOptions kmsKeyName. */ + public kmsKeyName: string; + + /** + * Creates a CustomerManagedEncryptionOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomerManagedEncryptionOptions + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions; + + /** + * Creates a plain object from a CustomerManagedEncryptionOptions message. Also converts values to other types if specified. + * @param message CustomerManagedEncryptionOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomerManagedEncryptionOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomerManagedEncryptionOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } /** Properties of a Field. */ @@ -2991,6 +3375,9 @@ export namespace google { /** RestoreDatabaseRequest backup */ backup?: (string|null); + + /** RestoreDatabaseRequest encryptionConfig */ + encryptionConfig?: (google.firestore.admin.v1.Database.IEncryptionConfig|null); } /** Represents a RestoreDatabaseRequest. */ @@ -3011,6 +3398,9 @@ export namespace google { /** RestoreDatabaseRequest backup. */ public backup: string; + /** RestoreDatabaseRequest encryptionConfig. */ + public encryptionConfig?: (google.firestore.admin.v1.Database.IEncryptionConfig|null); + /** * Creates a RestoreDatabaseRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -4803,6 +5193,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -4817,6 +5210,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -4846,6 +5242,57 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a NodeSettings. */ interface INodeSettings { diff --git a/types/protos/firestore_v1_proto_api.d.ts b/types/protos/firestore_v1_proto_api.d.ts index c387e89a6..503aa0037 100644 --- a/types/protos/firestore_v1_proto_api.d.ts +++ b/types/protos/firestore_v1_proto_api.d.ts @@ -5865,6 +5865,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -5879,6 +5882,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -5908,6 +5914,57 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a NodeSettings. */ interface INodeSettings { diff --git a/types/protos/firestore_v1beta1_proto_api.d.ts b/types/protos/firestore_v1beta1_proto_api.d.ts index 1a37aaa0e..22789468e 100644 --- a/types/protos/firestore_v1beta1_proto_api.d.ts +++ b/types/protos/firestore_v1beta1_proto_api.d.ts @@ -8038,6 +8038,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -8052,6 +8055,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -8081,6 +8087,57 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a NodeSettings. */ interface INodeSettings { diff --git a/types/v1/firestore_admin_client.d.ts b/types/v1/firestore_admin_client.d.ts index 778371c00..e08a1c7f4 100644 --- a/types/v1/firestore_admin_client.d.ts +++ b/types/v1/firestore_admin_client.d.ts @@ -972,8 +972,8 @@ export declare class FirestoreAdminClient { * Required. Database to export. Should be of the form: * `projects/{project_id}/databases/{database_id}`. * @param {string[]} request.collectionIds - * Which collection ids to export. Unspecified means all collections. Each - * collection id in this list must be unique. + * Which collection IDs to export. Unspecified means all collections. Each + * collection ID in this list must be unique. * @param {string} request.outputUriPrefix * The output URI. Currently only supports Google Cloud Storage URIs of the * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name @@ -1077,8 +1077,8 @@ export declare class FirestoreAdminClient { * Required. Database to import into. Should be of the form: * `projects/{project_id}/databases/{database_id}`. * @param {string[]} request.collectionIds - * Which collection ids to import. Unspecified means all collections included - * in the import. Each collection id in this list must be unique. + * Which collection IDs to import. Unspecified means all collections included + * in the import. Each collection ID in this list must be unique. * @param {string} request.inputUriPrefix * Location of the exported files. * This must match the output_uri_prefix of an ExportDocumentsResponse from @@ -1273,7 +1273,7 @@ export declare class FirestoreAdminClient { * with first character a letter and the last a letter or a number. Must not * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. * - * "(default)" database id is also valid. + * "(default)" database ID is also valid. * @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. @@ -1519,19 +1519,28 @@ export declare class FirestoreAdminClient { * `projects/{project_id}`. * @param {string} request.databaseId * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database id must not be + * component of the database's resource name. This database ID must not be * associated with an existing database. * * This value should be 4-63 characters. Valid characters are /{@link protos.0-9|a-z}-/ * with first character a letter and the last a letter or a number. Must not * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. * - * "(default)" database id is also valid. + * "(default)" database ID is also valid. * @param {string} request.backup * Required. Backup to restore from. Must be from the same project as the * parent. * + * The restored database will be created in the same location as the source + * backup. + * * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` + * @param {google.firestore.admin.v1.Database.EncryptionConfig} [request.encryptionConfig] + * Optional. Encryption configuration for the restored database. + * + * If this field is not specified, the restored database will use + * the same encryption configuration as the backup, namely + * {@link protos.google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption|use_source_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.