// 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;

/**
 * Optional properties to be used in case a new video resource needs to be created on the service. These will not take
 * effect if the video already exists.
 */
@Fluent
public final class VideoCreationProperties {
    /*
     * Optional title provided by the user. Value can be up to 256 characters
     * long.
     */
    @JsonProperty(value = "title")
    private String title;

    /*
     * Optional description provided by the user. Value can be up to 2048
     * characters long.
     */
    @JsonProperty(value = "description")
    private String description;

    /*
     * Segment length indicates the length of individual content files
     * (segments) which are persisted to storage. Smaller segments provide
     * lower archive playback latency but generate larger volume of storage
     * transactions. Larger segments reduce the amount of storage transactions
     * while increasing the archive playback latency. Value must be specified
     * in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can vary
     * between 30 seconds to 5 minutes, in 30 seconds increments. Changing this
     * value after the initial call to create the video resource can lead to
     * errors when uploading content to the archive. Default value is 30
     * seconds. This property is only allowed for topologies where "kind" is
     * set to "live".
     */
    @JsonProperty(value = "segmentLength")
    private String segmentLength;

    /*
     * Video retention period indicates how long the video is kept in storage.
     * Value must be specified in ISO8601 duration format (i.e. "P1D" equals 1
     * day) and can vary between 1 day to 10 years, in 1 day increments. When
     * absent (null), all video content is retained indefinitely. This property
     * is only allowed for topologies where "kind" is set to "live".
     */
    @JsonProperty(value = "retentionPeriod")
    private String retentionPeriod;

    /**
     * Get the title property: Optional title provided by the user. Value can be up to 256 characters long.
     *
     * @return the title value.
     */
    public String title() {
        return this.title;
    }

    /**
     * Set the title property: Optional title provided by the user. Value can be up to 256 characters long.
     *
     * @param title the title value to set.
     * @return the VideoCreationProperties object itself.
     */
    public VideoCreationProperties withTitle(String title) {
        this.title = title;
        return this;
    }

    /**
     * Get the description property: Optional description provided by the user. Value can be up to 2048 characters long.
     *
     * @return the description value.
     */
    public String description() {
        return this.description;
    }

    /**
     * Set the description property: Optional description provided by the user. Value can be up to 2048 characters long.
     *
     * @param description the description value to set.
     * @return the VideoCreationProperties object itself.
     */
    public VideoCreationProperties withDescription(String description) {
        this.description = description;
        return this;
    }

    /**
     * Get the segmentLength property: Segment length indicates the length of individual content files (segments) which
     * are persisted to storage. Smaller segments provide lower archive playback latency but generate larger volume of
     * storage transactions. Larger segments reduce the amount of storage transactions while increasing the archive
     * playback latency. Value must be specified in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can
     * vary between 30 seconds to 5 minutes, in 30 seconds increments. Changing this value after the initial call to
     * create the video resource can lead to errors when uploading content to the archive. Default value is 30 seconds.
     * This property is only allowed for topologies where "kind" is set to "live".
     *
     * @return the segmentLength value.
     */
    public String segmentLength() {
        return this.segmentLength;
    }

    /**
     * Set the segmentLength property: Segment length indicates the length of individual content files (segments) which
     * are persisted to storage. Smaller segments provide lower archive playback latency but generate larger volume of
     * storage transactions. Larger segments reduce the amount of storage transactions while increasing the archive
     * playback latency. Value must be specified in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can
     * vary between 30 seconds to 5 minutes, in 30 seconds increments. Changing this value after the initial call to
     * create the video resource can lead to errors when uploading content to the archive. Default value is 30 seconds.
     * This property is only allowed for topologies where "kind" is set to "live".
     *
     * @param segmentLength the segmentLength value to set.
     * @return the VideoCreationProperties object itself.
     */
    public VideoCreationProperties withSegmentLength(String segmentLength) {
        this.segmentLength = segmentLength;
        return this;
    }

    /**
     * Get the retentionPeriod property: Video retention period indicates how long the video is kept in storage. Value
     * must be specified in ISO8601 duration format (i.e. "P1D" equals 1 day) and can vary between 1 day to 10 years, in
     * 1 day increments. When absent (null), all video content is retained indefinitely. This property is only allowed
     * for topologies where "kind" is set to "live".
     *
     * @return the retentionPeriod value.
     */
    public String retentionPeriod() {
        return this.retentionPeriod;
    }

    /**
     * Set the retentionPeriod property: Video retention period indicates how long the video is kept in storage. Value
     * must be specified in ISO8601 duration format (i.e. "P1D" equals 1 day) and can vary between 1 day to 10 years, in
     * 1 day increments. When absent (null), all video content is retained indefinitely. This property is only allowed
     * for topologies where "kind" is set to "live".
     *
     * @param retentionPeriod the retentionPeriod value to set.
     * @return the VideoCreationProperties object itself.
     */
    public VideoCreationProperties withRetentionPeriod(String retentionPeriod) {
        this.retentionPeriod = retentionPeriod;
        return this;
    }

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