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

package com.azure.media.videoanalyzer.edge.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;

/** File sink allows for video and audio content to be recorded on the file system on the edge device. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type")
@JsonTypeName("#Microsoft.VideoAnalyzer.FileSink")
@Fluent
public final class FileSink extends SinkNodeBase {
    /*
     * Absolute directory path where media files will be stored.
     */
    @JsonProperty(value = "baseDirectoryPath", required = true)
    private String baseDirectoryPath;

    /*
     * File name pattern for creating new files when performing event based
     * recording. The pattern must include at least one system variable.
     */
    @JsonProperty(value = "fileNamePattern", required = true)
    private String fileNamePattern;

    /*
     * Maximum amount of disk space that can be used for storing files from
     * this sink. Once this limit is reached, the oldest files from this sink
     * will be automatically deleted.
     */
    @JsonProperty(value = "maximumSizeMiB", required = true)
    private String maximumSizeMiB;

    /**
     * Creates an instance of FileSink class.
     *
     * @param name the name value to set.
     * @param inputs the inputs value to set.
     * @param baseDirectoryPath the baseDirectoryPath value to set.
     * @param fileNamePattern the fileNamePattern value to set.
     * @param maximumSizeMiB the maximumSizeMiB value to set.
     */
    @JsonCreator
    public FileSink(
            @JsonProperty(value = "name", required = true) String name,
            @JsonProperty(value = "inputs", required = true) List<NodeInput> inputs,
            @JsonProperty(value = "baseDirectoryPath", required = true) String baseDirectoryPath,
            @JsonProperty(value = "fileNamePattern", required = true) String fileNamePattern,
            @JsonProperty(value = "maximumSizeMiB", required = true) String maximumSizeMiB) {
        super(name, inputs);
        this.baseDirectoryPath = baseDirectoryPath;
        this.fileNamePattern = fileNamePattern;
        this.maximumSizeMiB = maximumSizeMiB;
    }

    /**
     * Get the baseDirectoryPath property: Absolute directory path where media files will be stored.
     *
     * @return the baseDirectoryPath value.
     */
    public String getBaseDirectoryPath() {
        return this.baseDirectoryPath;
    }

    /**
     * Get the fileNamePattern property: File name pattern for creating new files when performing event based recording.
     * The pattern must include at least one system variable.
     *
     * @return the fileNamePattern value.
     */
    public String getFileNamePattern() {
        return this.fileNamePattern;
    }

    /**
     * Get the maximumSizeMiB property: Maximum amount of disk space that can be used for storing files from this sink.
     * Once this limit is reached, the oldest files from this sink will be automatically deleted.
     *
     * @return the maximumSizeMiB value.
     */
    public String getMaximumSizeMiB() {
        return this.maximumSizeMiB;
    }
}
