// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.videoanalyzer.models.VideoArchival;
import com.azure.resourcemanager.videoanalyzer.models.VideoContentUrls;
import com.azure.resourcemanager.videoanalyzer.models.VideoFlags;
import com.azure.resourcemanager.videoanalyzer.models.VideoMediaInfo;
import com.azure.resourcemanager.videoanalyzer.models.VideoType;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Application level properties for the video resource. */
@Fluent
public final class VideoProperties {
    /*
     * Optional video title provided by the user. Value can be up to 256
     * characters long.
     */
    @JsonProperty(value = "title")
    private String title;

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

    /*
     * Video content type. Different content types are suitable for different
     * applications and scenarios.
     */
    @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
    private VideoType type;

    /*
     * Video flags contain information about the available video actions and
     * its dynamic properties based on the current video state.
     */
    @JsonProperty(value = "flags", access = JsonProperty.Access.WRITE_ONLY)
    private VideoFlags flags;

    /*
     * Set of URLs to the video content.
     */
    @JsonProperty(value = "contentUrls", access = JsonProperty.Access.WRITE_ONLY)
    private VideoContentUrls contentUrls;

    /*
     * Contains information about the video and audio content.
     */
    @JsonProperty(value = "mediaInfo")
    private VideoMediaInfo mediaInfo;

    /*
     * Video archival properties.
     */
    @JsonProperty(value = "archival")
    private VideoArchival archival;

    /**
     * Get the title property: Optional video 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 video title provided by the user. Value can be up to 256 characters long.
     *
     * @param title the title value to set.
     * @return the VideoProperties object itself.
     */
    public VideoProperties withTitle(String title) {
        this.title = title;
        return this;
    }

    /**
     * Get the description property: Optional video 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 video description provided by the user. Value can be up to 2048 characters
     * long.
     *
     * @param description the description value to set.
     * @return the VideoProperties object itself.
     */
    public VideoProperties withDescription(String description) {
        this.description = description;
        return this;
    }

    /**
     * Get the type property: Video content type. Different content types are suitable for different applications and
     * scenarios.
     *
     * @return the type value.
     */
    public VideoType type() {
        return this.type;
    }

    /**
     * Get the flags property: Video flags contain information about the available video actions and its dynamic
     * properties based on the current video state.
     *
     * @return the flags value.
     */
    public VideoFlags flags() {
        return this.flags;
    }

    /**
     * Get the contentUrls property: Set of URLs to the video content.
     *
     * @return the contentUrls value.
     */
    public VideoContentUrls contentUrls() {
        return this.contentUrls;
    }

    /**
     * Get the mediaInfo property: Contains information about the video and audio content.
     *
     * @return the mediaInfo value.
     */
    public VideoMediaInfo mediaInfo() {
        return this.mediaInfo;
    }

    /**
     * Set the mediaInfo property: Contains information about the video and audio content.
     *
     * @param mediaInfo the mediaInfo value to set.
     * @return the VideoProperties object itself.
     */
    public VideoProperties withMediaInfo(VideoMediaInfo mediaInfo) {
        this.mediaInfo = mediaInfo;
        return this;
    }

    /**
     * Get the archival property: Video archival properties.
     *
     * @return the archival value.
     */
    public VideoArchival archival() {
        return this.archival;
    }

    /**
     * Set the archival property: Video archival properties.
     *
     * @param archival the archival value to set.
     * @return the VideoProperties object itself.
     */
    public VideoProperties withArchival(VideoArchival archival) {
        this.archival = archival;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (flags() != null) {
            flags().validate();
        }
        if (contentUrls() != null) {
            contentUrls().validate();
        }
        if (mediaInfo() != null) {
            mediaInfo().validate();
        }
        if (archival() != null) {
            archival().validate();
        }
    }
}
