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

package com.azure.resourcemanager.webpubsub.models;

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

/** Network ACL. */
@Fluent
public class NetworkAcl {
    /*
     * Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
     */
    @JsonProperty(value = "allow")
    private List<WebPubSubRequestType> allow;

    /*
     * Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
     */
    @JsonProperty(value = "deny")
    private List<WebPubSubRequestType> deny;

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

    /**
     * Get the allow property: Allowed request types. The value can be one or more of: ClientConnection,
     * ServerConnection, RESTAPI.
     *
     * @return the allow value.
     */
    public List<WebPubSubRequestType> allow() {
        return this.allow;
    }

    /**
     * Set the allow property: Allowed request types. The value can be one or more of: ClientConnection,
     * ServerConnection, RESTAPI.
     *
     * @param allow the allow value to set.
     * @return the NetworkAcl object itself.
     */
    public NetworkAcl withAllow(List<WebPubSubRequestType> allow) {
        this.allow = allow;
        return this;
    }

    /**
     * Get the deny property: Denied request types. The value can be one or more of: ClientConnection, ServerConnection,
     * RESTAPI.
     *
     * @return the deny value.
     */
    public List<WebPubSubRequestType> deny() {
        return this.deny;
    }

    /**
     * Set the deny property: Denied request types. The value can be one or more of: ClientConnection, ServerConnection,
     * RESTAPI.
     *
     * @param deny the deny value to set.
     * @return the NetworkAcl object itself.
     */
    public NetworkAcl withDeny(List<WebPubSubRequestType> deny) {
        this.deny = deny;
        return this;
    }

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