/*
 * 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.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

/**
 * @summary An inbound endpoint on a compute node.
  *
 */
class InboundEndpoint {
  /**
   * Create a InboundEndpoint.
   * @member {string} name The name of the endpoint.
   * @member {string} protocol The protocol of the endpoint. Possible values
   * include: 'tcp', 'udp'
   * @member {string} publicIPAddress The public IP address of the compute
   * node.
   * @member {string} publicFQDN The public fully qualified domain name for the
   * compute node.
   * @member {number} frontendPort The public port number of the endpoint.
   * @member {number} backendPort The backend port number of the endpoint.
   */
  constructor() {
  }

  /**
   * Defines the metadata of InboundEndpoint
   *
   * @returns {object} metadata of InboundEndpoint
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'InboundEndpoint',
      type: {
        name: 'Composite',
        className: 'InboundEndpoint',
        modelProperties: {
          name: {
            required: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          protocol: {
            required: true,
            serializedName: 'protocol',
            type: {
              name: 'Enum',
              allowedValues: [ 'tcp', 'udp' ]
            }
          },
          publicIPAddress: {
            required: true,
            serializedName: 'publicIPAddress',
            type: {
              name: 'String'
            }
          },
          publicFQDN: {
            required: true,
            serializedName: 'publicFQDN',
            type: {
              name: 'String'
            }
          },
          frontendPort: {
            required: true,
            serializedName: 'frontendPort',
            type: {
              name: 'Number'
            }
          },
          backendPort: {
            required: true,
            serializedName: 'backendPort',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = InboundEndpoint;
