/// <summary> /// Returns the PS backup management type given the service client defined backup management type. /// </summary> /// <param name="backupManagementType">Service client backup management type</param> /// <returns>PowerShell backup management type</returns> public static BackupManagementType GetPsBackupManagementType(string backupManagementType) { ServiceClientModel.BackupManagementType providerType = EnumUtils.GetEnum <ServiceClientModel.BackupManagementType>(backupManagementType); switch (providerType) { case ServiceClientModel.BackupManagementType.AzureIaasVM: return(BackupManagementType.AzureVM); case ServiceClientModel.BackupManagementType.MAB: return(BackupManagementType.MARS); case ServiceClientModel.BackupManagementType.DPM: return(BackupManagementType.SCDPM); case ServiceClientModel.BackupManagementType.AzureBackupServer: return(BackupManagementType.AzureBackupServer); case ServiceClientModel.BackupManagementType.AzureSql: return(BackupManagementType.AzureSQL); default: throw new Exception("Unsupported BackupManagmentType: " + backupManagementType); } }
/// <summary> /// Returns the PS backup management type given the service client defined backup management type. /// </summary> /// <param name="backupManagementType">Service client backup management type</param> /// <returns>PowerShell backup management type</returns> public static BackupManagementType GetPsBackupManagementType(string backupManagementType) { Microsoft.Azure.Management.RecoveryServices.Backup.Models.BackupManagementType providerType = EnumUtils.GetEnum <Microsoft.Azure.Management.RecoveryServices.Backup.Models.BackupManagementType>(backupManagementType); switch (providerType) { case Microsoft.Azure.Management.RecoveryServices.Backup.Models.BackupManagementType.AzureIaasVM: return(BackupManagementType.AzureVM); case Microsoft.Azure.Management.RecoveryServices.Backup.Models.BackupManagementType.MAB: return(BackupManagementType.MARS); case Microsoft.Azure.Management.RecoveryServices.Backup.Models.BackupManagementType.DPM: return(BackupManagementType.SCDPM); case Microsoft.Azure.Management.RecoveryServices.Backup.Models.BackupManagementType.AzureBackupServer: return(BackupManagementType.AzureBackupServer); default: throw new Exception("Unsupported BackupManagmentType: " + backupManagementType); } }