diff --git a/protos/google/spanner/admin/database/v1/backup.proto b/protos/google/spanner/admin/database/v1/backup.proto index f684a4c60..842ab0ff1 100644 --- a/protos/google/spanner/admin/database/v1/backup.proto +++ b/protos/google/spanner/admin/database/v1/backup.proto @@ -103,6 +103,24 @@ message Backup { // Output only. Size of the backup in bytes. int64 size_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The number of bytes that will be freed by deleting this + // backup. This value will be zero if, for example, this backup is part of an + // incremental backup chain and younger backups in the chain require that we + // keep its data. For backups not in an incremental backup chain, this is + // always the size of the backup. This value may change if backups on the same + // chain get created, deleted or expired. + int64 freeable_size_bytes = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. For a backup in an incremental backup chain, this is the + // storage space needed to keep the data that has changed since the previous + // backup. For all other backups, this is always the size of the backup. This + // value may change if backups on the same chain get deleted or expired. + // + // This field can be used to calculate the total storage space used by a set + // of backups. For example, the total space used by all backups of a database + // can be computed by summing up this field. + int64 exclusive_size_bytes = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The current state of the backup. State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -168,6 +186,23 @@ message Backup { // single backup schedule URI associated with creating this backup. repeated string backup_schedules = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Populated only for backups in an incremental backup chain. + // Backups share the same chain id if and only if they belong to the same + // incremental backup chain. Use this field to determine which backups are + // part of the same incremental backup chain. The ordering of backups in the + // chain can be determined by ordering the backup `version_time`. + string incremental_backup_chain_id = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Data deleted at a time older than this is guaranteed not to be + // retained in order to support this backup. For a backup in an incremental + // backup chain, this is the version time of the oldest backup that exists or + // ever existed in the chain. For all other backups, this is the version time + // of the backup. This field can be used to understand what data is being + // retained by the backup system. + google.protobuf.Timestamp oldest_version_time = 18 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The request for @@ -705,3 +740,11 @@ message CopyBackupEncryptionConfig { // A full backup stores the entire contents of the database at a given // version time. message FullBackupSpec {} + +// The specification for incremental backup chains. +// An incremental backup stores the delta of changes between a previous +// backup and the database contents at a given version time. An +// incremental backup chain consists of a full backup and zero or more +// successive incremental backups. The first backup created for an +// incremental backup chain is always a full backup. +message IncrementalBackupSpec {} diff --git a/protos/google/spanner/admin/database/v1/backup_schedule.proto b/protos/google/spanner/admin/database/v1/backup_schedule.proto index 9ef4587f8..c9b5e7e3f 100644 --- a/protos/google/spanner/admin/database/v1/backup_schedule.proto +++ b/protos/google/spanner/admin/database/v1/backup_schedule.proto @@ -83,6 +83,9 @@ message BackupSchedule { oneof backup_type_spec { // The schedule creates only full backups. FullBackupSpec full_backup_spec = 7; + + // The schedule creates incremental backup chains. + IncrementalBackupSpec incremental_backup_spec = 8; } // Output only. The timestamp at which the schedule was last updated. diff --git a/protos/protos.d.ts b/protos/protos.d.ts index faebebfe6..f91afd2af 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -6549,6 +6549,12 @@ export namespace google { /** Backup sizeBytes */ sizeBytes?: (number|Long|string|null); + /** Backup freeableSizeBytes */ + freeableSizeBytes?: (number|Long|string|null); + + /** Backup exclusiveSizeBytes */ + exclusiveSizeBytes?: (number|Long|string|null); + /** Backup state */ state?: (google.spanner.admin.database.v1.Backup.State|keyof typeof google.spanner.admin.database.v1.Backup.State|null); @@ -6572,6 +6578,12 @@ export namespace google { /** Backup backupSchedules */ backupSchedules?: (string[]|null); + + /** Backup incrementalBackupChainId */ + incrementalBackupChainId?: (string|null); + + /** Backup oldestVersionTime */ + oldestVersionTime?: (google.protobuf.ITimestamp|null); } /** Represents a Backup. */ @@ -6601,6 +6613,12 @@ export namespace google { /** Backup sizeBytes. */ public sizeBytes: (number|Long|string); + /** Backup freeableSizeBytes. */ + public freeableSizeBytes: (number|Long|string); + + /** Backup exclusiveSizeBytes. */ + public exclusiveSizeBytes: (number|Long|string); + /** Backup state. */ public state: (google.spanner.admin.database.v1.Backup.State|keyof typeof google.spanner.admin.database.v1.Backup.State); @@ -6625,6 +6643,12 @@ export namespace google { /** Backup backupSchedules. */ public backupSchedules: string[]; + /** Backup incrementalBackupChainId. */ + public incrementalBackupChainId: string; + + /** Backup oldestVersionTime. */ + public oldestVersionTime?: (google.protobuf.ITimestamp|null); + /** * Creates a new Backup instance using the specified properties. * @param [properties] Properties to set @@ -8358,6 +8382,97 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an IncrementalBackupSpec. */ + interface IIncrementalBackupSpec { + } + + /** Represents an IncrementalBackupSpec. */ + class IncrementalBackupSpec implements IIncrementalBackupSpec { + + /** + * Constructs a new IncrementalBackupSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.spanner.admin.database.v1.IIncrementalBackupSpec); + + /** + * Creates a new IncrementalBackupSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns IncrementalBackupSpec instance + */ + public static create(properties?: google.spanner.admin.database.v1.IIncrementalBackupSpec): google.spanner.admin.database.v1.IncrementalBackupSpec; + + /** + * Encodes the specified IncrementalBackupSpec message. Does not implicitly {@link google.spanner.admin.database.v1.IncrementalBackupSpec.verify|verify} messages. + * @param message IncrementalBackupSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.spanner.admin.database.v1.IIncrementalBackupSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IncrementalBackupSpec message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.IncrementalBackupSpec.verify|verify} messages. + * @param message IncrementalBackupSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.spanner.admin.database.v1.IIncrementalBackupSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IncrementalBackupSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IncrementalBackupSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.admin.database.v1.IncrementalBackupSpec; + + /** + * Decodes an IncrementalBackupSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IncrementalBackupSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.admin.database.v1.IncrementalBackupSpec; + + /** + * Verifies an IncrementalBackupSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IncrementalBackupSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IncrementalBackupSpec + */ + public static fromObject(object: { [k: string]: any }): google.spanner.admin.database.v1.IncrementalBackupSpec; + + /** + * Creates a plain object from an IncrementalBackupSpec message. Also converts values to other types if specified. + * @param message IncrementalBackupSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.spanner.admin.database.v1.IncrementalBackupSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IncrementalBackupSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IncrementalBackupSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an OperationProgress. */ interface IOperationProgress { @@ -8814,6 +8929,9 @@ export namespace google { /** BackupSchedule fullBackupSpec */ fullBackupSpec?: (google.spanner.admin.database.v1.IFullBackupSpec|null); + /** BackupSchedule incrementalBackupSpec */ + incrementalBackupSpec?: (google.spanner.admin.database.v1.IIncrementalBackupSpec|null); + /** BackupSchedule updateTime */ updateTime?: (google.protobuf.ITimestamp|null); } @@ -8842,11 +8960,14 @@ export namespace google { /** BackupSchedule fullBackupSpec. */ public fullBackupSpec?: (google.spanner.admin.database.v1.IFullBackupSpec|null); + /** BackupSchedule incrementalBackupSpec. */ + public incrementalBackupSpec?: (google.spanner.admin.database.v1.IIncrementalBackupSpec|null); + /** BackupSchedule updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); /** BackupSchedule backupTypeSpec. */ - public backupTypeSpec?: "fullBackupSpec"; + public backupTypeSpec?: ("fullBackupSpec"|"incrementalBackupSpec"); /** * Creates a new BackupSchedule instance using the specified properties. diff --git a/protos/protos.js b/protos/protos.js index 320809a01..e32b07c36 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -17695,6 +17695,8 @@ * @property {string|null} [name] Backup name * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime * @property {number|Long|null} [sizeBytes] Backup sizeBytes + * @property {number|Long|null} [freeableSizeBytes] Backup freeableSizeBytes + * @property {number|Long|null} [exclusiveSizeBytes] Backup exclusiveSizeBytes * @property {google.spanner.admin.database.v1.Backup.State|null} [state] Backup state * @property {Array.|null} [referencingDatabases] Backup referencingDatabases * @property {google.spanner.admin.database.v1.IEncryptionInfo|null} [encryptionInfo] Backup encryptionInfo @@ -17703,6 +17705,8 @@ * @property {Array.|null} [referencingBackups] Backup referencingBackups * @property {google.protobuf.ITimestamp|null} [maxExpireTime] Backup maxExpireTime * @property {Array.|null} [backupSchedules] Backup backupSchedules + * @property {string|null} [incrementalBackupChainId] Backup incrementalBackupChainId + * @property {google.protobuf.ITimestamp|null} [oldestVersionTime] Backup oldestVersionTime */ /** @@ -17772,6 +17776,22 @@ */ Backup.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Backup freeableSizeBytes. + * @member {number|Long} freeableSizeBytes + * @memberof google.spanner.admin.database.v1.Backup + * @instance + */ + Backup.prototype.freeableSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Backup exclusiveSizeBytes. + * @member {number|Long} exclusiveSizeBytes + * @memberof google.spanner.admin.database.v1.Backup + * @instance + */ + Backup.prototype.exclusiveSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** * Backup state. * @member {google.spanner.admin.database.v1.Backup.State} state @@ -17836,6 +17856,22 @@ */ Backup.prototype.backupSchedules = $util.emptyArray; + /** + * Backup incrementalBackupChainId. + * @member {string} incrementalBackupChainId + * @memberof google.spanner.admin.database.v1.Backup + * @instance + */ + Backup.prototype.incrementalBackupChainId = ""; + + /** + * Backup oldestVersionTime. + * @member {google.protobuf.ITimestamp|null|undefined} oldestVersionTime + * @memberof google.spanner.admin.database.v1.Backup + * @instance + */ + Backup.prototype.oldestVersionTime = null; + /** * Creates a new Backup instance using the specified properties. * @function create @@ -17892,6 +17928,14 @@ if (message.backupSchedules != null && message.backupSchedules.length) for (var i = 0; i < message.backupSchedules.length; ++i) writer.uint32(/* id 14, wireType 2 =*/114).string(message.backupSchedules[i]); + if (message.freeableSizeBytes != null && Object.hasOwnProperty.call(message, "freeableSizeBytes")) + writer.uint32(/* id 15, wireType 0 =*/120).int64(message.freeableSizeBytes); + if (message.exclusiveSizeBytes != null && Object.hasOwnProperty.call(message, "exclusiveSizeBytes")) + writer.uint32(/* id 16, wireType 0 =*/128).int64(message.exclusiveSizeBytes); + if (message.incrementalBackupChainId != null && Object.hasOwnProperty.call(message, "incrementalBackupChainId")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.incrementalBackupChainId); + if (message.oldestVersionTime != null && Object.hasOwnProperty.call(message, "oldestVersionTime")) + $root.google.protobuf.Timestamp.encode(message.oldestVersionTime, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; @@ -17950,6 +17994,14 @@ message.sizeBytes = reader.int64(); break; } + case 15: { + message.freeableSizeBytes = reader.int64(); + break; + } + case 16: { + message.exclusiveSizeBytes = reader.int64(); + break; + } case 6: { message.state = reader.int32(); break; @@ -17990,6 +18042,14 @@ message.backupSchedules.push(reader.string()); break; } + case 17: { + message.incrementalBackupChainId = reader.string(); + break; + } + case 18: { + message.oldestVersionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18049,6 +18109,12 @@ if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high))) return "sizeBytes: integer|Long expected"; + if (message.freeableSizeBytes != null && message.hasOwnProperty("freeableSizeBytes")) + if (!$util.isInteger(message.freeableSizeBytes) && !(message.freeableSizeBytes && $util.isInteger(message.freeableSizeBytes.low) && $util.isInteger(message.freeableSizeBytes.high))) + return "freeableSizeBytes: integer|Long expected"; + if (message.exclusiveSizeBytes != null && message.hasOwnProperty("exclusiveSizeBytes")) + if (!$util.isInteger(message.exclusiveSizeBytes) && !(message.exclusiveSizeBytes && $util.isInteger(message.exclusiveSizeBytes.low) && $util.isInteger(message.exclusiveSizeBytes.high))) + return "exclusiveSizeBytes: integer|Long expected"; if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: @@ -18107,6 +18173,14 @@ if (!$util.isString(message.backupSchedules[i])) return "backupSchedules: string[] expected"; } + if (message.incrementalBackupChainId != null && message.hasOwnProperty("incrementalBackupChainId")) + if (!$util.isString(message.incrementalBackupChainId)) + return "incrementalBackupChainId: string expected"; + if (message.oldestVersionTime != null && message.hasOwnProperty("oldestVersionTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.oldestVersionTime); + if (error) + return "oldestVersionTime." + error; + } return null; }; @@ -18150,6 +18224,24 @@ message.sizeBytes = object.sizeBytes; else if (typeof object.sizeBytes === "object") message.sizeBytes = new $util.LongBits(object.sizeBytes.low >>> 0, object.sizeBytes.high >>> 0).toNumber(); + if (object.freeableSizeBytes != null) + if ($util.Long) + (message.freeableSizeBytes = $util.Long.fromValue(object.freeableSizeBytes)).unsigned = false; + else if (typeof object.freeableSizeBytes === "string") + message.freeableSizeBytes = parseInt(object.freeableSizeBytes, 10); + else if (typeof object.freeableSizeBytes === "number") + message.freeableSizeBytes = object.freeableSizeBytes; + else if (typeof object.freeableSizeBytes === "object") + message.freeableSizeBytes = new $util.LongBits(object.freeableSizeBytes.low >>> 0, object.freeableSizeBytes.high >>> 0).toNumber(); + if (object.exclusiveSizeBytes != null) + if ($util.Long) + (message.exclusiveSizeBytes = $util.Long.fromValue(object.exclusiveSizeBytes)).unsigned = false; + else if (typeof object.exclusiveSizeBytes === "string") + message.exclusiveSizeBytes = parseInt(object.exclusiveSizeBytes, 10); + else if (typeof object.exclusiveSizeBytes === "number") + message.exclusiveSizeBytes = object.exclusiveSizeBytes; + else if (typeof object.exclusiveSizeBytes === "object") + message.exclusiveSizeBytes = new $util.LongBits(object.exclusiveSizeBytes.low >>> 0, object.exclusiveSizeBytes.high >>> 0).toNumber(); switch (object.state) { default: if (typeof object.state === "number") { @@ -18231,6 +18323,13 @@ for (var i = 0; i < object.backupSchedules.length; ++i) message.backupSchedules[i] = String(object.backupSchedules[i]); } + if (object.incrementalBackupChainId != null) + message.incrementalBackupChainId = String(object.incrementalBackupChainId); + if (object.oldestVersionTime != null) { + if (typeof object.oldestVersionTime !== "object") + throw TypeError(".google.spanner.admin.database.v1.Backup.oldestVersionTime: object expected"); + message.oldestVersionTime = $root.google.protobuf.Timestamp.fromObject(object.oldestVersionTime); + } return message; }; @@ -18268,6 +18367,18 @@ object.versionTime = null; object.databaseDialect = options.enums === String ? "DATABASE_DIALECT_UNSPECIFIED" : 0; object.maxExpireTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.freeableSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.freeableSizeBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.exclusiveSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.exclusiveSizeBytes = options.longs === String ? "0" : 0; + object.incrementalBackupChainId = ""; + object.oldestVersionTime = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -18312,6 +18423,20 @@ for (var j = 0; j < message.backupSchedules.length; ++j) object.backupSchedules[j] = message.backupSchedules[j]; } + if (message.freeableSizeBytes != null && message.hasOwnProperty("freeableSizeBytes")) + if (typeof message.freeableSizeBytes === "number") + object.freeableSizeBytes = options.longs === String ? String(message.freeableSizeBytes) : message.freeableSizeBytes; + else + object.freeableSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.freeableSizeBytes) : options.longs === Number ? new $util.LongBits(message.freeableSizeBytes.low >>> 0, message.freeableSizeBytes.high >>> 0).toNumber() : message.freeableSizeBytes; + if (message.exclusiveSizeBytes != null && message.hasOwnProperty("exclusiveSizeBytes")) + if (typeof message.exclusiveSizeBytes === "number") + object.exclusiveSizeBytes = options.longs === String ? String(message.exclusiveSizeBytes) : message.exclusiveSizeBytes; + else + object.exclusiveSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.exclusiveSizeBytes) : options.longs === Number ? new $util.LongBits(message.exclusiveSizeBytes.low >>> 0, message.exclusiveSizeBytes.high >>> 0).toNumber() : message.exclusiveSizeBytes; + if (message.incrementalBackupChainId != null && message.hasOwnProperty("incrementalBackupChainId")) + object.incrementalBackupChainId = message.incrementalBackupChainId; + if (message.oldestVersionTime != null && message.hasOwnProperty("oldestVersionTime")) + object.oldestVersionTime = $root.google.protobuf.Timestamp.toObject(message.oldestVersionTime, options); return object; }; @@ -22286,6 +22411,181 @@ return FullBackupSpec; })(); + v1.IncrementalBackupSpec = (function() { + + /** + * Properties of an IncrementalBackupSpec. + * @memberof google.spanner.admin.database.v1 + * @interface IIncrementalBackupSpec + */ + + /** + * Constructs a new IncrementalBackupSpec. + * @memberof google.spanner.admin.database.v1 + * @classdesc Represents an IncrementalBackupSpec. + * @implements IIncrementalBackupSpec + * @constructor + * @param {google.spanner.admin.database.v1.IIncrementalBackupSpec=} [properties] Properties to set + */ + function IncrementalBackupSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new IncrementalBackupSpec instance using the specified properties. + * @function create + * @memberof google.spanner.admin.database.v1.IncrementalBackupSpec + * @static + * @param {google.spanner.admin.database.v1.IIncrementalBackupSpec=} [properties] Properties to set + * @returns {google.spanner.admin.database.v1.IncrementalBackupSpec} IncrementalBackupSpec instance + */ + IncrementalBackupSpec.create = function create(properties) { + return new IncrementalBackupSpec(properties); + }; + + /** + * Encodes the specified IncrementalBackupSpec message. Does not implicitly {@link google.spanner.admin.database.v1.IncrementalBackupSpec.verify|verify} messages. + * @function encode + * @memberof google.spanner.admin.database.v1.IncrementalBackupSpec + * @static + * @param {google.spanner.admin.database.v1.IIncrementalBackupSpec} message IncrementalBackupSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalBackupSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified IncrementalBackupSpec message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.IncrementalBackupSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.spanner.admin.database.v1.IncrementalBackupSpec + * @static + * @param {google.spanner.admin.database.v1.IIncrementalBackupSpec} message IncrementalBackupSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalBackupSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IncrementalBackupSpec message from the specified reader or buffer. + * @function decode + * @memberof google.spanner.admin.database.v1.IncrementalBackupSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.spanner.admin.database.v1.IncrementalBackupSpec} IncrementalBackupSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalBackupSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.IncrementalBackupSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IncrementalBackupSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.spanner.admin.database.v1.IncrementalBackupSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.spanner.admin.database.v1.IncrementalBackupSpec} IncrementalBackupSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalBackupSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IncrementalBackupSpec message. + * @function verify + * @memberof google.spanner.admin.database.v1.IncrementalBackupSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IncrementalBackupSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an IncrementalBackupSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.spanner.admin.database.v1.IncrementalBackupSpec + * @static + * @param {Object.} object Plain object + * @returns {google.spanner.admin.database.v1.IncrementalBackupSpec} IncrementalBackupSpec + */ + IncrementalBackupSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.admin.database.v1.IncrementalBackupSpec) + return object; + return new $root.google.spanner.admin.database.v1.IncrementalBackupSpec(); + }; + + /** + * Creates a plain object from an IncrementalBackupSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.spanner.admin.database.v1.IncrementalBackupSpec + * @static + * @param {google.spanner.admin.database.v1.IncrementalBackupSpec} message IncrementalBackupSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IncrementalBackupSpec.toObject = function toObject() { + return {}; + }; + + /** + * Converts this IncrementalBackupSpec to JSON. + * @function toJSON + * @memberof google.spanner.admin.database.v1.IncrementalBackupSpec + * @instance + * @returns {Object.} JSON object + */ + IncrementalBackupSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IncrementalBackupSpec + * @function getTypeUrl + * @memberof google.spanner.admin.database.v1.IncrementalBackupSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IncrementalBackupSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.spanner.admin.database.v1.IncrementalBackupSpec"; + }; + + return IncrementalBackupSpec; + })(); + v1.OperationProgress = (function() { /** @@ -23338,6 +23638,7 @@ * @property {google.protobuf.IDuration|null} [retentionDuration] BackupSchedule retentionDuration * @property {google.spanner.admin.database.v1.ICreateBackupEncryptionConfig|null} [encryptionConfig] BackupSchedule encryptionConfig * @property {google.spanner.admin.database.v1.IFullBackupSpec|null} [fullBackupSpec] BackupSchedule fullBackupSpec + * @property {google.spanner.admin.database.v1.IIncrementalBackupSpec|null} [incrementalBackupSpec] BackupSchedule incrementalBackupSpec * @property {google.protobuf.ITimestamp|null} [updateTime] BackupSchedule updateTime */ @@ -23396,6 +23697,14 @@ */ BackupSchedule.prototype.fullBackupSpec = null; + /** + * BackupSchedule incrementalBackupSpec. + * @member {google.spanner.admin.database.v1.IIncrementalBackupSpec|null|undefined} incrementalBackupSpec + * @memberof google.spanner.admin.database.v1.BackupSchedule + * @instance + */ + BackupSchedule.prototype.incrementalBackupSpec = null; + /** * BackupSchedule updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime @@ -23409,12 +23718,12 @@ /** * BackupSchedule backupTypeSpec. - * @member {"fullBackupSpec"|undefined} backupTypeSpec + * @member {"fullBackupSpec"|"incrementalBackupSpec"|undefined} backupTypeSpec * @memberof google.spanner.admin.database.v1.BackupSchedule * @instance */ Object.defineProperty(BackupSchedule.prototype, "backupTypeSpec", { - get: $util.oneOfGetter($oneOfFields = ["fullBackupSpec"]), + get: $util.oneOfGetter($oneOfFields = ["fullBackupSpec", "incrementalBackupSpec"]), set: $util.oneOfSetter($oneOfFields) }); @@ -23452,6 +23761,8 @@ $root.google.spanner.admin.database.v1.BackupScheduleSpec.encode(message.spec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.fullBackupSpec != null && Object.hasOwnProperty.call(message, "fullBackupSpec")) $root.google.spanner.admin.database.v1.FullBackupSpec.encode(message.fullBackupSpec, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.incrementalBackupSpec != null && Object.hasOwnProperty.call(message, "incrementalBackupSpec")) + $root.google.spanner.admin.database.v1.IncrementalBackupSpec.encode(message.incrementalBackupSpec, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; @@ -23508,6 +23819,10 @@ message.fullBackupSpec = $root.google.spanner.admin.database.v1.FullBackupSpec.decode(reader, reader.uint32()); break; } + case 8: { + message.incrementalBackupSpec = $root.google.spanner.admin.database.v1.IncrementalBackupSpec.decode(reader, reader.uint32()); + break; + } case 9: { message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; @@ -23574,6 +23889,16 @@ return "fullBackupSpec." + error; } } + if (message.incrementalBackupSpec != null && message.hasOwnProperty("incrementalBackupSpec")) { + if (properties.backupTypeSpec === 1) + return "backupTypeSpec: multiple values"; + properties.backupTypeSpec = 1; + { + var error = $root.google.spanner.admin.database.v1.IncrementalBackupSpec.verify(message.incrementalBackupSpec); + if (error) + return "incrementalBackupSpec." + error; + } + } if (message.updateTime != null && message.hasOwnProperty("updateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) @@ -23616,6 +23941,11 @@ throw TypeError(".google.spanner.admin.database.v1.BackupSchedule.fullBackupSpec: object expected"); message.fullBackupSpec = $root.google.spanner.admin.database.v1.FullBackupSpec.fromObject(object.fullBackupSpec); } + if (object.incrementalBackupSpec != null) { + if (typeof object.incrementalBackupSpec !== "object") + throw TypeError(".google.spanner.admin.database.v1.BackupSchedule.incrementalBackupSpec: object expected"); + message.incrementalBackupSpec = $root.google.spanner.admin.database.v1.IncrementalBackupSpec.fromObject(object.incrementalBackupSpec); + } if (object.updateTime != null) { if (typeof object.updateTime !== "object") throw TypeError(".google.spanner.admin.database.v1.BackupSchedule.updateTime: object expected"); @@ -23657,6 +23987,11 @@ if (options.oneofs) object.backupTypeSpec = "fullBackupSpec"; } + if (message.incrementalBackupSpec != null && message.hasOwnProperty("incrementalBackupSpec")) { + object.incrementalBackupSpec = $root.google.spanner.admin.database.v1.IncrementalBackupSpec.toObject(message.incrementalBackupSpec, options); + if (options.oneofs) + object.backupTypeSpec = "incrementalBackupSpec"; + } if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; diff --git a/protos/protos.json b/protos/protos.json index e4a6dddac..f344ee884 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -1667,6 +1667,20 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "freeableSizeBytes": { + "type": "int64", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "exclusiveSizeBytes": { + "type": "int64", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "state": { "type": "State", "id": 6, @@ -1728,6 +1742,20 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "incrementalBackupChainId": { + "type": "string", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "oldestVersionTime": { + "type": "google.protobuf.Timestamp", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -2087,6 +2115,9 @@ "FullBackupSpec": { "fields": {} }, + "IncrementalBackupSpec": { + "fields": {} + }, "OperationProgress": { "fields": { "progressPercent": { @@ -2189,7 +2220,8 @@ "oneofs": { "backupTypeSpec": { "oneof": [ - "fullBackupSpec" + "fullBackupSpec", + "incrementalBackupSpec" ] } }, @@ -2226,6 +2258,10 @@ "type": "FullBackupSpec", "id": 7 }, + "incrementalBackupSpec": { + "type": "IncrementalBackupSpec", + "id": 8 + }, "updateTime": { "type": "google.protobuf.Timestamp", "id": 9,