fix nullables

This commit is contained in:
Oliver Kieselbach
2026-03-27 09:35:14 +01:00
parent 905e42064b
commit 738f524083
8 changed files with 24 additions and 23 deletions
@@ -1 +1 @@
589
609
@@ -471,7 +471,7 @@ namespace AutopilotMonitor.Functions.Functions.Ingest
break;
}
AggregateAppInstallEvent(evt, storedEvents[0].TenantId, storedEvents[0].SessionId, classification.AppInstallUpdates);
AggregateAppInstallEvent(evt, storedEvents[0].TenantId!, storedEvents[0].SessionId!, classification.AppInstallUpdates);
}
return classification;
@@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
@@ -53,7 +53,7 @@ namespace AutopilotMonitor.Shared.Models
/// Optional reason why the tenant was disabled
/// Displayed to users attempting to log in
/// </summary>
public string DisabledReason { get; set; }
public string? DisabledReason { get; set; }
/// <summary>
/// Optional date/time until which the tenant is disabled
@@ -17,12 +17,12 @@ namespace AutopilotMonitor.Shared.Models
/// <summary>
/// Session identifier this event belongs to
/// </summary>
public string SessionId { get; set; }
public string? SessionId { get; set; }
/// <summary>
/// Tenant identifier
/// </summary>
public string TenantId { get; set; }
public string? TenantId { get; set; }
/// <summary>
/// Timestamp when the agent detected/created this event on the device (UTC).
@@ -56,7 +56,7 @@ namespace AutopilotMonitor.Shared.Models
public bool IsOutlier { get; set; }
/// <summary>"fast", "slow", or null</summary>
public string OutlierDirection { get; set; }
public string? OutlierDirection { get; set; }
}
/// <summary>
@@ -25,7 +25,7 @@ namespace AutopilotMonitor.Shared.Models
/// Non-null when the session was already marked as terminal by an admin before agent restart.
/// Values: "Succeeded", "Failed". Agent should run cleanup instead of starting monitoring.
/// </summary>
public string AdminAction { get; set; }
public string? AdminAction { get; set; }
}
/// <summary>
@@ -63,7 +63,7 @@ namespace AutopilotMonitor.Shared.Models
/// <summary>
/// Rate limit details (only populated if RateLimitExceeded is true)
/// </summary>
public RateLimitInfo RateLimitInfo { get; set; }
public RateLimitInfo? RateLimitInfo { get; set; }
/// <summary>
/// Whether the device has been temporarily blocked by an admin
@@ -85,7 +85,7 @@ namespace AutopilotMonitor.Shared.Models
/// Non-null when an admin has externally changed the session status.
/// Values: "Succeeded", "Failed". Agent should treat as terminal signal and run cleanup.
/// </summary>
public string AdminAction { get; set; }
public string? AdminAction { get; set; }
}
/// <summary>
@@ -131,9 +131,9 @@ namespace AutopilotMonitor.Shared.Models
public class GetDiagnosticsUploadUrlResponse
{
public bool Success { get; set; }
public string UploadUrl { get; set; }
public string? UploadUrl { get; set; }
public DateTime ExpiresAt { get; set; }
public string Message { get; set; }
public string? Message { get; set; }
}
/// <summary>
@@ -222,7 +222,7 @@ namespace AutopilotMonitor.Shared.Models
{
public List<SessionSummary> Sessions { get; set; } = new();
public bool HasMore { get; set; }
public string Cursor { get; set; }
public string? Cursor { get; set; }
}
/// <summary>
@@ -6,25 +6,25 @@ namespace AutopilotMonitor.Shared.Models
public class SessionSearchFilter
{
// Basic (SessionSummary fields)
public string Status { get; set; }
public string SerialNumber { get; set; }
public string AgentVersion { get; set; }
public string ImeAgentVersion { get; set; }
public string DeviceName { get; set; }
public string Manufacturer { get; set; }
public string Model { get; set; }
public string OsBuild { get; set; }
public string EnrollmentType { get; set; }
public string? Status { get; set; }
public string? SerialNumber { get; set; }
public string? AgentVersion { get; set; }
public string? ImeAgentVersion { get; set; }
public string? DeviceName { get; set; }
public string? Manufacturer { get; set; }
public string? Model { get; set; }
public string? OsBuild { get; set; }
public string? EnrollmentType { get; set; }
public bool? IsPreProvisioned { get; set; }
public bool? IsHybridJoin { get; set; }
public string GeoCountry { get; set; }
public string? GeoCountry { get; set; }
public DateTime? StartedAfter { get; set; }
public DateTime? StartedBefore { get; set; }
public int Limit { get; set; } = 50;
// Dynamic device property filters (key = "eventType.propertyName", value = filter expression)
// Examples: "tpm_status.specVersion" = "2.0", "hardware_spec.ramTotalGB" = ">=8"
public Dictionary<string, string> DeviceProperties { get; set; }
public Dictionary<string, string>? DeviceProperties { get; set; }
public bool HasDeviceSnapshotFilters =>
DeviceProperties != null && DeviceProperties.Count > 0;