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

package com.azure.resourcemanager.securityinsights.models;

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

/** Represents severity configuration for a source subtype consumed in Fusion detection. */
@Fluent
public final class FusionSubTypeSeverityFilter {
    /*
     * Determines whether this source subtype supports severity configuration or not.
     */
    @JsonProperty(value = "isSupported", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean isSupported;

    /*
     * Individual Severity configuration settings for a given source subtype consumed in Fusion detection.
     */
    @JsonProperty(value = "filters")
    private List<FusionSubTypeSeverityFiltersItem> filters;

    /**
     * Get the isSupported property: Determines whether this source subtype supports severity configuration or not.
     *
     * @return the isSupported value.
     */
    public Boolean isSupported() {
        return this.isSupported;
    }

    /**
     * Get the filters property: Individual Severity configuration settings for a given source subtype consumed in
     * Fusion detection.
     *
     * @return the filters value.
     */
    public List<FusionSubTypeSeverityFiltersItem> filters() {
        return this.filters;
    }

    /**
     * Set the filters property: Individual Severity configuration settings for a given source subtype consumed in
     * Fusion detection.
     *
     * @param filters the filters value to set.
     * @return the FusionSubTypeSeverityFilter object itself.
     */
    public FusionSubTypeSeverityFilter withFilters(List<FusionSubTypeSeverityFiltersItem> filters) {
        this.filters = filters;
        return this;
    }

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