// 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.resourcemanager.databox.fluent.models.JobResourceInner;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Job Resource Collection. */
@Fluent
public final class JobResourceList {
    /*
     * List of job resources.
     */
    @JsonProperty(value = "value")
    private List<JobResourceInner> value;

    /*
     * Link for the next set of job resources.
     */
    @JsonProperty(value = "nextLink")
    private String nextLink;

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

    /**
     * Get the value property: List of job resources.
     *
     * @return the value value.
     */
    public List<JobResourceInner> value() {
        return this.value;
    }

    /**
     * Set the value property: List of job resources.
     *
     * @param value the value value to set.
     * @return the JobResourceList object itself.
     */
    public JobResourceList withValue(List<JobResourceInner> value) {
        this.value = value;
        return this;
    }

    /**
     * Get the nextLink property: Link for the next set of job resources.
     *
     * @return the nextLink value.
     */
    public String nextLink() {
        return this.nextLink;
    }

    /**
     * Set the nextLink property: Link for the next set of job resources.
     *
     * @param nextLink the nextLink value to set.
     * @return the JobResourceList object itself.
     */
    public JobResourceList withNextLink(String nextLink) {
        this.nextLink = nextLink;
        return this;
    }

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