using Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Ocs; namespace Pilz.Networking.CloudProviders.Nextcloud.Client.Apps.FileRetention.Model; public class RetentionRuleInfo { /// /// The ID for the tag that is used for this rule. /// public int TagID { get; init; } /// /// The unit used for the time. /// public RetentionTimeUnit TimeUnit { get; init; } /// /// Represents numer of days/weeks/months/years. /// public int TimeAmount { get; init; } /// /// The time used for the rule. /// public RetentionTimeAfter TimeAfter { get; init; } public OcsDataRetentionRule ToOcsData() { return new OcsDataRetentionRule { TagID = TagID, TimeUnit = (int)TimeUnit, TimeAmount = TimeAmount, TimeAfter = (int)TimeAfter }; } }