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

package com.azure.resourcemanager.edgeorder.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.edgeorder.fluent.models.AddressResourceInner;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Address Resource Collection. */
@Fluent
public final class AddressResourceList {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(AddressResourceList.class);

    /*
     * List of address resources.
     */
    @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
    private List<AddressResourceInner> value;

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

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

    /**
     * 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 AddressResourceList object itself.
     */
    public AddressResourceList 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());
        }
    }
}
