// 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.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Describes an input signal to be used on a pipeline node. */
@Fluent
public final class NodeInput {
    /*
     * The name of the upstream node in the pipeline which output is used as
     * input of the current node.
     */
    @JsonProperty(value = "nodeName", required = true)
    private String nodeName;

    /**
     * Get the nodeName property: The name of the upstream node in the pipeline which output is used as input of the
     * current node.
     *
     * @return the nodeName value.
     */
    public String nodeName() {
        return this.nodeName;
    }

    /**
     * Set the nodeName property: The name of the upstream node in the pipeline which output is used as input of the
     * current node.
     *
     * @param nodeName the nodeName value to set.
     * @return the NodeInput object itself.
     */
    public NodeInput withNodeName(String nodeName) {
        this.nodeName = nodeName;
        return this;
    }

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

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