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

/**
 * Hyper V Replica Azure provider specific settings.
 *
 * @extends models['ReplicationProviderSpecificSettings']
 */
class HyperVReplicaAzureReplicationDetails extends models['ReplicationProviderSpecificSettings'] {
  /**
   * Create a HyperVReplicaAzureReplicationDetails.
   * @member {array} [azureVmDiskDetails] Azure VM Disk details.
   * @member {string} [recoveryAzureVmName] Recovery Azure given name.
   * @member {string} [recoveryAzureVMSize] The Recovery Azure VM size.
   * @member {string} [recoveryAzureStorageAccount] The recovery Azure storage
   * account.
   * @member {string} [recoveryAzureLogStorageAccountId] The ARM id of the log
   * storage account used for replication. This will be set to null if no log
   * storage account was provided during enable protection.
   * @member {date} [lastReplicatedTime] The Last replication time.
   * @member {number} [rpoInSeconds] Last RPO value.
   * @member {date} [lastRpoCalculatedTime] The last RPO calculated time.
   * @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} [vmNics] The PE Network details.
   * @member {string} [selectedRecoveryAzureNetworkId] The selected recovery
   * azure network Id.
   * @member {string} [selectedSourceNicId] The selected source nic Id which
   * will be used as the primary nic during failover.
   * @member {string} [encryption] The encryption info.
   * @member {object} [oSDetails] The operating system info.
   * @member {string} [oSDetails.osType] VM Disk details.
   * @member {string} [oSDetails.productType] Product type.
   * @member {string} [oSDetails.osEdition] The OSEdition.
   * @member {string} [oSDetails.oSVersion] The OS Version.
   * @member {string} [oSDetails.oSMajorVersion] The OS Major Version.
   * @member {string} [oSDetails.oSMinorVersion] The OS Minor Version.
   * @member {number} [sourceVmRamSizeInMB] The RAM size of the VM on the
   * primary side.
   * @member {number} [sourceVmCpuCount] The CPU count of the VM on the primary
   * side.
   * @member {string} [enableRdpOnTargetOption] The selected option to enable
   * RDP\SSH on target vm after failover. String value of
   * {SrsDataContract.EnableRDPOnTargetOption} enum.
   * @member {string} [recoveryAzureResourceGroupId] The target resource group
   * Id.
   * @member {string} [recoveryAvailabilitySetId] The recovery availability set
   * Id.
   * @member {string} [useManagedDisks] A value indicating whether managed
   * disks should be used during failover.
   * @member {string} [licenseType] License Type of the VM to be used.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of HyperVReplicaAzureReplicationDetails
   *
   * @returns {object} metadata of HyperVReplicaAzureReplicationDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'HyperVReplicaAzure',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'instanceType',
          clientName: 'instanceType'
        },
        uberParent: 'ReplicationProviderSpecificSettings',
        className: 'HyperVReplicaAzureReplicationDetails',
        modelProperties: {
          instanceType: {
            required: true,
            serializedName: 'instanceType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          azureVmDiskDetails: {
            required: false,
            serializedName: 'azureVmDiskDetails',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'AzureVmDiskDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'AzureVmDiskDetails'
                  }
              }
            }
          },
          recoveryAzureVmName: {
            required: false,
            serializedName: 'recoveryAzureVmName',
            type: {
              name: 'String'
            }
          },
          recoveryAzureVMSize: {
            required: false,
            serializedName: 'recoveryAzureVMSize',
            type: {
              name: 'String'
            }
          },
          recoveryAzureStorageAccount: {
            required: false,
            serializedName: 'recoveryAzureStorageAccount',
            type: {
              name: 'String'
            }
          },
          recoveryAzureLogStorageAccountId: {
            required: false,
            serializedName: 'recoveryAzureLogStorageAccountId',
            type: {
              name: 'String'
            }
          },
          lastReplicatedTime: {
            required: false,
            serializedName: 'lastReplicatedTime',
            type: {
              name: 'DateTime'
            }
          },
          rpoInSeconds: {
            required: false,
            serializedName: 'rpoInSeconds',
            type: {
              name: 'Number'
            }
          },
          lastRpoCalculatedTime: {
            required: false,
            serializedName: 'lastRpoCalculatedTime',
            type: {
              name: 'DateTime'
            }
          },
          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'
            }
          },
          vmNics: {
            required: false,
            serializedName: 'vmNics',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'VMNicDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'VMNicDetails'
                  }
              }
            }
          },
          selectedRecoveryAzureNetworkId: {
            required: false,
            serializedName: 'selectedRecoveryAzureNetworkId',
            type: {
              name: 'String'
            }
          },
          selectedSourceNicId: {
            required: false,
            serializedName: 'selectedSourceNicId',
            type: {
              name: 'String'
            }
          },
          encryption: {
            required: false,
            serializedName: 'encryption',
            type: {
              name: 'String'
            }
          },
          oSDetails: {
            required: false,
            serializedName: 'oSDetails',
            type: {
              name: 'Composite',
              className: 'OSDetails'
            }
          },
          sourceVmRamSizeInMB: {
            required: false,
            serializedName: 'sourceVmRamSizeInMB',
            type: {
              name: 'Number'
            }
          },
          sourceVmCpuCount: {
            required: false,
            serializedName: 'sourceVmCpuCount',
            type: {
              name: 'Number'
            }
          },
          enableRdpOnTargetOption: {
            required: false,
            serializedName: 'enableRdpOnTargetOption',
            type: {
              name: 'String'
            }
          },
          recoveryAzureResourceGroupId: {
            required: false,
            serializedName: 'recoveryAzureResourceGroupId',
            type: {
              name: 'String'
            }
          },
          recoveryAvailabilitySetId: {
            required: false,
            serializedName: 'recoveryAvailabilitySetId',
            type: {
              name: 'String'
            }
          },
          useManagedDisks: {
            required: false,
            serializedName: 'useManagedDisks',
            type: {
              name: 'String'
            }
          },
          licenseType: {
            required: false,
            serializedName: 'licenseType',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = HyperVReplicaAzureReplicationDetails;
