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

/**
 * @class
 * Initializes a new instance of the AutoHealActions class.
 * @constructor
 * Actions which to take by the auto-heal module when a rule is triggered.
 *
 * @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
 *
 */
class AutoHealActions {
  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;
