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

package com.azure.resourcemanager.elastic.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.elastic.models.ElasticTrafficFilter;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** List of elastic traffic filters in the account. */
@Fluent
public final class ElasticTrafficFilterResponseInner {
    /*
     * List of elastic traffic filters in the account
     */
    @JsonProperty(value = "rulesets")
    private List<ElasticTrafficFilter> rulesets;

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

    /**
     * Get the rulesets property: List of elastic traffic filters in the account.
     *
     * @return the rulesets value.
     */
    public List<ElasticTrafficFilter> rulesets() {
        return this.rulesets;
    }

    /**
     * Set the rulesets property: List of elastic traffic filters in the account.
     *
     * @param rulesets the rulesets value to set.
     * @return the ElasticTrafficFilterResponseInner object itself.
     */
    public ElasticTrafficFilterResponseInner withRulesets(List<ElasticTrafficFilter> rulesets) {
        this.rulesets = rulesets;
        return this;
    }

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