private static void UpdateMostRecentApviIntervals(RegionGenerationByFuelTypeResult result, Dictionary<string, DateTimeOffset?> currentApviSolarIntervalByRegion)
        {
            // All of the regions for the APVI solar fuel type could potentially be out of date by different amounts, so check them all separately.
            var newestApviSolarIntervalByRegion = result.Records
                .Where(r => String.Equals(r.FuelType, _apviSolarFuelType, StringComparison.CurrentCultureIgnoreCase))
                .GroupBy(r => r.RegionId)
                .ToDictionary(g => g.Key, g => g.Select(r => r.NemInterval).Max());

            foreach (var region in _regions)
            {
                DateTimeOffset mostRecentInterval;
                if (newestApviSolarIntervalByRegion.TryGetValue(region, out mostRecentInterval))
                {
                    currentApviSolarIntervalByRegion[region] = mostRecentInterval;
                }
            }
        }
        private static DateTimeOffset? GetMostRecentAemoInterval(RegionGenerationByFuelTypeResult result5Min, DateTimeOffset? previousAemoInterval)
        {
            // All of the AEMO fuel types should have the same data available for all interval/region combinations, so just check one.
            var mostRecentAemoInterval = result5Min.Records
                .Where(r => String.Equals(r.FuelType, _aemoDataSentryFuelType, StringComparison.CurrentCultureIgnoreCase))
                .MaxOrDefault(r => (DateTimeOffset?) r.NemInterval, null)
                ?? previousAemoInterval;

            return mostRecentAemoInterval;
        }