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

/**
 * A2A provider specific settings.
 *
 * @extends models['ReplicationProviderSpecificSettings']
 */
class A2AReplicationDetails extends models['ReplicationProviderSpecificSettings'] {
  /**
   * Create a A2AReplicationDetails.
   * @member {string} [fabricObjectId] The fabric specific object Id of the
   * virtual machine.
   * @member {string} [multiVmGroupId] The multi vm group Id.
   * @member {string} [multiVmGroupName] The multi vm group name.
   * @member {string} [multiVmGroupCreateOption] Whether Multi VM group is auto
   * created or specified by user. Possible values include: 'AutoCreated',
   * 'UserSpecified'
   * @member {string} [managementId] The management Id.
   * @member {array} [protectedDisks] The list of protected disks.
   * @member {array} [protectedManagedDisks] The list of protected managed
   * disks.
   * @member {string} [recoveryBootDiagStorageAccountId] The recovery boot
   * diagnostic storage account Arm Id.
   * @member {string} [primaryFabricLocation] Primary fabric location.
   * @member {string} [recoveryFabricLocation] The recovery fabric location.
   * @member {string} [osType] The type of operating system.
   * @member {string} [recoveryAzureVMSize] The size of recovery virtual
   * machine.
   * @member {string} [recoveryAzureVMName] The name of recovery virtual
   * machine.
   * @member {string} [recoveryAzureResourceGroupId] The recovery resource
   * group.
   * @member {string} [recoveryCloudService] The recovery cloud service.
   * @member {string} [recoveryAvailabilitySet] The recovery availability set.
   * @member {string} [selectedRecoveryAzureNetworkId] The recovery virtual
   * network.
   * @member {array} [vmNics] The virtual machine nic details.
   * @member {object} [vmSyncedConfigDetails] The synced configuration details.
   * @member {object} [vmSyncedConfigDetails.tags] The Azure VM tags.
   * @member {array} [vmSyncedConfigDetails.roleAssignments] The Azure role
   * assignments.
   * @member {array} [vmSyncedConfigDetails.inputEndpoints] The Azure VM input
   * endpoints.
   * @member {number} [monitoringPercentageCompletion] The percentage of the
   * monitoring job. The type of the monitoring job is defined by
   * MonitoringJobType property.
   * @member {string} [monitoringJobType] The type of the monitoring job. The
   * progress is contained in MonitoringPercentageCompletion property.
   * @member {date} [lastHeartbeat] The last heartbeat received from the source
   * server.
   * @member {string} [agentVersion] The agent version.
   * @member {boolean} [isReplicationAgentUpdateRequired] A value indicating
   * whether replication agent update is required.
   * @member {string} [recoveryFabricObjectId] The recovery fabric object Id.
   * @member {string} [vmProtectionState] The protection state for the vm.
   * @member {string} [vmProtectionStateDescription] The protection state
   * description for the vm.
   * @member {string} [lifecycleId] An id associated with the PE that survives
   * actions like switch protection which change the backing PE/CPE objects
   * internally.The lifecycle id gets carried forward to have a link/continuity
   * in being able to have an Id that denotes the "same" protected item even
   * though other internal Ids/ARM Id might be changing.
   * @member {string} [testFailoverRecoveryFabricObjectId] The test failover
   * fabric object Id.
   * @member {number} [rpoInSeconds] The last RPO value in seconds.
   * @member {date} [lastRpoCalculatedTime] The time (in UTC) when the last RPO
   * value was calculated by Protection Service.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of A2AReplicationDetails
   *
   * @returns {object} metadata of A2AReplicationDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'A2A',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'instanceType',
          clientName: 'instanceType'
        },
        uberParent: 'ReplicationProviderSpecificSettings',
        className: 'A2AReplicationDetails',
        modelProperties: {
          instanceType: {
            required: true,
            serializedName: 'instanceType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          fabricObjectId: {
            required: false,
            serializedName: 'fabricObjectId',
            type: {
              name: 'String'
            }
          },
          multiVmGroupId: {
            required: false,
            serializedName: 'multiVmGroupId',
            type: {
              name: 'String'
            }
          },
          multiVmGroupName: {
            required: false,
            serializedName: 'multiVmGroupName',
            type: {
              name: 'String'
            }
          },
          multiVmGroupCreateOption: {
            required: false,
            serializedName: 'multiVmGroupCreateOption',
            type: {
              name: 'String'
            }
          },
          managementId: {
            required: false,
            serializedName: 'managementId',
            type: {
              name: 'String'
            }
          },
          protectedDisks: {
            required: false,
            serializedName: 'protectedDisks',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'A2AProtectedDiskDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'A2AProtectedDiskDetails'
                  }
              }
            }
          },
          protectedManagedDisks: {
            required: false,
            serializedName: 'protectedManagedDisks',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'A2AProtectedManagedDiskDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'A2AProtectedManagedDiskDetails'
                  }
              }
            }
          },
          recoveryBootDiagStorageAccountId: {
            required: false,
            serializedName: 'recoveryBootDiagStorageAccountId',
            type: {
              name: 'String'
            }
          },
          primaryFabricLocation: {
            required: false,
            serializedName: 'primaryFabricLocation',
            type: {
              name: 'String'
            }
          },
          recoveryFabricLocation: {
            required: false,
            serializedName: 'recoveryFabricLocation',
            type: {
              name: 'String'
            }
          },
          osType: {
            required: false,
            serializedName: 'osType',
            type: {
              name: 'String'
            }
          },
          recoveryAzureVMSize: {
            required: false,
            serializedName: 'recoveryAzureVMSize',
            type: {
              name: 'String'
            }
          },
          recoveryAzureVMName: {
            required: false,
            serializedName: 'recoveryAzureVMName',
            type: {
              name: 'String'
            }
          },
          recoveryAzureResourceGroupId: {
            required: false,
            serializedName: 'recoveryAzureResourceGroupId',
            type: {
              name: 'String'
            }
          },
          recoveryCloudService: {
            required: false,
            serializedName: 'recoveryCloudService',
            type: {
              name: 'String'
            }
          },
          recoveryAvailabilitySet: {
            required: false,
            serializedName: 'recoveryAvailabilitySet',
            type: {
              name: 'String'
            }
          },
          selectedRecoveryAzureNetworkId: {
            required: false,
            serializedName: 'selectedRecoveryAzureNetworkId',
            type: {
              name: 'String'
            }
          },
          vmNics: {
            required: false,
            serializedName: 'vmNics',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'VMNicDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'VMNicDetails'
                  }
              }
            }
          },
          vmSyncedConfigDetails: {
            required: false,
            serializedName: 'vmSyncedConfigDetails',
            type: {
              name: 'Composite',
              className: 'AzureToAzureVmSyncedConfigDetails'
            }
          },
          monitoringPercentageCompletion: {
            required: false,
            serializedName: 'monitoringPercentageCompletion',
            type: {
              name: 'Number'
            }
          },
          monitoringJobType: {
            required: false,
            serializedName: 'monitoringJobType',
            type: {
              name: 'String'
            }
          },
          lastHeartbeat: {
            required: false,
            serializedName: 'lastHeartbeat',
            type: {
              name: 'DateTime'
            }
          },
          agentVersion: {
            required: false,
            serializedName: 'agentVersion',
            type: {
              name: 'String'
            }
          },
          isReplicationAgentUpdateRequired: {
            required: false,
            serializedName: 'isReplicationAgentUpdateRequired',
            type: {
              name: 'Boolean'
            }
          },
          recoveryFabricObjectId: {
            required: false,
            serializedName: 'recoveryFabricObjectId',
            type: {
              name: 'String'
            }
          },
          vmProtectionState: {
            required: false,
            serializedName: 'vmProtectionState',
            type: {
              name: 'String'
            }
          },
          vmProtectionStateDescription: {
            required: false,
            serializedName: 'vmProtectionStateDescription',
            type: {
              name: 'String'
            }
          },
          lifecycleId: {
            required: false,
            serializedName: 'lifecycleId',
            type: {
              name: 'String'
            }
          },
          testFailoverRecoveryFabricObjectId: {
            required: false,
            serializedName: 'testFailoverRecoveryFabricObjectId',
            type: {
              name: 'String'
            }
          },
          rpoInSeconds: {
            required: false,
            serializedName: 'rpoInSeconds',
            type: {
              name: 'Number'
            }
          },
          lastRpoCalculatedTime: {
            required: false,
            serializedName: 'lastRpoCalculatedTime',
            type: {
              name: 'DateTime'
            }
          }
        }
      }
    };
  }
}

module.exports = A2AReplicationDetails;
