From a4f6f4c90fc705cc82981d628e050209db139196 Mon Sep 17 00:00:00 2001 From: Dimitris Gkanatsios Date: Fri, 1 Mar 2024 12:54:49 -0800 Subject: [PATCH] maintenancev2 --- AgentInterfaces/MaintenanceSchedule.cs | 5 ++++- AgentInterfaces/SessionHostHeartbeatInfo.cs | 5 +++++ AgentInterfaces/VmAgentSettings.cs | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/AgentInterfaces/MaintenanceSchedule.cs b/AgentInterfaces/MaintenanceSchedule.cs index a3d6c5d..7f038be 100644 --- a/AgentInterfaces/MaintenanceSchedule.cs +++ b/AgentInterfaces/MaintenanceSchedule.cs @@ -7,8 +7,10 @@ namespace Microsoft.Azure.Gaming.AgentInterfaces using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Converters; - // Data Format: https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-scheduled-events + // Data Format: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/scheduled-events + [Serializable] public class MaintenanceSchedule { public string DocumentIncarnation { get; set; } @@ -32,6 +34,7 @@ public MaintenanceSchedule(MaintenanceSchedule other) } // https://docs.microsoft.com/en-us/azure/virtual-machines/windows/scheduled-events#query-for-events + [Serializable] public class MaintenanceEvent { public string EventId { get; set; } diff --git a/AgentInterfaces/SessionHostHeartbeatInfo.cs b/AgentInterfaces/SessionHostHeartbeatInfo.cs index 5f629ae..594dd1c 100644 --- a/AgentInterfaces/SessionHostHeartbeatInfo.cs +++ b/AgentInterfaces/SessionHostHeartbeatInfo.cs @@ -59,6 +59,11 @@ public class SessionHostHeartbeatInfo /// public DateTime? NextScheduledMaintenanceUtc { get; set; } + /// + /// Planned maintenance events + /// + public MaintenanceSchedule MaintenanceSchedule { get; set; } + /// /// Used by some legacy games such as Forza 5 for security handshake with the game client. /// diff --git a/AgentInterfaces/VmAgentSettings.cs b/AgentInterfaces/VmAgentSettings.cs index ecbde6a..bbd36eb 100644 --- a/AgentInterfaces/VmAgentSettings.cs +++ b/AgentInterfaces/VmAgentSettings.cs @@ -22,6 +22,12 @@ public class VmAgentSettings /// public HashSet TitlesUsingExternalAllocations { get; set; } + /// + /// Titles that are using MaintenanceV2 - essentially, getting the full maintenance schedule details on the + /// GSDK maintenance callback + /// + public HashSet TitlesUsingMaintenanceV2 { get; set; } + /// /// Whether the maintenance schedule time should be passed to GSDK. ///