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

package com.azure.resourcemanager.databox.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Details of the filter files to be used for data transfer. */
@Fluent
public final class FilterFileDetails {
    /*
     * Type of the filter file.
     */
    @JsonProperty(value = "filterFileType", required = true)
    private FilterFileType filterFileType;

    /*
     * Path of the file that contains the details of all items to transfer.
     */
    @JsonProperty(value = "filterFilePath", required = true)
    private String filterFilePath;

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

    /**
     * Get the filterFileType property: Type of the filter file.
     *
     * @return the filterFileType value.
     */
    public FilterFileType filterFileType() {
        return this.filterFileType;
    }

    /**
     * Set the filterFileType property: Type of the filter file.
     *
     * @param filterFileType the filterFileType value to set.
     * @return the FilterFileDetails object itself.
     */
    public FilterFileDetails withFilterFileType(FilterFileType filterFileType) {
        this.filterFileType = filterFileType;
        return this;
    }

    /**
     * Get the filterFilePath property: Path of the file that contains the details of all items to transfer.
     *
     * @return the filterFilePath value.
     */
    public String filterFilePath() {
        return this.filterFilePath;
    }

    /**
     * Set the filterFilePath property: Path of the file that contains the details of all items to transfer.
     *
     * @param filterFilePath the filterFilePath value to set.
     * @return the FilterFileDetails object itself.
     */
    public FilterFileDetails withFilterFilePath(String filterFilePath) {
        this.filterFilePath = filterFilePath;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (filterFileType() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property filterFileType in model FilterFileDetails"));
        }
        if (filterFilePath() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property filterFilePath in model FilterFileDetails"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(FilterFileDetails.class);
}
