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

package com.azure.resourcemanager.mobilenetwork.models;

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

/**
 * Range of port numbers to use as translated ports on each translated address. If not specified and NAPT is enabled,
 * this range defaults to 1,024 - 49,999. (Ports under 1,024 should not be used because these are special purpose ports
 * reserved by IANA. Ports 50,000 and above are reserved for non-NAPT use.).
 */
@Fluent
public final class PortRange {
    /*
     * The minimum port number
     */
    @JsonProperty(value = "minPort")
    private Integer minPort;

    /*
     * The maximum port number
     */
    @JsonProperty(value = "maxPort")
    private Integer maxPort;

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

    /**
     * Get the minPort property: The minimum port number.
     *
     * @return the minPort value.
     */
    public Integer minPort() {
        return this.minPort;
    }

    /**
     * Set the minPort property: The minimum port number.
     *
     * @param minPort the minPort value to set.
     * @return the PortRange object itself.
     */
    public PortRange withMinPort(Integer minPort) {
        this.minPort = minPort;
        return this;
    }

    /**
     * Get the maxPort property: The maximum port number.
     *
     * @return the maxPort value.
     */
    public Integer maxPort() {
        return this.maxPort;
    }

    /**
     * Set the maxPort property: The maximum port number.
     *
     * @param maxPort the maxPort value to set.
     * @return the PortRange object itself.
     */
    public PortRange withMaxPort(Integer maxPort) {
        this.maxPort = maxPort;
        return this;
    }

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