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

package com.azure.resourcemanager.batchai.models;

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

/** Input directory for the job. */
@Fluent
public final class InputDirectory {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(InputDirectory.class);

    /*
     * The ID for the input directory. The job can use AZ_BATCHAI_INPUT_<id>
     * environment variable to find the directory path, where <id> is the value
     * of id attribute.
     */
    @JsonProperty(value = "id", required = true)
    private String id;

    /*
     * The path to the input directory.
     */
    @JsonProperty(value = "path", required = true)
    private String path;

    /**
     * Get the id property: The ID for the input directory. The job can use AZ_BATCHAI_INPUT_&lt;id&gt; environment
     * variable to find the directory path, where &lt;id&gt; is the value of id attribute.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

    /**
     * Set the id property: The ID for the input directory. The job can use AZ_BATCHAI_INPUT_&lt;id&gt; environment
     * variable to find the directory path, where &lt;id&gt; is the value of id attribute.
     *
     * @param id the id value to set.
     * @return the InputDirectory object itself.
     */
    public InputDirectory withId(String id) {
        this.id = id;
        return this;
    }

    /**
     * Get the path property: The path to the input directory.
     *
     * @return the path value.
     */
    public String path() {
        return this.path;
    }

    /**
     * Set the path property: The path to the input directory.
     *
     * @param path the path value to set.
     * @return the InputDirectory object itself.
     */
    public InputDirectory withPath(String path) {
        this.path = path;
        return this;
    }

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