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

/**
 * HyperV replica 2012 replication details.
 *
 * @extends models['ReplicationProviderSpecificSettings']
 */
class HyperVReplicaReplicationDetails extends models['ReplicationProviderSpecificSettings'] {
  /**
   * Create a HyperVReplicaReplicationDetails.
   * @member {date} [lastReplicatedTime] The Last replication time.
   * @member {array} [vmNics] The PE Network details.
   * @member {string} [vmId] The virtual machine Id.
   * @member {string} [vmProtectionState] The protection state for the vm.
   * @member {string} [vmProtectionStateDescription] The protection state
   * description for the vm.
   * @member {object} [initialReplicationDetails] Initial replication details.
   * @member {string} [initialReplicationDetails.initialReplicationType]
   * Initial replication type.
   * @member {string}
   * [initialReplicationDetails.initialReplicationProgressPercentage] The
   * initial replication progress percentage.
   * @member {array} [vMDiskDetails] VM disk details.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of HyperVReplicaReplicationDetails
   *
   * @returns {object} metadata of HyperVReplicaReplicationDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'HyperVReplica2012',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'instanceType',
          clientName: 'instanceType'
        },
        uberParent: 'ReplicationProviderSpecificSettings',
        className: 'HyperVReplicaReplicationDetails',
        modelProperties: {
          instanceType: {
            required: true,
            serializedName: 'instanceType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          lastReplicatedTime: {
            required: false,
            serializedName: 'lastReplicatedTime',
            type: {
              name: 'DateTime'
            }
          },
          vmNics: {
            required: false,
            serializedName: 'vmNics',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'VMNicDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'VMNicDetails'
                  }
              }
            }
          },
          vmId: {
            required: false,
            serializedName: 'vmId',
            type: {
              name: 'String'
            }
          },
          vmProtectionState: {
            required: false,
            serializedName: 'vmProtectionState',
            type: {
              name: 'String'
            }
          },
          vmProtectionStateDescription: {
            required: false,
            serializedName: 'vmProtectionStateDescription',
            type: {
              name: 'String'
            }
          },
          initialReplicationDetails: {
            required: false,
            serializedName: 'initialReplicationDetails',
            type: {
              name: 'Composite',
              className: 'InitialReplicationDetails'
            }
          },
          vMDiskDetails: {
            required: false,
            serializedName: 'vMDiskDetails',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DiskDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'DiskDetails'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = HyperVReplicaReplicationDetails;
