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

package com.azure.resourcemanager.machinelearning.models;

import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Result of AmlCompute Nodes. */
@Immutable
public final class AmlComputeNodesInformation {
    /*
     * The collection of returned AmlCompute nodes details.
     */
    @JsonProperty(value = "nodes", access = JsonProperty.Access.WRITE_ONLY)
    private List<AmlComputeNodeInformation> nodes;

    /*
     * The continuation token.
     */
    @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
    private String nextLink;

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

    /**
     * Get the nodes property: The collection of returned AmlCompute nodes details.
     *
     * @return the nodes value.
     */
    public List<AmlComputeNodeInformation> nodes() {
        return this.nodes;
    }

    /**
     * Get the nextLink property: The continuation token.
     *
     * @return the nextLink value.
     */
    public String nextLink() {
        return this.nextLink;
    }

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