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

package com.azure.resourcemanager.security.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** A List custom alert rule. */
@JsonTypeInfo(
    use = JsonTypeInfo.Id.NAME,
    include = JsonTypeInfo.As.PROPERTY,
    property = "ruleType",
    defaultImpl = ListCustomAlertRule.class)
@JsonTypeName("ListCustomAlertRule")
@JsonSubTypes({
    @JsonSubTypes.Type(name = "AllowlistCustomAlertRule", value = AllowlistCustomAlertRule.class),
    @JsonSubTypes.Type(name = "DenylistCustomAlertRule", value = DenylistCustomAlertRule.class)
})
@Fluent
public class ListCustomAlertRule extends CustomAlertRule {
    /*
     * The value type of the items in the list.
     */
    @JsonProperty(value = "valueType", access = JsonProperty.Access.WRITE_ONLY)
    private ValueType valueType;

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

    /**
     * Get the valueType property: The value type of the items in the list.
     *
     * @return the valueType value.
     */
    public ValueType valueType() {
        return this.valueType;
    }

    /** {@inheritDoc} */
    @Override
    public ListCustomAlertRule withIsEnabled(boolean isEnabled) {
        super.withIsEnabled(isEnabled);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
    }
}
