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

/**
 * Effective Route
 *
 */
class EffectiveRoute {
  /**
   * Create a EffectiveRoute.
   * @property {string} [name] The name of the user defined route. This is
   * optional.
   * @property {boolean} [disableBgpRoutePropagation] If true, on-premises
   * routes are not propagated to the network interfaces in the subnet.
   * @property {string} [source] Who created the route. Possible values are:
   * 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values
   * include: 'Unknown', 'User', 'VirtualNetworkGateway', 'Default'
   * @property {string} [state] The value of effective route. Possible values
   * are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid'
   * @property {array} [addressPrefix] The address prefixes of the effective
   * routes in CIDR notation.
   * @property {array} [nextHopIpAddress] The IP address of the next hop of the
   * effective route.
   * @property {string} [nextHopType] The type of Azure hop the packet should
   * be sent to. Possible values include: 'VirtualNetworkGateway', 'VnetLocal',
   * 'Internet', 'VirtualAppliance', 'None'
   */
  constructor() {
  }

  /**
   * Defines the metadata of EffectiveRoute
   *
   * @returns {object} metadata of EffectiveRoute
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'EffectiveRoute',
      type: {
        name: 'Composite',
        className: 'EffectiveRoute',
        modelProperties: {
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          disableBgpRoutePropagation: {
            required: false,
            serializedName: 'disableBgpRoutePropagation',
            type: {
              name: 'Boolean'
            }
          },
          source: {
            required: false,
            serializedName: 'source',
            type: {
              name: 'String'
            }
          },
          state: {
            required: false,
            serializedName: 'state',
            type: {
              name: 'String'
            }
          },
          addressPrefix: {
            required: false,
            serializedName: 'addressPrefix',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          nextHopIpAddress: {
            required: false,
            serializedName: 'nextHopIpAddress',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          nextHopType: {
            required: false,
            serializedName: 'nextHopType',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = EffectiveRoute;
