public sealed class AutomatedBackupPolicy.Types.TimeBasedRetention : IMessage<AutomatedBackupPolicy.Types.TimeBasedRetention>, IEquatable<AutomatedBackupPolicy.Types.TimeBasedRetention>, IDeepCloneable<AutomatedBackupPolicy.Types.TimeBasedRetention>, IBufferMessage, IMessage
Reference documentation and code samples for the AlloyDB v1alpha API class AutomatedBackupPolicy.Types.TimeBasedRetention.
A time based retention policy specifies that all backups within a certain
time period 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\u003eThis documentation covers the \u003ccode\u003eAutomatedBackupPolicy.Types.TimeBasedRetention\u003c/code\u003e class within the AlloyDB v1alpha API, which manages time-based retention policies for backups.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTimeBasedRetention\u003c/code\u003e class implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing various functionalities for message handling and object manipulation.\u003c/p\u003e\n"],["\u003cp\u003eThe class inherits from the base \u003ccode\u003eobject\u003c/code\u003e class and offers methods such as \u003ccode\u003eGetHashCode\u003c/code\u003e, \u003ccode\u003eGetType\u003c/code\u003e, and \u003ccode\u003eToString\u003c/code\u003e, alongside specific constructors and a \u003ccode\u003eRetentionPeriod\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eThe primary function of \u003ccode\u003eTimeBasedRetention\u003c/code\u003e is to define a policy that retains all backups within a specified duration, determined by the \u003ccode\u003eRetentionPeriod\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eThere are two documented versions available for this API: 1.0.0-alpha10 (latest) and 1.0.0-alpha09.\u003c/p\u003e\n"]]],[],null,["# AlloyDB v1alpha API - Class AutomatedBackupPolicy.Types.TimeBasedRetention (1.0.0-alpha12)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-alpha12 (latest)](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha.AutomatedBackupPolicy.Types.TimeBasedRetention)\n- [1.0.0-alpha11](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/1.0.0-alpha11/Google.Cloud.AlloyDb.V1Alpha.AutomatedBackupPolicy.Types.TimeBasedRetention) \n\n public sealed class AutomatedBackupPolicy.Types.TimeBasedRetention : IMessage\u003cAutomatedBackupPolicy.Types.TimeBasedRetention\u003e, IEquatable\u003cAutomatedBackupPolicy.Types.TimeBasedRetention\u003e, IDeepCloneable\u003cAutomatedBackupPolicy.Types.TimeBasedRetention\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the AlloyDB v1alpha API class AutomatedBackupPolicy.Types.TimeBasedRetention.\n\nA time based retention policy specifies that all backups within a certain\ntime period should be retained. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e AutomatedBackupPolicy.Types.TimeBasedRetention \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.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha.AutomatedBackupPolicy)[Types](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha.AutomatedBackupPolicy.Types)[TimeBasedRetention](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha.AutomatedBackupPolicy.Types.TimeBasedRetention), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AutomatedBackupPolicy](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha.AutomatedBackupPolicy)[Types](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha.AutomatedBackupPolicy.Types)[TimeBasedRetention](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha.AutomatedBackupPolicy.Types.TimeBasedRetention), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AutomatedBackupPolicy](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha.AutomatedBackupPolicy)[Types](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha.AutomatedBackupPolicy.Types)[TimeBasedRetention](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha.AutomatedBackupPolicy.Types.TimeBasedRetention), [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.V1Alpha](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha)\n\nAssembly\n--------\n\nGoogle.Cloud.AlloyDb.V1Alpha.dll\n\nConstructors\n------------\n\n### TimeBasedRetention()\n\n public TimeBasedRetention()\n\n### TimeBasedRetention(TimeBasedRetention)\n\n public TimeBasedRetention(AutomatedBackupPolicy.Types.TimeBasedRetention other)\n\nProperties\n----------\n\n### RetentionPeriod\n\n public Duration RetentionPeriod { get; set; }\n\nThe retention period."]]