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

package com.azure.resourcemanager.streamanalytics.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;
import java.util.List;

/** The inputs for the Azure Machine Learning web service endpoint. */
@Fluent
public final class AzureMachineLearningWebServiceInputs {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureMachineLearningWebServiceInputs.class);

    /*
     * The name of the input. This is the name provided while authoring the
     * endpoint.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * A list of input columns for the Azure Machine Learning web service
     * endpoint.
     */
    @JsonProperty(value = "columnNames")
    private List<AzureMachineLearningWebServiceInputColumn> columnNames;

    /**
     * Get the name property: The name of the input. This is the name provided while authoring the endpoint.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: The name of the input. This is the name provided while authoring the endpoint.
     *
     * @param name the name value to set.
     * @return the AzureMachineLearningWebServiceInputs object itself.
     */
    public AzureMachineLearningWebServiceInputs withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the columnNames property: A list of input columns for the Azure Machine Learning web service endpoint.
     *
     * @return the columnNames value.
     */
    public List<AzureMachineLearningWebServiceInputColumn> columnNames() {
        return this.columnNames;
    }

    /**
     * Set the columnNames property: A list of input columns for the Azure Machine Learning web service endpoint.
     *
     * @param columnNames the columnNames value to set.
     * @return the AzureMachineLearningWebServiceInputs object itself.
     */
    public AzureMachineLearningWebServiceInputs withColumnNames(
        List<AzureMachineLearningWebServiceInputColumn> columnNames) {
        this.columnNames = columnNames;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (columnNames() != null) {
            columnNames().forEach(e -> e.validate());
        }
    }
}
