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

/**
 * Routes that matched
 *
 */
class MatchedRoute {
  /**
   * Create a MatchedRoute.
   * @member {object} [properties] Properties of routes that matched
   * @member {string} [properties.name] The name of the route. The name can
   * only include alphanumeric characters, periods, underscores, hyphens, has a
   * maximum length of 64 characters, and must be unique.
   * @member {string} [properties.source] The source that the routing rule is
   * to be applied to, such as DeviceMessages. Possible values include:
   * 'Invalid', 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents',
   * 'DeviceJobLifecycleEvents'
   * @member {string} [properties.condition] The condition that is evaluated to
   * apply the routing rule. If no condition is provided, it evaluates to true
   * by default. For grammar, see:
   * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language
   * @member {array} [properties.endpointNames] The list of endpoints to which
   * messages that satisfy the condition are routed. Currently only one
   * endpoint is allowed.
   * @member {boolean} [properties.isEnabled] Used to specify whether a route
   * is enabled.
   */
  constructor() {
  }

  /**
   * Defines the metadata of MatchedRoute
   *
   * @returns {object} metadata of MatchedRoute
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'MatchedRoute',
      type: {
        name: 'Composite',
        className: 'MatchedRoute',
        modelProperties: {
          properties: {
            required: false,
            serializedName: 'properties',
            type: {
              name: 'Composite',
              className: 'RouteProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = MatchedRoute;
