public sealed class AutomatedBackupPolicy.Types.QuantityBasedRetention : IMessage<AutomatedBackupPolicy.Types.QuantityBasedRetention>, IEquatable<AutomatedBackupPolicy.Types.QuantityBasedRetention>, IDeepCloneable<AutomatedBackupPolicy.Types.QuantityBasedRetention>, IBufferMessage, IMessage
Reference documentation and code samples for the AlloyDB v1 API class AutomatedBackupPolicy.Types.QuantityBasedRetention.
A quantity based policy specifies that a certain number of the most recent
successful backups should be retained.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version available for \u003ccode\u003eAutomatedBackupPolicy.Types.QuantityBasedRetention\u003c/code\u003e is 1.9.0, with versions ranging down to 1.0.0 also being accessible.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAutomatedBackupPolicy.Types.QuantityBasedRetention\u003c/code\u003e class, as described in the AlloyDB v1 API documentation, is used to define a policy for retaining a certain number of recent successful backups.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements multiple interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, allowing it to be utilized in varied contexts.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eQuantityBasedRetention\u003c/code\u003e class provides a \u003ccode\u003eCount\u003c/code\u003e property which, as an integer, determines how many backups will be stored, and it provides two constructors for various initiation purposes.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eQuantityBasedRetention\u003c/code\u003e class inherits from the \u003ccode\u003eobject\u003c/code\u003e class, and includes methods such as \u003ccode\u003eGetHashCode\u003c/code\u003e, \u003ccode\u003eGetType\u003c/code\u003e, and \u003ccode\u003eToString\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# AlloyDB v1 API - Class AutomatedBackupPolicy.Types.QuantityBasedRetention (1.11.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.11.0 (latest)](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention)\n- [1.10.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.10.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention)\n- [1.9.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.9.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.8.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.7.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.6.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.5.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.4.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.3.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.2.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.1.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/1.0.0/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention) \n\n public sealed class AutomatedBackupPolicy.Types.QuantityBasedRetention : IMessage\u003cAutomatedBackupPolicy.Types.QuantityBasedRetention\u003e, IEquatable\u003cAutomatedBackupPolicy.Types.QuantityBasedRetention\u003e, IDeepCloneable\u003cAutomatedBackupPolicy.Types.QuantityBasedRetention\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the AlloyDB v1 API class AutomatedBackupPolicy.Types.QuantityBasedRetention.\n\nA quantity based policy specifies that a certain number of the most recent\nsuccessful backups should be retained. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e AutomatedBackupPolicy.Types.QuantityBasedRetention \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[AutomatedBackupPolicy](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy)[Types](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types)[QuantityBasedRetention](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AutomatedBackupPolicy](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy)[Types](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types)[QuantityBasedRetention](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AutomatedBackupPolicy](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy)[Types](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types)[QuantityBasedRetention](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1.AutomatedBackupPolicy.Types.QuantityBasedRetention), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.AlloyDb.V1](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1/latest/Google.Cloud.AlloyDb.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.AlloyDb.V1.dll\n\nConstructors\n------------\n\n### QuantityBasedRetention()\n\n public QuantityBasedRetention()\n\n### QuantityBasedRetention(QuantityBasedRetention)\n\n public QuantityBasedRetention(AutomatedBackupPolicy.Types.QuantityBasedRetention other)\n\nProperties\n----------\n\n### Count\n\n public int Count { get; set; }\n\nThe number of backups to retain."]]