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

'use strict';

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

var util = require('util');

/**
 * @class
 * Initializes a new instance of the Route class.
 * @constructor
 * Route resource
 * @member {string} [addressPrefix] Gets or sets the destination CIDR to which
 * the route applies.
 * 
 * @member {string} nextHopType Gets or sets the type of Azure hop the packet
 * should be sent to. Possible values include: 'VirtualNetworkGateway',
 * 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'
 * 
 * @member {string} [nextHopIpAddress] Gets or sets the IP address packets
 * should be forwarded to. Next hop values are only allowed in routes where
 * the next hop type is VirtualAppliance.
 * 
 * @member {string} [provisioningState] Gets or sets Provisioning state of the
 * resource Updating/Deleting/Failed
 * 
 * @member {string} [name] Gets name of the resource that is unique within a
 * resource group. This name can be used to access the resource
 * 
 * @member {string} [etag] A unique read-only string that changes whenever the
 * resource is updated
 * 
 */
function Route() {
  Route['super_'].call(this);
}

util.inherits(Route, models['SubResource']);

/**
 * Defines the metadata of Route
 *
 * @returns {object} metadata of Route
 *
 */
Route.prototype.mapper = function () {
  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;
