/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 */

package com.microsoft.azure.batch.protocol.models;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * An inbound endpoint on a Compute Node.
 */
public class InboundEndpoint {
    /**
     * The name of the endpoint.
     */
    @JsonProperty(value = "name", required = true)
    private String name;

    /**
     * The protocol of the endpoint.
     * Possible values include: 'tcp', 'udp'.
     */
    @JsonProperty(value = "protocol", required = true)
    private InboundEndpointProtocol protocol;

    /**
     * The public IP address of the Compute Node.
     */
    @JsonProperty(value = "publicIPAddress", required = true)
    private String publicIPAddress;

    /**
     * The public fully qualified domain name for the Compute Node.
     */
    @JsonProperty(value = "publicFQDN", required = true)
    private String publicFQDN;

    /**
     * The public port number of the endpoint.
     */
    @JsonProperty(value = "frontendPort", required = true)
    private int frontendPort;

    /**
     * The backend port number of the endpoint.
     */
    @JsonProperty(value = "backendPort", required = true)
    private int backendPort;

    /**
     * Get the name value.
     *
     * @return the name value
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name value.
     *
     * @param name the name value to set
     * @return the InboundEndpoint object itself.
     */
    public InboundEndpoint withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get possible values include: 'tcp', 'udp'.
     *
     * @return the protocol value
     */
    public InboundEndpointProtocol protocol() {
        return this.protocol;
    }

    /**
     * Set possible values include: 'tcp', 'udp'.
     *
     * @param protocol the protocol value to set
     * @return the InboundEndpoint object itself.
     */
    public InboundEndpoint withProtocol(InboundEndpointProtocol protocol) {
        this.protocol = protocol;
        return this;
    }

    /**
     * Get the publicIPAddress value.
     *
     * @return the publicIPAddress value
     */
    public String publicIPAddress() {
        return this.publicIPAddress;
    }

    /**
     * Set the publicIPAddress value.
     *
     * @param publicIPAddress the publicIPAddress value to set
     * @return the InboundEndpoint object itself.
     */
    public InboundEndpoint withPublicIPAddress(String publicIPAddress) {
        this.publicIPAddress = publicIPAddress;
        return this;
    }

    /**
     * Get the publicFQDN value.
     *
     * @return the publicFQDN value
     */
    public String publicFQDN() {
        return this.publicFQDN;
    }

    /**
     * Set the publicFQDN value.
     *
     * @param publicFQDN the publicFQDN value to set
     * @return the InboundEndpoint object itself.
     */
    public InboundEndpoint withPublicFQDN(String publicFQDN) {
        this.publicFQDN = publicFQDN;
        return this;
    }

    /**
     * Get the frontendPort value.
     *
     * @return the frontendPort value
     */
    public int frontendPort() {
        return this.frontendPort;
    }

    /**
     * Set the frontendPort value.
     *
     * @param frontendPort the frontendPort value to set
     * @return the InboundEndpoint object itself.
     */
    public InboundEndpoint withFrontendPort(int frontendPort) {
        this.frontendPort = frontendPort;
        return this;
    }

    /**
     * Get the backendPort value.
     *
     * @return the backendPort value
     */
    public int backendPort() {
        return this.backendPort;
    }

    /**
     * Set the backendPort value.
     *
     * @param backendPort the backendPort value to set
     * @return the InboundEndpoint object itself.
     */
    public InboundEndpoint withBackendPort(int backendPort) {
        this.backendPort = backendPort;
        return this;
    }

}
