// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.recoveryservicesbackup.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Retention duration. */
@Fluent
public final class RetentionDuration {
    /*
     * Count of duration types. Retention duration is obtained by the counting the duration type Count times.
     * For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.
     */
    @JsonProperty(value = "count")
    private Integer count;

    /*
     * Retention duration type of retention policy.
     */
    @JsonProperty(value = "durationType")
    private RetentionDurationType durationType;

    /** Creates an instance of RetentionDuration class. */
    public RetentionDuration() {
    }

    /**
     * Get the count property: Count of duration types. Retention duration is obtained by the counting the duration type
     * Count times. For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.
     *
     * @return the count value.
     */
    public Integer count() {
        return this.count;
    }

    /**
     * Set the count property: Count of duration types. Retention duration is obtained by the counting the duration type
     * Count times. For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.
     *
     * @param count the count value to set.
     * @return the RetentionDuration object itself.
     */
    public RetentionDuration withCount(Integer count) {
        this.count = count;
        return this;
    }

    /**
     * Get the durationType property: Retention duration type of retention policy.
     *
     * @return the durationType value.
     */
    public RetentionDurationType durationType() {
        return this.durationType;
    }

    /**
     * Set the durationType property: Retention duration type of retention policy.
     *
     * @param durationType the durationType value to set.
     * @return the RetentionDuration object itself.
     */
    public RetentionDuration withDurationType(RetentionDurationType durationType) {
        this.durationType = durationType;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
