mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 12:42:38 +00:00
fix compiler nullable warnings
This commit is contained in:
@@ -1 +1 @@
|
||||
646
|
||||
648
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// </summary>
|
||||
public class CreateBootstrapSessionRequest
|
||||
{
|
||||
public string TenantId { get; set; }
|
||||
public string TenantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// How long the bootstrap URL should be valid (1–168 hours, default 8)
|
||||
@@ -18,7 +18,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Optional human-readable label (e.g. "Lab A", "Floor 3")
|
||||
/// </summary>
|
||||
public string Label { get; set; }
|
||||
public string Label { get; set; } = default!;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -27,10 +27,10 @@ namespace AutopilotMonitor.Shared.Models
|
||||
public class CreateBootstrapSessionResponse
|
||||
{
|
||||
public bool Success { get; set; }
|
||||
public string ShortCode { get; set; }
|
||||
public string BootstrapUrl { get; set; }
|
||||
public string ShortCode { get; set; } = default!;
|
||||
public string BootstrapUrl { get; set; } = default!;
|
||||
public DateTime ExpiresAt { get; set; }
|
||||
public string Message { get; set; }
|
||||
public string Message { get; set; } = default!;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -38,11 +38,11 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// </summary>
|
||||
public class BootstrapSessionListItem
|
||||
{
|
||||
public string ShortCode { get; set; }
|
||||
public string Label { get; set; }
|
||||
public string ShortCode { get; set; } = default!;
|
||||
public string Label { get; set; } = default!;
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime ExpiresAt { get; set; }
|
||||
public string CreatedByUpn { get; set; }
|
||||
public string CreatedByUpn { get; set; } = default!;
|
||||
public bool IsRevoked { get; set; }
|
||||
public bool IsExpired { get; set; }
|
||||
public int UsageCount { get; set; }
|
||||
@@ -63,10 +63,10 @@ namespace AutopilotMonitor.Shared.Models
|
||||
public class ValidateBootstrapCodeResponse
|
||||
{
|
||||
public bool Success { get; set; }
|
||||
public string TenantId { get; set; }
|
||||
public string Token { get; set; }
|
||||
public string AgentDownloadUrl { get; set; }
|
||||
public string TenantId { get; set; } = default!;
|
||||
public string Token { get; set; } = default!;
|
||||
public string AgentDownloadUrl { get; set; } = default!;
|
||||
public DateTime ExpiresAt { get; set; }
|
||||
public string Message { get; set; }
|
||||
public string Message { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Updated by (Global Admin user email)
|
||||
/// </summary>
|
||||
public string UpdatedBy { get; set; }
|
||||
public string UpdatedBy { get; set; } = default!;
|
||||
|
||||
// ===== RATE LIMITING SETTINGS =====
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// to include in the diagnostics ZIP package for all tenants.
|
||||
/// Each entry: { "path": "...", "description": "...", "isBuiltIn": true }
|
||||
/// </summary>
|
||||
public string DiagnosticsGlobalLogPathsJson { get; set; }
|
||||
public string DiagnosticsGlobalLogPathsJson { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the deserialized list of global diagnostics log paths.
|
||||
@@ -130,7 +130,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Free registration at https://nvd.nist.gov/developers/request-an-api-key
|
||||
/// null = operate without API key (slower, still functional).
|
||||
/// </summary>
|
||||
public string NvdApiKey { get; set; }
|
||||
public string NvdApiKey { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Whether vulnerability correlation is globally enabled.
|
||||
@@ -143,7 +143,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Last successful vulnerability data sync timestamp (UTC ISO 8601).
|
||||
/// Updated by VulnerabilityDataSyncFunction.
|
||||
/// </summary>
|
||||
public string VulnerabilityDataLastSyncUtc { get; set; }
|
||||
public string VulnerabilityDataLastSyncUtc { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Creates default configuration
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// </summary>
|
||||
public bool EnableImeMatchLog { get; set; } = false;
|
||||
|
||||
public CollectorConfiguration Collectors { get; set; }
|
||||
public CollectorConfiguration Collectors { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// User-defined ad-hoc gather rules (minimal set, not for IME log parsing)
|
||||
@@ -104,7 +104,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Expected size: 540 x 80 px. Larger images will be center-cropped.
|
||||
/// null = no banner.
|
||||
/// </summary>
|
||||
public string EnrollmentSummaryBrandingImageUrl { get; set; }
|
||||
public string EnrollmentSummaryBrandingImageUrl { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum time in seconds the agent retries launching the enrollment summary dialog
|
||||
|
||||
@@ -15,13 +15,13 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Tenant ID (PartitionKey in Table Storage)
|
||||
/// </summary>
|
||||
public string TenantId { get; set; }
|
||||
public string TenantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Domain name extracted from the first user's UPN
|
||||
/// Used for display purposes (e.g., contoso.com)
|
||||
/// </summary>
|
||||
public string DomainName { get; set; }
|
||||
public string DomainName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// When the configuration was last updated
|
||||
@@ -31,7 +31,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Updated by (user email or system)
|
||||
/// </summary>
|
||||
public string UpdatedBy { get; set; }
|
||||
public string UpdatedBy { get; set; } = default!;
|
||||
|
||||
// ===== TENANT STATUS =====
|
||||
|
||||
@@ -215,7 +215,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// NTP server address for time check during enrollment.
|
||||
/// null = use agent default ("time.windows.com").
|
||||
/// </summary>
|
||||
public string NtpServer { get; set; }
|
||||
public string NtpServer { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to automatically set the device timezone based on IP geolocation.
|
||||
@@ -235,7 +235,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Log verbosity level override for this tenant's agents.
|
||||
/// null = use agent default ("Info"). Values: "Info", "Debug", "Verbose", "Trace".
|
||||
/// </summary>
|
||||
public string LogLevel { get; set; }
|
||||
public string LogLevel { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum events per upload batch.
|
||||
@@ -260,7 +260,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Optional URL to a branding image displayed as a banner at the top of the enrollment summary dialog.
|
||||
/// Expected size: 540 x 80 px. Larger images will be center-cropped.
|
||||
/// </summary>
|
||||
public string EnrollmentSummaryBrandingImageUrl { get; set; }
|
||||
public string EnrollmentSummaryBrandingImageUrl { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum time in seconds the agent retries launching the enrollment summary dialog
|
||||
@@ -296,7 +296,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// on a newly enrolled device (merged with built-in defaults on the agent).
|
||||
/// Example: ["SupportAdmin", "TechDesk"]
|
||||
/// </summary>
|
||||
public string LocalAdminAllowedAccountsJson { get; set; }
|
||||
public string LocalAdminAllowedAccountsJson { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the deserialized list of additional allowed local admin account names.
|
||||
@@ -351,7 +351,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// to include in the diagnostics ZIP package (additive to global paths).
|
||||
/// Each entry: { "path": "...", "description": "...", "isBuiltIn": false }
|
||||
/// </summary>
|
||||
public string DiagnosticsLogPathsJson { get; set; }
|
||||
public string DiagnosticsLogPathsJson { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the deserialized list of tenant-specific diagnostics log paths.
|
||||
@@ -379,7 +379,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Each tenant provides their own container — data stays in the customer's storage.
|
||||
/// If null or empty, diagnostics upload is disabled.
|
||||
/// </summary>
|
||||
public string DiagnosticsBlobSasUrl { get; set; }
|
||||
public string DiagnosticsBlobSasUrl { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// When to upload diagnostics packages: "Off", "Always", "OnFailure".
|
||||
@@ -402,7 +402,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// URL of the Teams Incoming Webhook for enrollment notifications.
|
||||
/// If null or empty, no notifications are sent.
|
||||
/// </summary>
|
||||
public string TeamsWebhookUrl { get; set; }
|
||||
public string TeamsWebhookUrl { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Send a Teams notification when an enrollment completes successfully.
|
||||
@@ -429,7 +429,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Generic webhook URL for enrollment notifications.
|
||||
/// Replaces TeamsWebhookUrl for new configurations.
|
||||
/// </summary>
|
||||
public string WebhookUrl { get; set; }
|
||||
public string WebhookUrl { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Send a webhook notification when enrollment succeeds. Default: true.
|
||||
@@ -447,7 +447,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Returns the effective webhook URL and provider type, handling legacy TeamsWebhookUrl migration.
|
||||
/// New fields take priority; falls back to TeamsWebhookUrl as TeamsLegacyConnector.
|
||||
/// </summary>
|
||||
public (string Url, int ProviderType) GetEffectiveWebhookConfig()
|
||||
public (string? Url, int ProviderType) GetEffectiveWebhookConfig()
|
||||
{
|
||||
// New fields take priority
|
||||
if (!string.IsNullOrEmpty(WebhookUrl) && WebhookProviderType != 0)
|
||||
|
||||
@@ -35,12 +35,12 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// The agent's current session ID (from SessionPersistence).
|
||||
/// Allows correlation with session data already in the backend.
|
||||
/// </summary>
|
||||
public string SessionId { get; set; }
|
||||
public string SessionId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Tenant ID, from the device's MDM enrollment registry key.
|
||||
/// </summary>
|
||||
public string TenantId { get; set; }
|
||||
public string TenantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Classification of the error.
|
||||
@@ -51,7 +51,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Error message from the exception or HTTP response.
|
||||
/// Kept short — no stack traces, no sensitive data.
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
public string Message { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// HTTP status code returned by the backend, if applicable.
|
||||
@@ -68,7 +68,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Agent version string for diagnosing version-specific issues.
|
||||
/// </summary>
|
||||
public string AgentVersion { get; set; }
|
||||
public string AgentVersion { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// UTC timestamp of when the error occurred on the agent.
|
||||
|
||||
@@ -11,12 +11,12 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Environment variables are expanded by the agent.
|
||||
/// Wildcards are only allowed in the last path segment (e.g. "C:\Windows\Panther\*.log").
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
public string Path { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Human-readable description shown in the portal.
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
public string Description { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// True when defined globally by a Global Admin — displayed as read-only for tenants.
|
||||
|
||||
@@ -12,19 +12,19 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Tenant ID (Azure AD tenant GUID). Used as PartitionKey for the main entity.
|
||||
/// </summary>
|
||||
public string TenantId { get; set; }
|
||||
public string TenantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Short alphanumeric code (6 chars) used in the URL path.
|
||||
/// Used as RowKey for the main entity.
|
||||
/// </summary>
|
||||
public string ShortCode { get; set; }
|
||||
public string ShortCode { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// GUID token embedded in the generated bootstrap script.
|
||||
/// The agent sends this as X-Bootstrap-Token header for pre-MDM authentication.
|
||||
/// </summary>
|
||||
public string Token { get; set; }
|
||||
public string Token { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// When this session was created
|
||||
@@ -40,7 +40,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// UPN of the admin who created this session
|
||||
/// </summary>
|
||||
public string CreatedByUpn { get; set; }
|
||||
public string CreatedByUpn { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this session has been manually revoked by an admin
|
||||
@@ -55,6 +55,6 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Optional human-readable label (e.g. "Lab A", "Floor 3")
|
||||
/// </summary>
|
||||
public string Label { get; set; }
|
||||
public string Label { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Type of event (e.g., "phase_transition", "app_install_start", "error")
|
||||
/// </summary>
|
||||
public string EventType { get; set; }
|
||||
public string EventType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Severity level of the event (internal property, not serialized)
|
||||
@@ -58,7 +58,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Source of the event (e.g., "IME", "EventLog", "Agent")
|
||||
/// </summary>
|
||||
public string Source { get; set; }
|
||||
public string Source { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Phase during which this event occurred (internal property, not serialized)
|
||||
@@ -107,7 +107,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Human-readable message
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
public string Message { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Additional structured data
|
||||
@@ -124,7 +124,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Represents the exact sort key used in storage.
|
||||
/// </summary>
|
||||
[JsonPropertyName("rowKey")]
|
||||
public string RowKey { get; set; }
|
||||
public string RowKey { get; set; } = default!;
|
||||
|
||||
public EnrollmentEvent()
|
||||
{
|
||||
|
||||
@@ -15,52 +15,52 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Tenant identifier
|
||||
/// </summary>
|
||||
public string TenantId { get; set; }
|
||||
public string TenantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Device serial number
|
||||
/// </summary>
|
||||
public string SerialNumber { get; set; }
|
||||
public string SerialNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Device manufacturer
|
||||
/// </summary>
|
||||
public string Manufacturer { get; set; }
|
||||
public string Manufacturer { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Device model
|
||||
/// </summary>
|
||||
public string Model { get; set; }
|
||||
public string Model { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Device name
|
||||
/// </summary>
|
||||
public string DeviceName { get; set; }
|
||||
public string DeviceName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// OS product name, e.g. "Microsoft Windows 11 Pro"
|
||||
/// </summary>
|
||||
public string OsName { get; set; }
|
||||
public string OsName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Real OS build number, e.g. "26220.7934" (CurrentBuild.UBR from registry)
|
||||
/// </summary>
|
||||
public string OsBuild { get; set; }
|
||||
public string OsBuild { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// OS display version, e.g. "25H2", "24H2"
|
||||
/// </summary>
|
||||
public string OsDisplayVersion { get; set; }
|
||||
public string OsDisplayVersion { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// OS edition (e.g., "Pro", "Enterprise")
|
||||
/// </summary>
|
||||
public string OsEdition { get; set; }
|
||||
public string OsEdition { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// OS language
|
||||
/// </summary>
|
||||
public string OsLanguage { get; set; }
|
||||
public string OsLanguage { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this is user-driven enrollment
|
||||
@@ -80,7 +80,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Agent version
|
||||
/// </summary>
|
||||
public string AgentVersion { get; set; }
|
||||
public string AgentVersion { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Enrollment type detected by the agent: "v1" (Autopilot Classic/ESP) or "v2" (Windows Device Preparation)
|
||||
|
||||
@@ -2,8 +2,8 @@ namespace AutopilotMonitor.Shared.Models.Notifications
|
||||
{
|
||||
public class NotificationAction
|
||||
{
|
||||
public string Type { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Url { get; set; }
|
||||
public string Type { get; set; } = default!;
|
||||
public string Title { get; set; } = default!;
|
||||
public string Url { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,16 +10,16 @@ namespace AutopilotMonitor.Shared.Models.Notifications
|
||||
public class NotificationAlert
|
||||
{
|
||||
/// <summary>Main title, e.g. "Enrollment Succeeded".</summary>
|
||||
public string Title { get; set; }
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>One-line summary for toast/preview text.</summary>
|
||||
public string Summary { get; set; }
|
||||
public string Summary { get; set; } = default!;
|
||||
|
||||
/// <summary>Severity level used for color/icon mapping in renderers.</summary>
|
||||
public NotificationSeverity Severity { get; set; }
|
||||
|
||||
/// <summary>Hex color code (without #). Used by legacy Teams renderer, mapped to styles by others.</summary>
|
||||
public string ThemeColor { get; set; }
|
||||
public string ThemeColor { get; set; } = default!;
|
||||
|
||||
/// <summary>Key-value fact pairs (Device, Serial, Hardware, Duration, etc.).</summary>
|
||||
public List<NotificationFact> Facts { get; set; } = new();
|
||||
|
||||
@@ -2,7 +2,7 @@ namespace AutopilotMonitor.Shared.Models.Notifications
|
||||
{
|
||||
public class NotificationFact
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Value { get; set; }
|
||||
public string Name { get; set; } = default!;
|
||||
public string Value { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ namespace AutopilotMonitor.Shared.Models.Notifications
|
||||
{
|
||||
public class NotificationSection
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public string Text { get; set; }
|
||||
public string Title { get; set; } = default!;
|
||||
public string Text { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,34 +8,34 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// </summary>
|
||||
public class SubmitSessionReportRequest
|
||||
{
|
||||
public string TenantId { get; set; }
|
||||
public string SessionId { get; set; }
|
||||
public string Comment { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string TenantId { get; set; } = default!;
|
||||
public string SessionId { get; set; } = default!;
|
||||
public string Comment { get; set; } = default!;
|
||||
public string Email { get; set; } = default!;
|
||||
|
||||
/// <summary>Session row as CSV (single data row with header)</summary>
|
||||
public string SessionCsv { get; set; }
|
||||
public string SessionCsv { get; set; } = default!;
|
||||
|
||||
/// <summary>Pre-generated UI timeline export (TXT)</summary>
|
||||
public string TimelineExportTxt { get; set; }
|
||||
public string TimelineExportTxt { get; set; } = default!;
|
||||
|
||||
/// <summary>Pre-generated raw events table export (CSV)</summary>
|
||||
public string EventsCsv { get; set; }
|
||||
public string EventsCsv { get; set; } = default!;
|
||||
|
||||
/// <summary>Pre-generated analysis rule results export (CSV)</summary>
|
||||
public string RuleResultsCsv { get; set; }
|
||||
public string RuleResultsCsv { get; set; } = default!;
|
||||
|
||||
/// <summary>Base64-encoded screenshot image (optional)</summary>
|
||||
public string ScreenshotBase64 { get; set; }
|
||||
public string ScreenshotBase64 { get; set; } = default!;
|
||||
|
||||
/// <summary>Original screenshot file name for extension detection</summary>
|
||||
public string ScreenshotFileName { get; set; }
|
||||
public string ScreenshotFileName { get; set; } = default!;
|
||||
|
||||
/// <summary>Base64-encoded agent log file (optional, max 5 MB)</summary>
|
||||
public string AgentLogBase64 { get; set; }
|
||||
public string AgentLogBase64 { get; set; } = default!;
|
||||
|
||||
/// <summary>Original agent log file name</summary>
|
||||
public string AgentLogFileName { get; set; }
|
||||
public string AgentLogFileName { get; set; } = default!;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -44,8 +44,8 @@ namespace AutopilotMonitor.Shared.Models
|
||||
public class SubmitSessionReportResponse
|
||||
{
|
||||
public bool Success { get; set; }
|
||||
public string Message { get; set; }
|
||||
public string ReportId { get; set; }
|
||||
public string Message { get; set; } = default!;
|
||||
public string ReportId { get; set; } = default!;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -53,14 +53,14 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// </summary>
|
||||
public class SessionReportMetadata
|
||||
{
|
||||
public string ReportId { get; set; }
|
||||
public string TenantId { get; set; }
|
||||
public string SessionId { get; set; }
|
||||
public string Comment { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string BlobName { get; set; }
|
||||
public string SubmittedBy { get; set; }
|
||||
public string ReportId { get; set; } = default!;
|
||||
public string TenantId { get; set; } = default!;
|
||||
public string SessionId { get; set; } = default!;
|
||||
public string Comment { get; set; } = default!;
|
||||
public string Email { get; set; } = default!;
|
||||
public string BlobName { get; set; } = default!;
|
||||
public string SubmittedBy { get; set; } = default!;
|
||||
public DateTime SubmittedAt { get; set; }
|
||||
public string AdminNote { get; set; }
|
||||
public string AdminNote { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,27 +12,27 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Unique rule identifier (e.g., "ANALYZE-NET-001")
|
||||
/// </summary>
|
||||
public string RuleId { get; set; }
|
||||
public string RuleId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Human-readable rule title (e.g., "Proxy Authentication Required")
|
||||
/// </summary>
|
||||
public string Title { get; set; }
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Detailed description of what this rule detects
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
public string Description { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Severity level: "info", "warning", "high", "critical"
|
||||
/// </summary>
|
||||
public string Severity { get; set; }
|
||||
public string Severity { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Rule category: network, identity, enrollment, apps, esp, device
|
||||
/// </summary>
|
||||
public string Category { get; set; }
|
||||
public string Category { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Semantic version of this rule (e.g., "1.0.0")
|
||||
@@ -100,7 +100,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Detailed explanation of the detected issue
|
||||
/// Supports markdown formatting
|
||||
/// </summary>
|
||||
public string Explanation { get; set; }
|
||||
public string Explanation { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Steps to remediate the detected issue
|
||||
@@ -138,19 +138,19 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Descriptive name for this signal (e.g., "proxy_407_error")
|
||||
/// </summary>
|
||||
public string Signal { get; set; }
|
||||
public string Signal { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Source of the signal: "event_type", "event_data", "phase_duration", "event_count", "app_install_duration", "event_correlation"
|
||||
/// </summary>
|
||||
public string Source { get; set; }
|
||||
public string Source { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Event type to match on.
|
||||
/// For "event_type"/"event_data": the event type to match.
|
||||
/// For "event_correlation": the FIRST event type (Event A).
|
||||
/// </summary>
|
||||
public string EventType { get; set; }
|
||||
public string EventType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Data field to match on.
|
||||
@@ -158,19 +158,19 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// For "event_correlation": optional filter field on Event B (the second event).
|
||||
/// Uses dot notation for nested fields (e.g., "data.errorCode").
|
||||
/// </summary>
|
||||
public string DataField { get; set; }
|
||||
public string DataField { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Comparison operator: "equals", "not_equals", "contains", "not_contains", "regex", "not_regex", "gt", "lt", "gte", "lte", "exists", "not_exists", "count_gte"
|
||||
/// For "event_correlation": operator for the Event B filter (applied to DataField).
|
||||
/// </summary>
|
||||
public string Operator { get; set; }
|
||||
public string Operator { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Value to compare against.
|
||||
/// For "event_correlation": value for the Event B filter.
|
||||
/// </summary>
|
||||
public string Value { get; set; }
|
||||
public string Value { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this condition must match for the rule to fire
|
||||
@@ -185,13 +185,13 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// The second event type to correlate with (Event B).
|
||||
/// Example: "app_install_failed"
|
||||
/// </summary>
|
||||
public string CorrelateEventType { get; set; }
|
||||
public string CorrelateEventType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// The data field to join on — must have the same value in both Event A and Event B.
|
||||
/// Example: "appId" means both events must share the same appId value.
|
||||
/// </summary>
|
||||
public string JoinField { get; set; }
|
||||
public string JoinField { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum time in seconds between Event A and Event B. Null or 0 means no time limit.
|
||||
@@ -202,17 +202,17 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Optional filter field on Event A (the first event).
|
||||
/// Combined with EventAFilterOperator and EventAFilterValue.
|
||||
/// </summary>
|
||||
public string EventAFilterField { get; set; }
|
||||
public string EventAFilterField { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Operator for the Event A filter. Uses same operators as the main Operator field.
|
||||
/// </summary>
|
||||
public string EventAFilterOperator { get; set; }
|
||||
public string EventAFilterOperator { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Value for the Event A filter.
|
||||
/// </summary>
|
||||
public string EventAFilterValue { get; set; }
|
||||
public string EventAFilterValue { get; set; } = default!;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -223,12 +223,12 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Descriptive name for this factor
|
||||
/// </summary>
|
||||
public string Signal { get; set; }
|
||||
public string Signal { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Condition expression (e.g., "count >= 5", "exists", "duration > 300")
|
||||
/// </summary>
|
||||
public string Condition { get; set; }
|
||||
public string Condition { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Confidence weight to add when this factor matches (0-100)
|
||||
@@ -245,7 +245,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Title of the remediation approach
|
||||
/// </summary>
|
||||
public string Title { get; set; }
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Ordered steps to execute
|
||||
@@ -261,11 +261,11 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Display title for the link
|
||||
/// </summary>
|
||||
public string Title { get; set; }
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// URL to the documentation
|
||||
/// </summary>
|
||||
public string Url { get; set; }
|
||||
public string Url { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,22 +13,22 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Unique rule identifier (e.g., "GATHER-NET-001")
|
||||
/// </summary>
|
||||
public string RuleId { get; set; }
|
||||
public string RuleId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Human-readable rule title (e.g., "Collect WinHTTP Proxy Settings")
|
||||
/// </summary>
|
||||
public string Title { get; set; }
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Detailed description of what this rule collects and why
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
public string Description { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Rule category: network, identity, apps, device, esp, enrollment
|
||||
/// </summary>
|
||||
public string Category { get; set; }
|
||||
public string Category { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Semantic version of this rule (e.g., "1.0.0")
|
||||
@@ -72,7 +72,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// for the full list of approved commands.
|
||||
/// - "logparser": Parse a CMTrace-format log file using a regex pattern with named capture groups
|
||||
/// </summary>
|
||||
public string CollectorType { get; set; }
|
||||
public string CollectorType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Target for collection:
|
||||
@@ -83,7 +83,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// - command_allowlisted: Exact command string as it appears in the allowlist (e.g., "Get-Tpm", "dsregcmd /status")
|
||||
/// - logparser: Log file path with env vars (e.g., "%ProgramData%\Microsoft\IntuneManagementExtension\Logs\AppWorkload.log")
|
||||
/// </summary>
|
||||
public string Target { get; set; }
|
||||
public string Target { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Additional parameters for the collector:
|
||||
@@ -101,7 +101,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Trigger type: "startup", "phase_change", "interval", "on_event"
|
||||
/// </summary>
|
||||
public string Trigger { get; set; }
|
||||
public string Trigger { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Interval in seconds (only used when Trigger = "interval")
|
||||
@@ -112,20 +112,20 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Phase to trigger on (only used when Trigger = "phase_change")
|
||||
/// e.g., "Identity", "MdmEnrollment", "AppInstallation"
|
||||
/// </summary>
|
||||
public string TriggerPhase { get; set; }
|
||||
public string TriggerPhase { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Event type to trigger on (only used when Trigger = "on_event")
|
||||
/// e.g., "app_install_failed"
|
||||
/// </summary>
|
||||
public string TriggerEventType { get; set; }
|
||||
public string TriggerEventType { get; set; } = default!;
|
||||
|
||||
// ===== OUTPUT =====
|
||||
|
||||
/// <summary>
|
||||
/// EventType for the emitted event (e.g., "gather_proxy_settings")
|
||||
/// </summary>
|
||||
public string OutputEventType { get; set; }
|
||||
public string OutputEventType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Severity for the emitted event
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Unique pattern identifier (e.g., "IME-ESP-PHASE")
|
||||
/// </summary>
|
||||
public string PatternId { get; set; }
|
||||
public string PatternId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Pattern category controlling when the pattern is active:
|
||||
@@ -20,14 +20,14 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// - "currentPhase": Only active during the current ESP phase
|
||||
/// - "otherPhases": Only active during non-current ESP phases (for history/completed apps)
|
||||
/// </summary>
|
||||
public string Category { get; set; }
|
||||
public string Category { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Regex pattern string to match against IME log message content.
|
||||
/// Supports named capture groups (e.g., (?<id>...)) which are passed to the action handler.
|
||||
/// Uses {GUID} as placeholder for the standard GUID capture pattern.
|
||||
/// </summary>
|
||||
public string Pattern { get; set; }
|
||||
public string Pattern { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Action to perform when the pattern matches:
|
||||
@@ -48,7 +48,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// - "updateWin32AppState": Update from Win32 app state (uses 'id'/'state' capture groups)
|
||||
/// - "cancelStuckAndSetCurrent": Cancel stuck app and set new current (uses 'id' capture group)
|
||||
/// </summary>
|
||||
public string Action { get; set; }
|
||||
public string Action { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Optional extra parameters for the action handler.
|
||||
@@ -57,7 +57,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// - { "useCurrentApp": "true" } to use CurrentPackageId instead of captured 'id'
|
||||
/// - { "checkTo": "true" } to check the 'to' capture group value before applying state
|
||||
/// </summary>
|
||||
public Dictionary<string, string> Parameters { get; set; }
|
||||
public Dictionary<string, string> Parameters { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this pattern is enabled. Allows disabling patterns without removing them.
|
||||
@@ -68,7 +68,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Human-readable description of what this pattern detects and why.
|
||||
/// Not used by the agent — purely for documentation and UI display.
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
public string Description { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this is a built-in pattern (shipped with the system).
|
||||
|
||||
@@ -17,32 +17,32 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Session this result belongs to
|
||||
/// </summary>
|
||||
public string SessionId { get; set; }
|
||||
public string SessionId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Tenant this result belongs to
|
||||
/// </summary>
|
||||
public string TenantId { get; set; }
|
||||
public string TenantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// The rule that produced this result
|
||||
/// </summary>
|
||||
public string RuleId { get; set; }
|
||||
public string RuleId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Human-readable title of the rule
|
||||
/// </summary>
|
||||
public string RuleTitle { get; set; }
|
||||
public string RuleTitle { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Severity level: "info", "warning", "high", "critical"
|
||||
/// </summary>
|
||||
public string Severity { get; set; }
|
||||
public string Severity { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Rule category: network, identity, enrollment, apps, esp, device
|
||||
/// </summary>
|
||||
public string Category { get; set; }
|
||||
public string Category { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Confidence score (0-100)
|
||||
@@ -53,7 +53,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// <summary>
|
||||
/// Detailed explanation of the detected issue
|
||||
/// </summary>
|
||||
public string Explanation { get; set; }
|
||||
public string Explanation { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Remediation steps for the detected issue
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// </summary>
|
||||
public class RegisterSessionRequest
|
||||
{
|
||||
public SessionRegistration Registration { get; set; }
|
||||
public SessionRegistration Registration { get; set; } = default!;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -16,9 +16,9 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// </summary>
|
||||
public class RegisterSessionResponse
|
||||
{
|
||||
public string SessionId { get; set; }
|
||||
public string SessionId { get; set; } = default!;
|
||||
public bool Success { get; set; }
|
||||
public string Message { get; set; }
|
||||
public string Message { get; set; } = default!;
|
||||
public DateTime RegisteredAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -33,8 +33,8 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// </summary>
|
||||
public class IngestEventsRequest
|
||||
{
|
||||
public string SessionId { get; set; }
|
||||
public string TenantId { get; set; }
|
||||
public string SessionId { get; set; } = default!;
|
||||
public string TenantId { get; set; } = default!;
|
||||
public List<EnrollmentEvent> Events { get; set; }
|
||||
public bool IsCompressed { get; set; }
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
public bool Success { get; set; }
|
||||
public int EventsReceived { get; set; }
|
||||
public int EventsProcessed { get; set; }
|
||||
public string Message { get; set; }
|
||||
public string Message { get; set; } = default!;
|
||||
public DateTime ProcessedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -120,9 +120,9 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// </summary>
|
||||
public class GetDiagnosticsUploadUrlRequest
|
||||
{
|
||||
public string TenantId { get; set; }
|
||||
public string SessionId { get; set; }
|
||||
public string FileName { get; set; }
|
||||
public string TenantId { get; set; } = default!;
|
||||
public string SessionId { get; set; } = default!;
|
||||
public string FileName { get; set; } = default!;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -141,20 +141,20 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// </summary>
|
||||
public class SessionSummary
|
||||
{
|
||||
public string SessionId { get; set; }
|
||||
public string TenantId { get; set; }
|
||||
public string SerialNumber { get; set; }
|
||||
public string DeviceName { get; set; }
|
||||
public string Manufacturer { get; set; }
|
||||
public string Model { get; set; }
|
||||
public string SessionId { get; set; } = default!;
|
||||
public string TenantId { get; set; } = default!;
|
||||
public string SerialNumber { get; set; } = default!;
|
||||
public string DeviceName { get; set; } = default!;
|
||||
public string Manufacturer { get; set; } = default!;
|
||||
public string Model { get; set; } = default!;
|
||||
public DateTime StartedAt { get; set; }
|
||||
public DateTime? CompletedAt { get; set; }
|
||||
|
||||
// Serialize as integer (0-7) not string for frontend compatibility
|
||||
public int CurrentPhase { get; set; }
|
||||
public string CurrentPhaseDetail { get; set; }
|
||||
public string CurrentPhaseDetail { get; set; } = default!;
|
||||
public SessionStatus Status { get; set; }
|
||||
public string FailureReason { get; set; }
|
||||
public string FailureReason { get; set; } = default!;
|
||||
public int EventCount { get; set; }
|
||||
public int? DurationSeconds { get; set; }
|
||||
|
||||
@@ -168,7 +168,7 @@ namespace AutopilotMonitor.Shared.Models
|
||||
/// Blob name of the uploaded diagnostics archive (null if not uploaded).
|
||||
/// Used to construct a download URL via the tenant's Blob Storage SAS URL.
|
||||
/// </summary>
|
||||
public string DiagnosticsBlobName { get; set; }
|
||||
public string DiagnosticsBlobName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp of the most recently received event for this session.
|
||||
@@ -198,14 +198,14 @@ namespace AutopilotMonitor.Shared.Models
|
||||
public bool IsHybridJoin { get; set; }
|
||||
|
||||
// Device detail fields — stored in the Sessions table but omitted from earlier versions
|
||||
public string OsName { get; set; }
|
||||
public string OsBuild { get; set; }
|
||||
public string OsDisplayVersion { get; set; }
|
||||
public string OsEdition { get; set; }
|
||||
public string OsLanguage { get; set; }
|
||||
public string OsName { get; set; } = default!;
|
||||
public string OsBuild { get; set; } = default!;
|
||||
public string OsDisplayVersion { get; set; } = default!;
|
||||
public string OsEdition { get; set; } = default!;
|
||||
public string OsLanguage { get; set; } = default!;
|
||||
public bool IsUserDriven { get; set; }
|
||||
public string AgentVersion { get; set; }
|
||||
public string ImeAgentVersion { get; set; }
|
||||
public string AgentVersion { get; set; } = default!;
|
||||
public string ImeAgentVersion { get; set; } = default!;
|
||||
|
||||
// Geographic location fields — populated from device_location event geo data
|
||||
public string GeoCountry { get; set; } = string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user