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

/**
 * Actions which to take by the auto-heal module when a rule is triggered.
 *
 */
class AutoHealActions {
  /**
   * Create a AutoHealActions.
   * @member {string} [actionType] Predefined action to be taken. Possible
   * values include: 'Recycle', 'LogEvent', 'CustomAction'
   * @member {object} [customAction] Custom action to be taken.
   * @member {string} [customAction.exe] Executable to be run.
   * @member {string} [customAction.parameters] Parameters for the executable.
   * @member {string} [minProcessExecutionTime] Minimum time the process must
   * execute
   * before taking the action
   */
  constructor() {
  }

  /**
   * Defines the metadata of AutoHealActions
   *
   * @returns {object} metadata of AutoHealActions
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AutoHealActions',
      type: {
        name: 'Composite',
        className: 'AutoHealActions',
        modelProperties: {
          actionType: {
            required: false,
            serializedName: 'actionType',
            type: {
              name: 'Enum',
              allowedValues: [ 'Recycle', 'LogEvent', 'CustomAction' ]
            }
          },
          customAction: {
            required: false,
            serializedName: 'customAction',
            type: {
              name: 'Composite',
              className: 'AutoHealCustomAction'
            }
          },
          minProcessExecutionTime: {
            required: false,
            serializedName: 'minProcessExecutionTime',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = AutoHealActions;
