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

package com.azure.resourcemanager.relay.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.relay.fluent.models.WcfRelayInner;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The response of the list WCF relay operation. */
@Fluent
public final class WcfRelaysListResult {
    /*
     * Result of the list WCF relay operation.
     */
    @JsonProperty(value = "value")
    private List<WcfRelayInner> value;

    /*
     * Link to the next set of results. Not empty if value contains incomplete
     * list of WCF relays.
     */
    @JsonProperty(value = "nextLink")
    private String nextLink;

    /**
     * Get the value property: Result of the list WCF relay operation.
     *
     * @return the value value.
     */
    public List<WcfRelayInner> value() {
        return this.value;
    }

    /**
     * Set the value property: Result of the list WCF relay operation.
     *
     * @param value the value value to set.
     * @return the WcfRelaysListResult object itself.
     */
    public WcfRelaysListResult withValue(List<WcfRelayInner> value) {
        this.value = value;
        return this;
    }

    /**
     * Get the nextLink property: Link to the next set of results. Not empty if value contains incomplete list of WCF
     * relays.
     *
     * @return the nextLink value.
     */
    public String nextLink() {
        return this.nextLink;
    }

    /**
     * Set the nextLink property: Link to the next set of results. Not empty if value contains incomplete list of WCF
     * relays.
     *
     * @param nextLink the nextLink value to set.
     * @return the WcfRelaysListResult object itself.
     */
    public WcfRelaysListResult 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());
        }
    }
}
