/*
 * 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 details.
 *
 * @extends models['Resource']
 */
class RecoveryPlan extends models['Resource'] {
  /**
   * Create a RecoveryPlan.
   * @member {object} [properties] The custom details.
   * @member {string} [properties.friendlyName] The friendly name.
   * @member {string} [properties.primaryFabricId] The primary fabric Id.
   * @member {string} [properties.primaryFabricFriendlyName] The primary fabric
   * friendly name.
   * @member {string} [properties.recoveryFabricId] The recovery fabric Id.
   * @member {string} [properties.recoveryFabricFriendlyName] The recovery
   * fabric friendly name.
   * @member {string} [properties.failoverDeploymentModel] The failover
   * deployment model.
   * @member {array} [properties.replicationProviders] The list of replication
   * providers.
   * @member {array} [properties.allowedOperations] The list of allowed
   * operations.
   * @member {date} [properties.lastPlannedFailoverTime] The start time of the
   * last planned failover.
   * @member {date} [properties.lastUnplannedFailoverTime] The start time of
   * the last unplanned failover.
   * @member {date} [properties.lastTestFailoverTime] The start time of the
   * last test failover.
   * @member {object} [properties.currentScenario] The current scenario
   * details.
   * @member {string} [properties.currentScenario.scenarioName] Scenario name.
   * @member {string} [properties.currentScenario.jobId] ARM Id of the job
   * being executed.
   * @member {date} [properties.currentScenario.startTime] Start time of the
   * workflow.
   * @member {string} [properties.currentScenarioStatus] The recovery plan
   * status.
   * @member {string} [properties.currentScenarioStatusDescription] The
   * recovery plan status description.
   * @member {array} [properties.groups] The recovery plan groups.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of RecoveryPlan
   *
   * @returns {object} metadata of RecoveryPlan
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RecoveryPlan',
      type: {
        name: 'Composite',
        className: 'RecoveryPlan',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          properties: {
            required: false,
            serializedName: 'properties',
            type: {
              name: 'Composite',
              className: 'RecoveryPlanProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = RecoveryPlan;
