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

package com.azure.resourcemanager.iotcentral.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** An object for an IP range that will be allowed access. */
@Fluent
public final class NetworkRuleSetIpRule {
    /*
     * The readable name of the IP rule.
     */
    @JsonProperty(value = "filterName")
    private String filterName;

    /*
     * The CIDR block defining the IP range.
     */
    @JsonProperty(value = "ipMask")
    private String ipMask;

    /**
     * Get the filterName property: The readable name of the IP rule.
     *
     * @return the filterName value.
     */
    public String filterName() {
        return this.filterName;
    }

    /**
     * Set the filterName property: The readable name of the IP rule.
     *
     * @param filterName the filterName value to set.
     * @return the NetworkRuleSetIpRule object itself.
     */
    public NetworkRuleSetIpRule withFilterName(String filterName) {
        this.filterName = filterName;
        return this;
    }

    /**
     * Get the ipMask property: The CIDR block defining the IP range.
     *
     * @return the ipMask value.
     */
    public String ipMask() {
        return this.ipMask;
    }

    /**
     * Set the ipMask property: The CIDR block defining the IP range.
     *
     * @param ipMask the ipMask value to set.
     * @return the NetworkRuleSetIpRule object itself.
     */
    public NetworkRuleSetIpRule withIpMask(String ipMask) {
        this.ipMask = ipMask;
        return this;
    }

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