// 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.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;

/** Inbound connection from an ip that isn't allowed. Allow list consists of ipv4 or ipv6 range in CIDR notation. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleType")
@JsonTypeName("ConnectionFromIpNotAllowed")
@Fluent
public final class ConnectionFromIpNotAllowed extends AllowlistCustomAlertRule {
    /** Creates an instance of ConnectionFromIpNotAllowed class. */
    public ConnectionFromIpNotAllowed() {
    }

    /** {@inheritDoc} */
    @Override
    public ConnectionFromIpNotAllowed withAllowlistValues(List<String> allowlistValues) {
        super.withAllowlistValues(allowlistValues);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ConnectionFromIpNotAllowed 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();
    }
}
