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

/**
 * Virtual Network route contract used to pass routing information for a
 * Virtual Network.
 *
 * @extends models['ProxyOnlyResource']
 */
class VnetRoute extends models['ProxyOnlyResource'] {
  /**
   * Create a VnetRoute.
   * @member {string} [startAddress] The starting address for this route. This
   * may also include a CIDR notation, in which case the end address must not
   * be specified.
   * @member {string} [endAddress] The ending address for this route. If the
   * start address is specified in CIDR notation, this must be omitted.
   * @member {string} [routeType] The type of route this is:
   * DEFAULT - By default, every app has routes to the local address ranges
   * specified by RFC1918
   * INHERITED - Routes inherited from the real Virtual Network routes
   * STATIC - Static route set on the app only
   *
   * These values will be used for syncing an app's routes with those from a
   * Virtual Network. Possible values include: 'DEFAULT', 'INHERITED', 'STATIC'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of VnetRoute
   *
   * @returns {object} metadata of VnetRoute
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VnetRoute',
      type: {
        name: 'Composite',
        className: 'VnetRoute',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          kind: {
            required: false,
            serializedName: 'kind',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          startAddress: {
            required: false,
            serializedName: 'properties.startAddress',
            type: {
              name: 'String'
            }
          },
          endAddress: {
            required: false,
            serializedName: 'properties.endAddress',
            type: {
              name: 'String'
            }
          },
          routeType: {
            required: false,
            serializedName: 'properties.routeType',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = VnetRoute;
