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

package com.azure.resourcemanager.devtestlabs.models;

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

/** Properties of a network port. */
@Fluent
public final class Port {
    /*
     * Protocol type of the port.
     */
    @JsonProperty(value = "transportProtocol")
    private TransportProtocol transportProtocol;

    /*
     * Backend port of the target virtual machine.
     */
    @JsonProperty(value = "backendPort")
    private Integer backendPort;

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

    /**
     * Get the transportProtocol property: Protocol type of the port.
     *
     * @return the transportProtocol value.
     */
    public TransportProtocol transportProtocol() {
        return this.transportProtocol;
    }

    /**
     * Set the transportProtocol property: Protocol type of the port.
     *
     * @param transportProtocol the transportProtocol value to set.
     * @return the Port object itself.
     */
    public Port withTransportProtocol(TransportProtocol transportProtocol) {
        this.transportProtocol = transportProtocol;
        return this;
    }

    /**
     * Get the backendPort property: Backend port of the target virtual machine.
     *
     * @return the backendPort value.
     */
    public Integer backendPort() {
        return this.backendPort;
    }

    /**
     * Set the backendPort property: Backend port of the target virtual machine.
     *
     * @param backendPort the backendPort value to set.
     * @return the Port object itself.
     */
    public Port withBackendPort(Integer backendPort) {
        this.backendPort = backendPort;
        return this;
    }

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