using System.Text.Json.Serialization; using AIStudio.Provider; using AIStudio.Settings.DataModel; using AIStudio.Settings.DataModel.PreviousModels; using EMailWritingStyles = AIStudio.Assistants.EMail.WritingStyles; using ERIContentType = AIStudio.Tools.ERIClient.DataModel.ContentType; using ProviderV4 = AIStudio.Settings.DataModel.PreviousModels.Provider; using RewriteImproveWritingStyles = AIStudio.Assistants.RewriteImprove.WritingStyles; namespace AIStudio.Settings; /// /// The contracts with which System.Text.Json reads and writes the settings, built at compile time. /// /// /// Besides the settings and their older versions, which the migrations still read, the values of managed /// settings get written and read on their own, as the type of their setting. That type is often an interface, /// such as ISet<string>, which the settings themselves never use. A test fails for a managed setting /// whose type is missing here.

/// /// Two types with the same name need a name of their own for their contract, else the generator builds /// only the first of them and warns with SYSLIB1031. ///
[JsonSourceGenerationOptions(GenerationMode = JsonSourceGenerationMode.Metadata)] [JsonSerializable(typeof(Data))] [JsonSerializable(typeof(DataV1V3))] [JsonSerializable(typeof(DataV4))] [JsonSerializable(typeof(DataV5))] [JsonSerializable(typeof(ISet))] [JsonSerializable(typeof(ISet))] [JsonSerializable(typeof(ISet))] [JsonSerializable(typeof(ISet))] [JsonSerializable(typeof(IList))] [JsonSerializable(typeof(IList))] [JsonSerializable(typeof(IDictionary))] [JsonSerializable(typeof(ProviderV4), TypeInfoPropertyName = "ProviderV4")] [JsonSerializable(typeof(List), TypeInfoPropertyName = "ListProviderV4")] [JsonSerializable(typeof(EMailWritingStyles), TypeInfoPropertyName = "EMailWritingStyles")] [JsonSerializable(typeof(RewriteImproveWritingStyles), TypeInfoPropertyName = "RewriteImproveWritingStyles")] [JsonSerializable(typeof(ERIContentType), TypeInfoPropertyName = "ERIContentType")] internal sealed partial class SettingsJsonContext : JsonSerializerContext;