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

package com.azure.resourcemanager.videoanalyzer.models;

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

/** Video archival properties. */
@Fluent
public final class VideoArchival {
    /*
     * Video retention period indicates the maximum age of the video archive
     * segments which are intended to be kept in storage. It must be provided
     * in the ISO8601 duration format in the granularity of days, up to a
     * maximum of 10 years. For example, if this is set to P30D (30 days),
     * content older than 30 days will be periodically deleted. This value can
     * be updated at any time and the new desired retention period will be
     * effective within 24 hours.
     */
    @JsonProperty(value = "retentionPeriod")
    private String retentionPeriod;

    /**
     * Get the retentionPeriod property: Video retention period indicates the maximum age of the video archive segments
     * which are intended to be kept in storage. It must be provided in the ISO8601 duration format in the granularity
     * of days, up to a maximum of 10 years. For example, if this is set to P30D (30 days), content older than 30 days
     * will be periodically deleted. This value can be updated at any time and the new desired retention period will be
     * effective within 24 hours.
     *
     * @return the retentionPeriod value.
     */
    public String retentionPeriod() {
        return this.retentionPeriod;
    }

    /**
     * Set the retentionPeriod property: Video retention period indicates the maximum age of the video archive segments
     * which are intended to be kept in storage. It must be provided in the ISO8601 duration format in the granularity
     * of days, up to a maximum of 10 years. For example, if this is set to P30D (30 days), content older than 30 days
     * will be periodically deleted. This value can be updated at any time and the new desired retention period will be
     * effective within 24 hours.
     *
     * @param retentionPeriod the retentionPeriod value to set.
     * @return the VideoArchival object itself.
     */
    public VideoArchival withRetentionPeriod(String retentionPeriod) {
        this.retentionPeriod = retentionPeriod;
        return this;
    }

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