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

const models = require('./index');

/**
 * Route resource
 *
 * @extends models['SubResource']
 */
class Route extends models['SubResource'] {
  /**
   * Create a Route.
   * @property {string} [addressPrefix] The destination CIDR to which the route
   * applies.
   * @property {string} nextHopType The type of Azure hop the packet should be
   * sent to. Possible values include: 'VirtualNetworkGateway', 'VnetLocal',
   * 'Internet', 'VirtualAppliance', 'None'
   * @property {string} [nextHopIpAddress] The IP address packets should be
   * forwarded to. Next hop values are only allowed in routes where the next
   * hop type is VirtualAppliance.
   * @property {string} [provisioningState] The provisioning state of the
   * resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
   * @property {string} [name] The name of the resource that is unique within a
   * resource group. This name can be used to access the resource.
   * @property {string} [etag] A unique read-only string that changes whenever
   * the resource is updated.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Route
   *
   * @returns {object} metadata of Route
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Route',
      type: {
        name: 'Composite',
        className: 'Route',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          addressPrefix: {
            required: false,
            serializedName: 'properties.addressPrefix',
            type: {
              name: 'String'
            }
          },
          nextHopType: {
            required: true,
            serializedName: 'properties.nextHopType',
            type: {
              name: 'String'
            }
          },
          nextHopIpAddress: {
            required: false,
            serializedName: 'properties.nextHopIpAddress',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = Route;
