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

/**
 * Represents the filter actions which are allowed for the transformation of a
 * message that have been matched by a filter expression.
 *
 */
class Action {
  /**
   * Create a Action.
   * @property {string} [sqlExpression] SQL expression. e.g. MyProperty='ABC'
   * @property {number} [compatibilityLevel] This property is reserved for
   * future use. An integer value showing the compatibility level, currently
   * hard-coded to 20.
   * @property {boolean} [requiresPreprocessing] Value that indicates whether
   * the rule action requires preprocessing. Default value: true .
   */
  constructor() {
  }

  /**
   * Defines the metadata of Action
   *
   * @returns {object} metadata of Action
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Action',
      type: {
        name: 'Composite',
        className: 'Action',
        modelProperties: {
          sqlExpression: {
            required: false,
            serializedName: 'sqlExpression',
            type: {
              name: 'String'
            }
          },
          compatibilityLevel: {
            required: false,
            serializedName: 'compatibilityLevel',
            type: {
              name: 'Number'
            }
          },
          requiresPreprocessing: {
            required: false,
            serializedName: 'requiresPreprocessing',
            defaultValue: true,
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = Action;
