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

/**
 * Azure specific reprotect input.
 *
 * @extends models['ReverseReplicationProviderSpecificInput']
 */
class A2AReprotectInput extends models['ReverseReplicationProviderSpecificInput'] {
  /**
   * Create a A2AReprotectInput.
   * @member {string} [recoveryContainerId] The recovery container Id.
   * @member {array} [vmDisks] The list of vm disk details.
   * @member {string} [recoveryResourceGroupId] The recovery resource group Id.
   * Valid for V2 scenarios.
   * @member {string} [recoveryCloudServiceId] The recovery cloud service Id.
   * Valid for V1 scenarios.
   * @member {string} [recoveryAvailabilitySetId] The recovery availability
   * set.
   * @member {string} [policyId] The Policy Id.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of A2AReprotectInput
   *
   * @returns {object} metadata of A2AReprotectInput
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'A2A',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'instanceType',
          clientName: 'instanceType'
        },
        uberParent: 'ReverseReplicationProviderSpecificInput',
        className: 'A2AReprotectInput',
        modelProperties: {
          instanceType: {
            required: true,
            serializedName: 'instanceType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          recoveryContainerId: {
            required: false,
            serializedName: 'recoveryContainerId',
            type: {
              name: 'String'
            }
          },
          vmDisks: {
            required: false,
            serializedName: 'vmDisks',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'A2AVmDiskInputDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'A2AVmDiskInputDetails'
                  }
              }
            }
          },
          recoveryResourceGroupId: {
            required: false,
            serializedName: 'recoveryResourceGroupId',
            type: {
              name: 'String'
            }
          },
          recoveryCloudServiceId: {
            required: false,
            serializedName: 'recoveryCloudServiceId',
            type: {
              name: 'String'
            }
          },
          recoveryAvailabilitySetId: {
            required: false,
            serializedName: 'recoveryAvailabilitySetId',
            type: {
              name: 'String'
            }
          },
          policyId: {
            required: false,
            serializedName: 'policyId',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = A2AReprotectInput;
