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

/**
 * InMage provider specific settings
 *
 * @extends models['ReplicationProviderSpecificSettings']
 */
class InMageReplicationDetails extends models['ReplicationProviderSpecificSettings'] {
  /**
   * Create a InMageReplicationDetails.
   * @member {string} [activeSiteType] The active location of the VM. If the VM
   * is being protected from Azure, this field will take values from { Azure,
   * OnPrem }. If the VM is being protected between two data-centers, this
   * field will be OnPrem always.
   * @member {number} [sourceVmCpuCount] The CPU count of the VM on the primary
   * side.
   * @member {number} [sourceVmRamSizeInMB] The RAM size of the VM on the
   * primary side.
   * @member {object} [osDetails] The OS details.
   * @member {string} [osDetails.osVhdId] The id of the disk containing the OS.
   * @member {string} [osDetails.osType] The type of the OS on the VM.
   * @member {string} [osDetails.vhdName] The OS disk VHD name.
   * @member {string} [protectionStage] The protection stage.
   * @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} [resyncDetails] The resync details of the machine
   * @member {string} [resyncDetails.initialReplicationType] Initial
   * replication type.
   * @member {string} [resyncDetails.initialReplicationProgressPercentage] The
   * initial replication progress percentage.
   * @member {date} [retentionWindowStart] The retention window start time.
   * @member {date} [retentionWindowEnd] The retention window end time.
   * @member {number} [compressedDataRateInMB] The compressed data change rate
   * in MB.
   * @member {number} [uncompressedDataRateInMB] The uncompressed data change
   * rate in MB.
   * @member {number} [rpoInSeconds] The RPO in seconds.
   * @member {array} [protectedDisks] The list of protected disks.
   * @member {string} [ipAddress] The source IP address.
   * @member {date} [lastHeartbeat] The last heartbeat received from the source
   * server.
   * @member {string} [processServerId] The process server Id.
   * @member {string} [masterTargetId] The master target Id.
   * @member {object} [consistencyPoints] The collection of Consistency points.
   * @member {string} [diskResized] A value indicating whether any disk is
   * resized for this VM.
   * @member {string} [rebootAfterUpdateStatus] A value indicating whether the
   * source server requires a restart after update.
   * @member {string} [multiVmGroupId] The multi vm group Id, if any.
   * @member {string} [multiVmGroupName] The multi vm group name, if any.
   * @member {string} [multiVmSyncStatus] A value indicating whether the multi
   * vm sync is enabled or disabled.
   * @member {object} [agentDetails] The agent details.
   * @member {string} [agentDetails.agentVersion] The agent version.
   * @member {string} [agentDetails.agentUpdateStatus] A value indicating
   * whether installed agent needs to be updated.
   * @member {string} [agentDetails.postUpdateRebootStatus] A value indicating
   * whether reboot is required after update is applied.
   * @member {date} [agentDetails.agentExpiryDate] Agent expiry date.
   * @member {string} [vCenterInfrastructureId] The vCenter infrastructure Id.
   * @member {string} [infrastructureVmId] The infrastructure VM Id.
   * @member {array} [vmNics] The PE Network details.
   * @member {string} [discoveryType] A value indicating the discovery type of
   * the machine.
   * @member {string} [azureStorageAccountId] A value indicating the underlying
   * Azure storage account. If the VM is not running in Azure, this value shall
   * be set to null.
   * @member {array} [datastores] The datastores of the on-premise machine
   * Value can be list of strings that contain datastore names
   * @member {array} [validationErrors] The validation errors of the on-premise
   * machine Value can be list of validation errors
   * @member {date} [lastRpoCalculatedTime] The last RPO calculated time.
   * @member {date} [lastUpdateReceivedTime] The last update time received from
   * on-prem components.
   * @member {string} [replicaId] The replica id of the protected item.
   * @member {string} [osVersion] The OS Version of the protected item.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of InMageReplicationDetails
   *
   * @returns {object} metadata of InMageReplicationDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'InMage',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'instanceType',
          clientName: 'instanceType'
        },
        uberParent: 'ReplicationProviderSpecificSettings',
        className: 'InMageReplicationDetails',
        modelProperties: {
          instanceType: {
            required: true,
            serializedName: 'instanceType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          activeSiteType: {
            required: false,
            serializedName: 'activeSiteType',
            type: {
              name: 'String'
            }
          },
          sourceVmCpuCount: {
            required: false,
            serializedName: 'sourceVmCpuCount',
            type: {
              name: 'Number'
            }
          },
          sourceVmRamSizeInMB: {
            required: false,
            serializedName: 'sourceVmRamSizeInMB',
            type: {
              name: 'Number'
            }
          },
          osDetails: {
            required: false,
            serializedName: 'osDetails',
            type: {
              name: 'Composite',
              className: 'OSDiskDetails'
            }
          },
          protectionStage: {
            required: false,
            serializedName: 'protectionStage',
            type: {
              name: 'String'
            }
          },
          vmId: {
            required: false,
            serializedName: 'vmId',
            type: {
              name: 'String'
            }
          },
          vmProtectionState: {
            required: false,
            serializedName: 'vmProtectionState',
            type: {
              name: 'String'
            }
          },
          vmProtectionStateDescription: {
            required: false,
            serializedName: 'vmProtectionStateDescription',
            type: {
              name: 'String'
            }
          },
          resyncDetails: {
            required: false,
            serializedName: 'resyncDetails',
            type: {
              name: 'Composite',
              className: 'InitialReplicationDetails'
            }
          },
          retentionWindowStart: {
            required: false,
            serializedName: 'retentionWindowStart',
            type: {
              name: 'DateTime'
            }
          },
          retentionWindowEnd: {
            required: false,
            serializedName: 'retentionWindowEnd',
            type: {
              name: 'DateTime'
            }
          },
          compressedDataRateInMB: {
            required: false,
            serializedName: 'compressedDataRateInMB',
            type: {
              name: 'Number'
            }
          },
          uncompressedDataRateInMB: {
            required: false,
            serializedName: 'uncompressedDataRateInMB',
            type: {
              name: 'Number'
            }
          },
          rpoInSeconds: {
            required: false,
            serializedName: 'rpoInSeconds',
            type: {
              name: 'Number'
            }
          },
          protectedDisks: {
            required: false,
            serializedName: 'protectedDisks',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'InMageProtectedDiskDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'InMageProtectedDiskDetails'
                  }
              }
            }
          },
          ipAddress: {
            required: false,
            serializedName: 'ipAddress',
            type: {
              name: 'String'
            }
          },
          lastHeartbeat: {
            required: false,
            serializedName: 'lastHeartbeat',
            type: {
              name: 'DateTime'
            }
          },
          processServerId: {
            required: false,
            serializedName: 'processServerId',
            type: {
              name: 'String'
            }
          },
          masterTargetId: {
            required: false,
            serializedName: 'masterTargetId',
            type: {
              name: 'String'
            }
          },
          consistencyPoints: {
            required: false,
            serializedName: 'consistencyPoints',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'DateElementType',
                  type: {
                    name: 'DateTime'
                  }
              }
            }
          },
          diskResized: {
            required: false,
            serializedName: 'diskResized',
            type: {
              name: 'String'
            }
          },
          rebootAfterUpdateStatus: {
            required: false,
            serializedName: 'rebootAfterUpdateStatus',
            type: {
              name: 'String'
            }
          },
          multiVmGroupId: {
            required: false,
            serializedName: 'multiVmGroupId',
            type: {
              name: 'String'
            }
          },
          multiVmGroupName: {
            required: false,
            serializedName: 'multiVmGroupName',
            type: {
              name: 'String'
            }
          },
          multiVmSyncStatus: {
            required: false,
            serializedName: 'multiVmSyncStatus',
            type: {
              name: 'String'
            }
          },
          agentDetails: {
            required: false,
            serializedName: 'agentDetails',
            type: {
              name: 'Composite',
              className: 'InMageAgentDetails'
            }
          },
          vCenterInfrastructureId: {
            required: false,
            serializedName: 'vCenterInfrastructureId',
            type: {
              name: 'String'
            }
          },
          infrastructureVmId: {
            required: false,
            serializedName: 'infrastructureVmId',
            type: {
              name: 'String'
            }
          },
          vmNics: {
            required: false,
            serializedName: 'vmNics',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'VMNicDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'VMNicDetails'
                  }
              }
            }
          },
          discoveryType: {
            required: false,
            serializedName: 'discoveryType',
            type: {
              name: 'String'
            }
          },
          azureStorageAccountId: {
            required: false,
            serializedName: 'azureStorageAccountId',
            type: {
              name: 'String'
            }
          },
          datastores: {
            required: false,
            serializedName: 'datastores',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          validationErrors: {
            required: false,
            serializedName: 'validationErrors',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'HealthErrorElementType',
                  type: {
                    name: 'Composite',
                    className: 'HealthError'
                  }
              }
            }
          },
          lastRpoCalculatedTime: {
            required: false,
            serializedName: 'lastRpoCalculatedTime',
            type: {
              name: 'DateTime'
            }
          },
          lastUpdateReceivedTime: {
            required: false,
            serializedName: 'lastUpdateReceivedTime',
            type: {
              name: 'DateTime'
            }
          },
          replicaId: {
            required: false,
            serializedName: 'replicaId',
            type: {
              name: 'String'
            }
          },
          osVersion: {
            required: false,
            serializedName: 'osVersion',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = InMageReplicationDetails;
