// 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;

/**
 * The minimum time (in seconds) that will pass before a port that was used by a closed pinhole can be recycled for use
 * by another pinhole. All hold times must be minimum 1 second.
 */
@Fluent
public final class PortReuseHoldTimes {
    /*
     * Minimum time in seconds that will pass before a TCP port that was used by a closed pinhole can be reused.
     * Default for TCP is 2 minutes.
     */
    @JsonProperty(value = "tcp")
    private Integer tcp;

    /*
     * Minimum time in seconds that will pass before a UDP port that was used by a closed pinhole can be reused.
     * Default for UDP is 1 minute.
     */
    @JsonProperty(value = "udp")
    private Integer udp;

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

    /**
     * Get the tcp property: Minimum time in seconds that will pass before a TCP port that was used by a closed pinhole
     * can be reused. Default for TCP is 2 minutes.
     *
     * @return the tcp value.
     */
    public Integer tcp() {
        return this.tcp;
    }

    /**
     * Set the tcp property: Minimum time in seconds that will pass before a TCP port that was used by a closed pinhole
     * can be reused. Default for TCP is 2 minutes.
     *
     * @param tcp the tcp value to set.
     * @return the PortReuseHoldTimes object itself.
     */
    public PortReuseHoldTimes withTcp(Integer tcp) {
        this.tcp = tcp;
        return this;
    }

    /**
     * Get the udp property: Minimum time in seconds that will pass before a UDP port that was used by a closed pinhole
     * can be reused. Default for UDP is 1 minute.
     *
     * @return the udp value.
     */
    public Integer udp() {
        return this.udp;
    }

    /**
     * Set the udp property: Minimum time in seconds that will pass before a UDP port that was used by a closed pinhole
     * can be reused. Default for UDP is 1 minute.
     *
     * @param udp the udp value to set.
     * @return the PortReuseHoldTimes object itself.
     */
    public PortReuseHoldTimes withUdp(Integer udp) {
        this.udp = udp;
        return this;
    }

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