// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // #nullable disable using Microsoft.SqlServer.Migration.Assessment.Common.Contracts.TargetAssessment.Models; namespace Microsoft.SqlTools.Migration.Contracts { public class ServerAssessmentProperties { /// /// Name of the server /// public string Name { get; set; } /// /// Cpu cores for the server host /// public long CpuCoreCount { get; set; } /// /// Server host physical memory size /// public double PhysicalServerMemory { get; set; } /// /// Host operating system of the SQL server /// public string ServerHostPlatform { get; set; } /// /// Version of the SQL server /// public string ServerVersion { get; set; } /// /// SQL server engine edition /// public string ServerEngineEdition { get; set; } /// /// SQL server edition /// public string ServerEdition { get; set; } /// /// We use this flag to indicate if the SQL server is part of the failover cluster /// public bool IsClustered { get; set; } /// /// Returns the total number of dbs assessed /// public long NumberOfUserDatabases { get; set; } /// /// Returns the assessment status /// public int SqlAssessmentStatus { get; set; } /// /// Count of Dbs assessed /// public long AssessedDatabaseCount{get; set;} /// /// Give assessed server stats for SQL MI compatibility /// public IServerTargetReadiness SQLManagedInstanceTargetReadiness { get; set; } /// /// Server assessment results /// public MigrationAssessmentInfo[] Items { get; set; } /// /// Server assessment errors /// public ErrorModel[] Errors { get; set; } /// /// List of databases that are assessed /// public DatabaseAssessmentProperties[] Databases { get; set; } } public class DatabaseAssessmentProperties { /// /// Name of the database /// public string Name { get; set; } /// /// Compatibility level of the database /// public string CompatibilityLevel { get; set; } /// /// Size of the database /// public double DatabaseSize { get; set; } /// /// Flag that indicates if the database is replicated /// public bool IsReplicationEnabled { get; set; } /// /// Time taken for assessing the database /// public double AssessmentTimeInMilliseconds { get; set; } /// /// Database Assessment Results /// public MigrationAssessmentInfo[] Items { get; set; } /// /// Database assessment errors /// public ErrorModel[] Errors {get; set;} /// /// Flags that indicate if the database is ready for migration /// public IDatabaseTargetReadiness SQLManagedInstanceTargetReadiness { get; set; } } public class ErrorModel { /// /// Id of the assessment error /// public string ErrorId { get; set; } /// /// Error message /// public string Message { get; set; } /// /// Summary of the Error /// public string ErrorSummary { get; set; } /// /// Possible causes for the error /// public string PossibleCauses { get; set; } /// /// Possible mitigation for the error /// public string Guidance { get; set; } } }