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

/**
 * Provider specific input for InMage failover.
 *
 * @extends models['ProviderSpecificFailoverInput']
 */
class InMageFailoverProviderInput extends models['ProviderSpecificFailoverInput'] {
  /**
   * Create a InMageFailoverProviderInput.
   * @member {string} [recoveryPointType] The recovery point type. Values from
   * LatestTime, LatestTag or Custom. In the case of custom, the recovery point
   * provided by RecoveryPointId will be used. In the other two cases, recovery
   * point id will be ignored. Possible values include: 'LatestTime',
   * 'LatestTag', 'Custom'
   * @member {string} [recoveryPointId] The recovery point id to be passed to
   * failover to a particular recovery point. In case of latest recovery point,
   * null should be passed.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of InMageFailoverProviderInput
   *
   * @returns {object} metadata of InMageFailoverProviderInput
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'InMage',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'instanceType',
          clientName: 'instanceType'
        },
        uberParent: 'ProviderSpecificFailoverInput',
        className: 'InMageFailoverProviderInput',
        modelProperties: {
          instanceType: {
            required: true,
            serializedName: 'instanceType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          recoveryPointType: {
            required: false,
            serializedName: 'recoveryPointType',
            type: {
              name: 'String'
            }
          },
          recoveryPointId: {
            required: false,
            serializedName: 'recoveryPointId',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = InMageFailoverProviderInput;
