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

/**
 * Recovery plan script action details.
 *
 * @extends models['RecoveryPlanActionDetails']
 */
class RecoveryPlanScriptActionDetails extends models['RecoveryPlanActionDetails'] {
  /**
   * Create a RecoveryPlanScriptActionDetails.
   * @member {string} path The script path.
   * @member {string} [timeout] The script timeout.
   * @member {string} fabricLocation The fabric location. Possible values
   * include: 'Primary', 'Recovery'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of RecoveryPlanScriptActionDetails
   *
   * @returns {object} metadata of RecoveryPlanScriptActionDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ScriptActionDetails',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'instanceType',
          clientName: 'instanceType'
        },
        uberParent: 'RecoveryPlanActionDetails',
        className: 'RecoveryPlanScriptActionDetails',
        modelProperties: {
          instanceType: {
            required: true,
            serializedName: 'instanceType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          path: {
            required: true,
            serializedName: 'path',
            type: {
              name: 'String'
            }
          },
          timeout: {
            required: false,
            serializedName: 'timeout',
            type: {
              name: 'String'
            }
          },
          fabricLocation: {
            required: true,
            serializedName: 'fabricLocation',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = RecoveryPlanScriptActionDetails;
