From a14050047cb72d5fcd611a5bb65fb02419116f35 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 13 Sep 2026 15:59:10 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...outer.Analytics.JsonSerializerContext.g.cs | 145 + .../Generated/OpenRouter.AnalyticsClient.g.cs | 2 +- ...thropicMessages.JsonSerializerContext.g.cs | 3583 +++++++++++++++++ .../OpenRouter.AnthropicMessagesClient.g.cs | 2 +- ...nRouter.ApiKeys.JsonSerializerContext.g.cs | 212 + .../Generated/OpenRouter.ApiKeysClient.g.cs | 2 +- ...uter.Benchmarks.JsonSerializerContext.g.cs | 294 ++ .../OpenRouter.BenchmarksClient.g.cs | 2 +- ...r.BetaAnalytics.JsonSerializerContext.g.cs | 291 ++ .../OpenRouter.BetaAnalyticsClient.g.cs | 2 +- ...OpenRouter.Byok.JsonSerializerContext.g.cs | 205 + .../Generated/OpenRouter.ByokClient.g.cs | 2 +- ...OpenRouter.Chat.JsonSerializerContext.g.cs | 2040 ++++++++++ .../Generated/OpenRouter.ChatClient.g.cs | 2 +- ...Classifications.JsonSerializerContext.g.cs | 181 + .../OpenRouter.ClassificationsClient.g.cs | 2 +- ...nRouter.Credits.JsonSerializerContext.g.cs | 139 + .../Generated/OpenRouter.CreditsClient.g.cs | 2 +- ...Router.Datasets.JsonSerializerContext.g.cs | 305 ++ .../Generated/OpenRouter.DatasetsClient.g.cs | 2 +- ...uter.Embeddings.JsonSerializerContext.g.cs | 580 +++ .../OpenRouter.EmbeddingsClient.g.cs | 2 +- ...outer.Endpoints.JsonSerializerContext.g.cs | 301 ++ .../Generated/OpenRouter.EndpointsClient.g.cs | 2 +- ...penRouter.Files.JsonSerializerContext.g.cs | 203 + .../Generated/OpenRouter.FilesClient.g.cs | 2 +- ...ter.Generations.JsonSerializerContext.g.cs | 261 ++ .../OpenRouter.GenerationsClient.g.cs | 2 +- ...uter.Guardrails.JsonSerializerContext.g.cs | 280 ++ .../OpenRouter.GuardrailsClient.g.cs | 2 +- ...enRouter.Images.JsonSerializerContext.g.cs | 576 +++ .../Generated/OpenRouter.ImagesClient.g.cs | 2 +- ...enRouter.Models.JsonSerializerContext.g.cs | 367 ++ .../Generated/OpenRouter.ModelsClient.g.cs | 2 +- ...penRouter.OAuth.JsonSerializerContext.g.cs | 213 + .../Generated/OpenRouter.OAuthClient.g.cs | 2 +- ...r.Observability.JsonSerializerContext.g.cs | 1534 +++++++ .../OpenRouter.ObservabilityClient.g.cs | 2 +- ...er.Organization.JsonSerializerContext.g.cs | 170 + .../OpenRouter.OrganizationClient.g.cs | 2 +- ...outer.Providers.JsonSerializerContext.g.cs | 184 + .../Generated/OpenRouter.ProvidersClient.g.cs | 2 +- ...enRouter.Rerank.JsonSerializerContext.g.cs | 304 ++ .../Generated/OpenRouter.RerankClient.g.cs | 2 +- .../OpenRouter.Stt.JsonSerializerContext.g.cs | 210 + .../Generated/OpenRouter.SttClient.g.cs | 2 +- .../OpenRouter.Tts.JsonSerializerContext.g.cs | 182 + .../Generated/OpenRouter.TtsClient.g.cs | 2 +- ...VideoGeneration.JsonSerializerContext.g.cs | 410 ++ .../OpenRouter.VideoGenerationClient.g.cs | 2 +- ...uter.Workspaces.JsonSerializerContext.g.cs | 257 ++ .../OpenRouter.WorkspacesClient.g.cs | 2 +- 52 files changed, 13453 insertions(+), 26 deletions(-) create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Analytics.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.AnthropicMessages.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.ApiKeys.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Benchmarks.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.BetaAnalytics.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Byok.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Chat.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Classifications.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Credits.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Datasets.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Embeddings.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Endpoints.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Files.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Generations.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Guardrails.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Images.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Models.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.OAuth.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Observability.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Organization.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Providers.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Rerank.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Stt.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Tts.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.VideoGeneration.JsonSerializerContext.g.cs create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.Workspaces.JsonSerializerContext.g.cs diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Analytics.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Analytics.JsonSerializerContext.g.cs new file mode 100644 index 00000000..ba5b8623 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Analytics.JsonSerializerContext.g.cs @@ -0,0 +1,145 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ActivityItem))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ActivityResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class AnalyticsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class AnalyticsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static AnalyticsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private AnalyticsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new AnalyticsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.AnalyticsClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.AnalyticsClient.g.cs index a671487a..0ba487f6 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.AnalyticsClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.AnalyticsClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class AnalyticsClient : global::OpenRouter.IAnalyticsClien /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.AnalyticsSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.AnthropicMessages.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.AnthropicMessages.JsonSerializerContext.g.cs new file mode 100644 index 00000000..c8eff15a --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.AnthropicMessages.JsonSerializerContext.g.cs @@ -0,0 +1,3583 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MetadataLevel), TypeInfoPropertyName = "MetadataLevel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCacheControlTtl), TypeInfoPropertyName = "AnthropicCacheControlTtl2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCacheControlDirectiveType), TypeInfoPropertyName = "AnthropicCacheControlDirectiveType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCacheControlDirective))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchEngineEnum), TypeInfoPropertyName = "WebSearchEngineEnum2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatetimeServerToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatetimeServerToolType), TypeInfoPropertyName = "DatetimeServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatetimeServerTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationServerToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationServerToolOpenRouterType), TypeInfoPropertyName = "ImageGenerationServerToolOpenRouterType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SearchModelsServerToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchEngineEnum), TypeInfoPropertyName = "WebFetchEngineEnum2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchServerToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchServerToolType), TypeInfoPropertyName = "WebFetchServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchServerTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SearchQualityLevel), TypeInfoPropertyName = "SearchQualityLevel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchUserLocationServerToolType), TypeInfoPropertyName = "WebSearchUserLocationServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchUserLocationServerTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEngine), TypeInfoPropertyName = "BashServerToolEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironment), TypeInfoPropertyName = "BashServerToolEnvironment2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentVariant1Type), TypeInfoPropertyName = "BashServerToolEnvironmentVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentVariant2Type), TypeInfoPropertyName = "BashServerToolEnvironmentVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentDiscriminatorType), TypeInfoPropertyName = "BashServerToolEnvironmentDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolType), TypeInfoPropertyName = "BashServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContextCompressionEngine), TypeInfoPropertyName = "ContextCompressionEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PdfParserEngine0), TypeInfoPropertyName = "PdfParserEngine02")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PdfParserEngine1), TypeInfoPropertyName = "PdfParserEngine12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PDFParserEngine), TypeInfoPropertyName = "PDFParserEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PDFParserOptions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset), TypeInfoPropertyName = "ResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3Items))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4), TypeInfoPropertyName = "ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf42")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters), TypeInfoPropertyName = "ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource), TypeInfoPropertyName = "ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchEngine), TypeInfoPropertyName = "WebSearchEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchPluginId), TypeInfoPropertyName = "WebSearchPluginId2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchPluginUserLocationType), TypeInfoPropertyName = "WebSearchPluginUserLocationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchPluginUserLocation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchPluginId), TypeInfoPropertyName = "WebFetchPluginId2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesDataCollection), TypeInfoPropertyName = "ProviderPreferencesDataCollection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderName), TypeInfoPropertyName = "ProviderName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesIgnoreItems), TypeInfoPropertyName = "ProviderPreferencesIgnoreItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesMaxPrice))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesOnlyItems), TypeInfoPropertyName = "ProviderPreferencesOnlyItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesOrderItems), TypeInfoPropertyName = "ProviderPreferencesOrderItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PercentileLatencyCutoffs))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMaxLatency), TypeInfoPropertyName = "PreferredMaxLatency2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PercentileThroughputCutoffs))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMinThroughput), TypeInfoPropertyName = "PreferredMinThroughput2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Quantization), TypeInfoPropertyName = "Quantization2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSort), TypeInfoPropertyName = "ProviderSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigBy), TypeInfoPropertyName = "ProviderSortConfigBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigPartition), TypeInfoPropertyName = "ProviderSortConfigPartition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesSort), TypeInfoPropertyName = "ProviderPreferencesSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferences))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenFinishReasonIsType), TypeInfoPropertyName = "StopServerToolsWhenFinishReasonIsType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenHasToolCallType), TypeInfoPropertyName = "StopServerToolsWhenHasToolCallType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenMaxCostType), TypeInfoPropertyName = "StopServerToolsWhenMaxCostType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenMaxTokensUsedType), TypeInfoPropertyName = "StopServerToolsWhenMaxTokensUsedType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenStepCountIsType), TypeInfoPropertyName = "StopServerToolsWhenStepCountIsType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenCondition), TypeInfoPropertyName = "StopServerToolsWhenCondition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionDiscriminatorType), TypeInfoPropertyName = "StopServerToolsWhenConditionDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TraceConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ApiErrorType), TypeInfoPropertyName = "ApiErrorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RouterAttempt))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EndpointInfo))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EndpointsMetadata))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RouterParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PipelineStageType), TypeInfoPropertyName = "PipelineStageType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PipelineStage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RoutingStrategy), TypeInfoPropertyName = "RoutingStrategy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OpenRouterMetadata))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCacheCreation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicIterationCacheCreation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCompactionUsageIterationType), TypeInfoPropertyName = "AnthropicCompactionUsageIterationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCompactionUsageIteration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicMessageUsageIterationType), TypeInfoPropertyName = "AnthropicMessageUsageIterationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicMessageUsageIteration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIterationType), TypeInfoPropertyName = "AnthropicAdvisorMessageUsageIterationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIteration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicUnknownUsageIteration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicUsageIteration), TypeInfoPropertyName = "AnthropicUsageIteration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicSpeed), TypeInfoPropertyName = "AnthropicSpeed2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OpenRouterWebSearchServerToolType), TypeInfoPropertyName = "OpenRouterWebSearchServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OpenRouterWebSearchServerTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicInputTokensClearAtLeastType), TypeInfoPropertyName = "AnthropicInputTokensClearAtLeastType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicInputTokensClearAtLeast))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputs), TypeInfoPropertyName = "MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputs2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolUsesKeepType), TypeInfoPropertyName = "AnthropicToolUsesKeepType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolUsesKeep))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0Trigger), TypeInfoPropertyName = "MessagesRequestContextManagementEditsItemsOneOf0Trigger2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1Type), TypeInfoPropertyName = "MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2Type), TypeInfoPropertyName = "MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerDiscriminatorType), TypeInfoPropertyName = "MessagesRequestContextManagementEditsItemsOneOf0TriggerDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0Type), TypeInfoPropertyName = "MessagesRequestContextManagementEditsItemsOneOf0Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItems0))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicThinkingTurnsType), TypeInfoPropertyName = "AnthropicThinkingTurnsType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicThinkingTurns))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1KeepOneOf1Type), TypeInfoPropertyName = "MessagesRequestContextManagementEditsItemsOneOf1KeepOneOf1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep2), TypeInfoPropertyName = "MessagesRequestContextManagementEditsItemsOneOf1Keep22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep), TypeInfoPropertyName = "MessagesRequestContextManagementEditsItemsOneOf1Keep2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Type), TypeInfoPropertyName = "MessagesRequestContextManagementEditsItemsOneOf1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItems1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf2Trigger))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf2Type), TypeInfoPropertyName = "MessagesRequestContextManagementEditsItemsOneOf2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItems2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItems), TypeInfoPropertyName = "MessagesRequestContextManagementEditsItems2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagement))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesFallbackParam))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItems), TypeInfoPropertyName = "AnthropicTextBlockParamCitationsItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant1Type), TypeInfoPropertyName = "AnthropicTextBlockParamCitationsItemsVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant2Type), TypeInfoPropertyName = "AnthropicTextBlockParamCitationsItemsVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant3Type), TypeInfoPropertyName = "AnthropicTextBlockParamCitationsItemsVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant4Type), TypeInfoPropertyName = "AnthropicTextBlockParamCitationsItemsVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant5Type), TypeInfoPropertyName = "AnthropicTextBlockParamCitationsItemsVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsDiscriminatorType), TypeInfoPropertyName = "AnthropicTextBlockParamCitationsItemsDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamType), TypeInfoPropertyName = "AnthropicTextBlockParamType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParam))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicImageMimeType), TypeInfoPropertyName = "AnthropicImageMimeType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicUrlImageSourceType), TypeInfoPropertyName = "AnthropicUrlImageSourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicImageBlockParamSource), TypeInfoPropertyName = "AnthropicImageBlockParamSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicImageBlockParamSourceVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicImageBlockParamSourceVariant1Type), TypeInfoPropertyName = "AnthropicImageBlockParamSourceVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicImageBlockParamSourceVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicImageBlockParamSourceDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicImageBlockParamSourceDiscriminatorType), TypeInfoPropertyName = "AnthropicImageBlockParamSourceDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicImageBlockParamType), TypeInfoPropertyName = "AnthropicImageBlockParamType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicImageBlockParam))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamCitations))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBase64PdfSourceMediaType), TypeInfoPropertyName = "AnthropicBase64PdfSourceMediaType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBase64PdfSourceType), TypeInfoPropertyName = "AnthropicBase64PdfSourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBase64PdfSource))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicPlainTextSourceMediaType), TypeInfoPropertyName = "AnthropicPlainTextSourceMediaType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicPlainTextSourceType), TypeInfoPropertyName = "AnthropicPlainTextSourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicPlainTextSource))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1Items), TypeInfoPropertyName = "AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1Items2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsDiscriminatorType), TypeInfoPropertyName = "AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2Content), TypeInfoPropertyName = "AnthropicDocumentBlockParamSourceOneOf2Content2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2Type), TypeInfoPropertyName = "AnthropicDocumentBlockParamSourceOneOf2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamSource2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicUrlPdfSourceType), TypeInfoPropertyName = "AnthropicUrlPdfSourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicUrlPdfSource))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicFileDocumentSourceType), TypeInfoPropertyName = "AnthropicFileDocumentSourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicFileDocumentSource))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamSource), TypeInfoPropertyName = "AnthropicDocumentBlockParamSource2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamType), TypeInfoPropertyName = "AnthropicDocumentBlockParamType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParam))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf3Type), TypeInfoPropertyName = "MessagesMessageParamContentOneOf1ItemsOneOf3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf2Type), TypeInfoPropertyName = "MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicSearchResultBlockParamCitations))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicSearchResultBlockParamType), TypeInfoPropertyName = "AnthropicSearchResultBlockParamType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicSearchResultBlockParam))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items), TypeInfoPropertyName = "MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4Content), TypeInfoPropertyName = "MessagesMessageParamContentOneOf1ItemsOneOf4Content2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4Type), TypeInfoPropertyName = "MessagesMessageParamContentOneOf1ItemsOneOf4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf5Type), TypeInfoPropertyName = "MessagesMessageParamContentOneOf1ItemsOneOf5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf6Type), TypeInfoPropertyName = "MessagesMessageParamContentOneOf1ItemsOneOf6Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items6))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf7Type), TypeInfoPropertyName = "MessagesMessageParamContentOneOf1ItemsOneOf7Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items7))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebSearchResultBlockParamType), TypeInfoPropertyName = "AnthropicWebSearchResultBlockParamType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebSearchResultBlockParam))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1ErrorCode), TypeInfoPropertyName = "MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1Type), TypeInfoPropertyName = "MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8Content1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8Content), TypeInfoPropertyName = "MessagesMessageParamContentOneOf1ItemsOneOf8Content2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8Type), TypeInfoPropertyName = "MessagesMessageParamContentOneOf1ItemsOneOf8Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items8))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf10Type), TypeInfoPropertyName = "MessagesMessageParamContentOneOf1ItemsOneOf10Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items10))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesAdvisorToolResultBlockType), TypeInfoPropertyName = "MessagesAdvisorToolResultBlockType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesAdvisorToolResultBlock))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items), TypeInfoPropertyName = "MessagesMessageParamContentOneOf1Items2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContent), TypeInfoPropertyName = "MessagesMessageParamContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamRole), TypeInfoPropertyName = "MessagesMessageParamRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParam))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestMetadata))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesOutputConfigEffort), TypeInfoPropertyName = "MessagesOutputConfigEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesOutputConfigFormatType), TypeInfoPropertyName = "MessagesOutputConfigFormatType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesOutputConfigFormat))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesOutputConfigTaskBudgetType), TypeInfoPropertyName = "MessagesOutputConfigTaskBudgetType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesOutputConfigTaskBudget))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesOutputConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItems), TypeInfoPropertyName = "MessagesRequestPluginsItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant1Id), TypeInfoPropertyName = "MessagesRequestPluginsItemsVariant1Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant2Id), TypeInfoPropertyName = "MessagesRequestPluginsItemsVariant2Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant3Id), TypeInfoPropertyName = "MessagesRequestPluginsItemsVariant3Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant4Id), TypeInfoPropertyName = "MessagesRequestPluginsItemsVariant4Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant5Id), TypeInfoPropertyName = "MessagesRequestPluginsItemsVariant5Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant6))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant6Id), TypeInfoPropertyName = "MessagesRequestPluginsItemsVariant6Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant7))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant7Id), TypeInfoPropertyName = "MessagesRequestPluginsItemsVariant7Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant8))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant8Id), TypeInfoPropertyName = "MessagesRequestPluginsItemsVariant8Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant9))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant10))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsDiscriminatorId), TypeInfoPropertyName = "MessagesRequestPluginsItemsDiscriminatorId2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestSystem), TypeInfoPropertyName = "MessagesRequestSystem2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicThinkingDisplay), TypeInfoPropertyName = "AnthropicThinkingDisplay2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestThinkingOneOf0Type), TypeInfoPropertyName = "MessagesRequestThinkingOneOf0Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestThinking0))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestThinkingOneOf1Type), TypeInfoPropertyName = "MessagesRequestThinkingOneOf1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestThinking1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestThinkingOneOf2Type), TypeInfoPropertyName = "MessagesRequestThinkingOneOf2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestThinking2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestThinking), TypeInfoPropertyName = "MessagesRequestThinking2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf0Type), TypeInfoPropertyName = "MessagesRequestToolChoiceOneOf0Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolChoice0))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf1Type), TypeInfoPropertyName = "MessagesRequestToolChoiceOneOf1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolChoice1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf2Type), TypeInfoPropertyName = "MessagesRequestToolChoiceOneOf2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolChoice2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf3Type), TypeInfoPropertyName = "MessagesRequestToolChoiceOneOf3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolChoice3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolChoice), TypeInfoPropertyName = "MessagesRequestToolChoice2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf0InputSchema))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf0Type), TypeInfoPropertyName = "MessagesRequestToolsItemsOneOf0Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItems0))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf1Name), TypeInfoPropertyName = "MessagesRequestToolsItemsOneOf1Name2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf1Type), TypeInfoPropertyName = "MessagesRequestToolsItemsOneOf1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItems1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf2Name), TypeInfoPropertyName = "MessagesRequestToolsItemsOneOf2Name2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf2Type), TypeInfoPropertyName = "MessagesRequestToolsItemsOneOf2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItems2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf3Name), TypeInfoPropertyName = "MessagesRequestToolsItemsOneOf3Name2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf3Type), TypeInfoPropertyName = "MessagesRequestToolsItemsOneOf3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebSearchToolUserLocationType), TypeInfoPropertyName = "AnthropicWebSearchToolUserLocationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebSearchToolUserLocation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItems3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicAllowedCallersItems), TypeInfoPropertyName = "AnthropicAllowedCallersItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf4Name), TypeInfoPropertyName = "MessagesRequestToolsItemsOneOf4Name2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf4Type), TypeInfoPropertyName = "MessagesRequestToolsItemsOneOf4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItems4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf5Name), TypeInfoPropertyName = "MessagesRequestToolsItemsOneOf5Name2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf5Type), TypeInfoPropertyName = "MessagesRequestToolsItemsOneOf5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItems5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesSearchModelsServerToolType), TypeInfoPropertyName = "MessagesSearchModelsServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesSearchModelsServerTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItems12))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItems), TypeInfoPropertyName = "MessagesRequestToolsItems2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicContainer))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionOutputType), TypeInfoPropertyName = "AnthropicBashCodeExecutionOutputType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionOutput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionResultType), TypeInfoPropertyName = "AnthropicBashCodeExecutionResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionToolResultErrorErrorCode), TypeInfoPropertyName = "AnthropicBashCodeExecutionToolResultErrorErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionToolResultErrorType), TypeInfoPropertyName = "AnthropicBashCodeExecutionToolResultErrorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionContent), TypeInfoPropertyName = "AnthropicBashCodeExecutionContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionContentVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionContentVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionContentDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionContentDiscriminatorType), TypeInfoPropertyName = "AnthropicBashCodeExecutionContentDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionOutputType), TypeInfoPropertyName = "AnthropicCodeExecutionOutputType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionOutput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionResultType), TypeInfoPropertyName = "AnthropicCodeExecutionResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicServerToolErrorCode), TypeInfoPropertyName = "AnthropicServerToolErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionToolResultErrorType), TypeInfoPropertyName = "AnthropicCodeExecutionToolResultErrorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicEncryptedCodeExecutionResultType), TypeInfoPropertyName = "AnthropicEncryptedCodeExecutionResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionContent), TypeInfoPropertyName = "AnthropicCodeExecutionContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionContentVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionContentVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionContentVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionContentDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionContentDiscriminatorType), TypeInfoPropertyName = "AnthropicCodeExecutionContentDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicNullableCaller), TypeInfoPropertyName = "OrAnthropicNullableCaller2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicNullableCallerVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicNullableCallerVariant1Type), TypeInfoPropertyName = "OrAnthropicNullableCallerVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicNullableCallerVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicNullableCallerVariant2Type), TypeInfoPropertyName = "OrAnthropicNullableCallerVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicNullableCallerVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicNullableCallerVariant3Type), TypeInfoPropertyName = "OrAnthropicNullableCallerVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicNullableCallerDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicNullableCallerDiscriminatorType), TypeInfoPropertyName = "OrAnthropicNullableCallerDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicServerToolUseBlockType), TypeInfoPropertyName = "OrAnthropicServerToolUseBlockType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitation), TypeInfoPropertyName = "AnthropicTextCitation2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant1Type), TypeInfoPropertyName = "AnthropicTextCitationVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant2Type), TypeInfoPropertyName = "AnthropicTextCitationVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant3Type), TypeInfoPropertyName = "AnthropicTextCitationVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant4Type), TypeInfoPropertyName = "AnthropicTextCitationVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant5Type), TypeInfoPropertyName = "AnthropicTextCitationVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationDiscriminatorType), TypeInfoPropertyName = "AnthropicTextCitationDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionCreateResultType), TypeInfoPropertyName = "AnthropicTextEditorCodeExecutionCreateResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionStrReplaceResultType), TypeInfoPropertyName = "AnthropicTextEditorCodeExecutionStrReplaceResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionToolResultErrorErrorCode), TypeInfoPropertyName = "AnthropicTextEditorCodeExecutionToolResultErrorErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionToolResultErrorType), TypeInfoPropertyName = "AnthropicTextEditorCodeExecutionToolResultErrorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionViewResultFileType), TypeInfoPropertyName = "AnthropicTextEditorCodeExecutionViewResultFileType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionViewResultType), TypeInfoPropertyName = "AnthropicTextEditorCodeExecutionViewResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContent), TypeInfoPropertyName = "AnthropicTextEditorCodeExecutionContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentDiscriminatorType), TypeInfoPropertyName = "AnthropicTextEditorCodeExecutionContentDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolSearchResultErrorType), TypeInfoPropertyName = "AnthropicToolSearchResultErrorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolReferenceType), TypeInfoPropertyName = "AnthropicToolReferenceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolReference))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolSearchResultType), TypeInfoPropertyName = "AnthropicToolSearchResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolSearchContent), TypeInfoPropertyName = "AnthropicToolSearchContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolSearchContentVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolSearchContentVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolSearchContentDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolSearchContentDiscriminatorType), TypeInfoPropertyName = "AnthropicToolSearchContentDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCaller), TypeInfoPropertyName = "AnthropicCaller2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCallerVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCallerVariant1Type), TypeInfoPropertyName = "AnthropicCallerVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCallerVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCallerVariant2Type), TypeInfoPropertyName = "AnthropicCallerVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCallerVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCallerVariant3Type), TypeInfoPropertyName = "AnthropicCallerVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCallerDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCallerDiscriminatorType), TypeInfoPropertyName = "AnthropicCallerDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCitationsConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockSource), TypeInfoPropertyName = "AnthropicDocumentBlockSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockType), TypeInfoPropertyName = "AnthropicDocumentBlockType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlock))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebFetchToolResultErrorErrorCode), TypeInfoPropertyName = "AnthropicWebFetchToolResultErrorErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebFetchToolResultErrorType), TypeInfoPropertyName = "AnthropicWebFetchToolResultErrorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebFetchContent), TypeInfoPropertyName = "AnthropicWebFetchContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebFetchContentVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebFetchContentVariant1Type), TypeInfoPropertyName = "AnthropicWebFetchContentVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebFetchContentVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebFetchContentDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebFetchContentDiscriminatorType), TypeInfoPropertyName = "AnthropicWebFetchContentDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebSearchResultType), TypeInfoPropertyName = "AnthropicWebSearchResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebSearchResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebSearchToolResultErrorErrorCode), TypeInfoPropertyName = "AnthropicWebSearchToolResultErrorErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebSearchToolResultErrorType), TypeInfoPropertyName = "AnthropicWebSearchToolResultErrorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebSearchToolResultError))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent), TypeInfoPropertyName = "OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlock), TypeInfoPropertyName = "ORAnthropicContentBlock2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant1Type), TypeInfoPropertyName = "ORAnthropicContentBlockVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant2Type), TypeInfoPropertyName = "ORAnthropicContentBlockVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant3Type), TypeInfoPropertyName = "ORAnthropicContentBlockVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant4Type), TypeInfoPropertyName = "ORAnthropicContentBlockVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant5Type), TypeInfoPropertyName = "ORAnthropicContentBlockVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant6))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant6Type), TypeInfoPropertyName = "ORAnthropicContentBlockVariant6Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant7))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant8))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant8Type), TypeInfoPropertyName = "ORAnthropicContentBlockVariant8Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant9))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant9Type), TypeInfoPropertyName = "ORAnthropicContentBlockVariant9Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant10))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant10Type), TypeInfoPropertyName = "ORAnthropicContentBlockVariant10Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant11))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant11Type), TypeInfoPropertyName = "ORAnthropicContentBlockVariant11Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant12))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant12Type), TypeInfoPropertyName = "ORAnthropicContentBlockVariant12Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant13))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant13Type), TypeInfoPropertyName = "ORAnthropicContentBlockVariant13Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant14))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant14Type), TypeInfoPropertyName = "ORAnthropicContentBlockVariant14Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockDiscriminatorType), TypeInfoPropertyName = "ORAnthropicContentBlockDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesResultRole), TypeInfoPropertyName = "MessagesResultRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicRefusalStopDetailsCategory), TypeInfoPropertyName = "AnthropicRefusalStopDetailsCategory2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicRefusalStopDetailsType), TypeInfoPropertyName = "AnthropicRefusalStopDetailsType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicRefusalStopDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicStopReason), TypeInfoPropertyName = "ORAnthropicStopReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesResultType), TypeInfoPropertyName = "MessagesResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicOutputTokensDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicServerToolUsage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicServiceTier), TypeInfoPropertyName = "AnthropicServiceTier2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesResultUsage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesResultContextManagementAppliedEditsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesResultContextManagement))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesErrorResponseType), TypeInfoPropertyName = "MessagesErrorResponseType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesErrorResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MetadataLevel?), TypeInfoPropertyName = "NullableMetadataLevel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCacheControlTtl?), TypeInfoPropertyName = "NullableAnthropicCacheControlTtl2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCacheControlDirectiveType?), TypeInfoPropertyName = "NullableAnthropicCacheControlDirectiveType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchEngineEnum?), TypeInfoPropertyName = "NullableWebSearchEngineEnum2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatetimeServerToolType?), TypeInfoPropertyName = "NullableDatetimeServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationServerToolOpenRouterType?), TypeInfoPropertyName = "NullableImageGenerationServerToolOpenRouterType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchEngineEnum?), TypeInfoPropertyName = "NullableWebFetchEngineEnum2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchServerToolType?), TypeInfoPropertyName = "NullableWebFetchServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SearchQualityLevel?), TypeInfoPropertyName = "NullableSearchQualityLevel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchUserLocationServerToolType?), TypeInfoPropertyName = "NullableWebSearchUserLocationServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEngine?), TypeInfoPropertyName = "NullableBashServerToolEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironment?), TypeInfoPropertyName = "NullableBashServerToolEnvironment2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentVariant1Type?), TypeInfoPropertyName = "NullableBashServerToolEnvironmentVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentVariant2Type?), TypeInfoPropertyName = "NullableBashServerToolEnvironmentVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentDiscriminatorType?), TypeInfoPropertyName = "NullableBashServerToolEnvironmentDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolType?), TypeInfoPropertyName = "NullableBashServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContextCompressionEngine?), TypeInfoPropertyName = "NullableContextCompressionEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PdfParserEngine0?), TypeInfoPropertyName = "NullablePdfParserEngine02")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PdfParserEngine1?), TypeInfoPropertyName = "NullablePdfParserEngine12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PDFParserEngine?), TypeInfoPropertyName = "NullablePDFParserEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset?), TypeInfoPropertyName = "NullableResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4?), TypeInfoPropertyName = "NullableResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf42")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters?), TypeInfoPropertyName = "NullableResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource?), TypeInfoPropertyName = "NullableResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchEngine?), TypeInfoPropertyName = "NullableWebSearchEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchPluginId?), TypeInfoPropertyName = "NullableWebSearchPluginId2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchPluginUserLocationType?), TypeInfoPropertyName = "NullableWebSearchPluginUserLocationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchPluginId?), TypeInfoPropertyName = "NullableWebFetchPluginId2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesDataCollection?), TypeInfoPropertyName = "NullableProviderPreferencesDataCollection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderName?), TypeInfoPropertyName = "NullableProviderName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesIgnoreItems?), TypeInfoPropertyName = "NullableProviderPreferencesIgnoreItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesOnlyItems?), TypeInfoPropertyName = "NullableProviderPreferencesOnlyItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesOrderItems?), TypeInfoPropertyName = "NullableProviderPreferencesOrderItems2")] + internal sealed partial class AnthropicMessagesSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMaxLatency?), TypeInfoPropertyName = "NullablePreferredMaxLatency2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMinThroughput?), TypeInfoPropertyName = "NullablePreferredMinThroughput2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Quantization?), TypeInfoPropertyName = "NullableQuantization2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSort?), TypeInfoPropertyName = "NullableProviderSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigBy?), TypeInfoPropertyName = "NullableProviderSortConfigBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigPartition?), TypeInfoPropertyName = "NullableProviderSortConfigPartition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesSort?), TypeInfoPropertyName = "NullableProviderPreferencesSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenFinishReasonIsType?), TypeInfoPropertyName = "NullableStopServerToolsWhenFinishReasonIsType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenHasToolCallType?), TypeInfoPropertyName = "NullableStopServerToolsWhenHasToolCallType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenMaxCostType?), TypeInfoPropertyName = "NullableStopServerToolsWhenMaxCostType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenMaxTokensUsedType?), TypeInfoPropertyName = "NullableStopServerToolsWhenMaxTokensUsedType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenStepCountIsType?), TypeInfoPropertyName = "NullableStopServerToolsWhenStepCountIsType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenCondition?), TypeInfoPropertyName = "NullableStopServerToolsWhenCondition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionDiscriminatorType?), TypeInfoPropertyName = "NullableStopServerToolsWhenConditionDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ApiErrorType?), TypeInfoPropertyName = "NullableApiErrorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PipelineStageType?), TypeInfoPropertyName = "NullablePipelineStageType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RoutingStrategy?), TypeInfoPropertyName = "NullableRoutingStrategy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCompactionUsageIterationType?), TypeInfoPropertyName = "NullableAnthropicCompactionUsageIterationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicMessageUsageIterationType?), TypeInfoPropertyName = "NullableAnthropicMessageUsageIterationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIterationType?), TypeInfoPropertyName = "NullableAnthropicAdvisorMessageUsageIterationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicUsageIteration?), TypeInfoPropertyName = "NullableAnthropicUsageIteration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicSpeed?), TypeInfoPropertyName = "NullableAnthropicSpeed2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OpenRouterWebSearchServerToolType?), TypeInfoPropertyName = "NullableOpenRouterWebSearchServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicInputTokensClearAtLeastType?), TypeInfoPropertyName = "NullableAnthropicInputTokensClearAtLeastType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputs?), TypeInfoPropertyName = "NullableMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputs2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolUsesKeepType?), TypeInfoPropertyName = "NullableAnthropicToolUsesKeepType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0Trigger?), TypeInfoPropertyName = "NullableMessagesRequestContextManagementEditsItemsOneOf0Trigger2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1Type?), TypeInfoPropertyName = "NullableMessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2Type?), TypeInfoPropertyName = "NullableMessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerDiscriminatorType?), TypeInfoPropertyName = "NullableMessagesRequestContextManagementEditsItemsOneOf0TriggerDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0Type?), TypeInfoPropertyName = "NullableMessagesRequestContextManagementEditsItemsOneOf0Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicThinkingTurnsType?), TypeInfoPropertyName = "NullableAnthropicThinkingTurnsType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1KeepOneOf1Type?), TypeInfoPropertyName = "NullableMessagesRequestContextManagementEditsItemsOneOf1KeepOneOf1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep2?), TypeInfoPropertyName = "NullableMessagesRequestContextManagementEditsItemsOneOf1Keep22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep?), TypeInfoPropertyName = "NullableMessagesRequestContextManagementEditsItemsOneOf1Keep2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Type?), TypeInfoPropertyName = "NullableMessagesRequestContextManagementEditsItemsOneOf1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf2Type?), TypeInfoPropertyName = "NullableMessagesRequestContextManagementEditsItemsOneOf2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItems?), TypeInfoPropertyName = "NullableMessagesRequestContextManagementEditsItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItems?), TypeInfoPropertyName = "NullableAnthropicTextBlockParamCitationsItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant1Type?), TypeInfoPropertyName = "NullableAnthropicTextBlockParamCitationsItemsVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant2Type?), TypeInfoPropertyName = "NullableAnthropicTextBlockParamCitationsItemsVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant3Type?), TypeInfoPropertyName = "NullableAnthropicTextBlockParamCitationsItemsVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant4Type?), TypeInfoPropertyName = "NullableAnthropicTextBlockParamCitationsItemsVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant5Type?), TypeInfoPropertyName = "NullableAnthropicTextBlockParamCitationsItemsVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsDiscriminatorType?), TypeInfoPropertyName = "NullableAnthropicTextBlockParamCitationsItemsDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextBlockParamType?), TypeInfoPropertyName = "NullableAnthropicTextBlockParamType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicImageMimeType?), TypeInfoPropertyName = "NullableAnthropicImageMimeType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicUrlImageSourceType?), TypeInfoPropertyName = "NullableAnthropicUrlImageSourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicImageBlockParamSource?), TypeInfoPropertyName = "NullableAnthropicImageBlockParamSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicImageBlockParamSourceVariant1Type?), TypeInfoPropertyName = "NullableAnthropicImageBlockParamSourceVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicImageBlockParamSourceDiscriminatorType?), TypeInfoPropertyName = "NullableAnthropicImageBlockParamSourceDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicImageBlockParamType?), TypeInfoPropertyName = "NullableAnthropicImageBlockParamType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBase64PdfSourceMediaType?), TypeInfoPropertyName = "NullableAnthropicBase64PdfSourceMediaType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBase64PdfSourceType?), TypeInfoPropertyName = "NullableAnthropicBase64PdfSourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicPlainTextSourceMediaType?), TypeInfoPropertyName = "NullableAnthropicPlainTextSourceMediaType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicPlainTextSourceType?), TypeInfoPropertyName = "NullableAnthropicPlainTextSourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1Items?), TypeInfoPropertyName = "NullableAnthropicDocumentBlockParamSourceOneOf2ContentOneOf1Items2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsDiscriminatorType?), TypeInfoPropertyName = "NullableAnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2Content?), TypeInfoPropertyName = "NullableAnthropicDocumentBlockParamSourceOneOf2Content2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2Type?), TypeInfoPropertyName = "NullableAnthropicDocumentBlockParamSourceOneOf2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicUrlPdfSourceType?), TypeInfoPropertyName = "NullableAnthropicUrlPdfSourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicFileDocumentSourceType?), TypeInfoPropertyName = "NullableAnthropicFileDocumentSourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamSource?), TypeInfoPropertyName = "NullableAnthropicDocumentBlockParamSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockParamType?), TypeInfoPropertyName = "NullableAnthropicDocumentBlockParamType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf3Type?), TypeInfoPropertyName = "NullableMessagesMessageParamContentOneOf1ItemsOneOf3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf2Type?), TypeInfoPropertyName = "NullableMessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicSearchResultBlockParamType?), TypeInfoPropertyName = "NullableAnthropicSearchResultBlockParamType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items?), TypeInfoPropertyName = "NullableMessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4Content?), TypeInfoPropertyName = "NullableMessagesMessageParamContentOneOf1ItemsOneOf4Content2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4Type?), TypeInfoPropertyName = "NullableMessagesMessageParamContentOneOf1ItemsOneOf4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf5Type?), TypeInfoPropertyName = "NullableMessagesMessageParamContentOneOf1ItemsOneOf5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf6Type?), TypeInfoPropertyName = "NullableMessagesMessageParamContentOneOf1ItemsOneOf6Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf7Type?), TypeInfoPropertyName = "NullableMessagesMessageParamContentOneOf1ItemsOneOf7Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebSearchResultBlockParamType?), TypeInfoPropertyName = "NullableAnthropicWebSearchResultBlockParamType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1ErrorCode?), TypeInfoPropertyName = "NullableMessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1Type?), TypeInfoPropertyName = "NullableMessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8Content?), TypeInfoPropertyName = "NullableMessagesMessageParamContentOneOf1ItemsOneOf8Content2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8Type?), TypeInfoPropertyName = "NullableMessagesMessageParamContentOneOf1ItemsOneOf8Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf10Type?), TypeInfoPropertyName = "NullableMessagesMessageParamContentOneOf1ItemsOneOf10Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesAdvisorToolResultBlockType?), TypeInfoPropertyName = "NullableMessagesAdvisorToolResultBlockType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items?), TypeInfoPropertyName = "NullableMessagesMessageParamContentOneOf1Items2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamContent?), TypeInfoPropertyName = "NullableMessagesMessageParamContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesMessageParamRole?), TypeInfoPropertyName = "NullableMessagesMessageParamRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesOutputConfigEffort?), TypeInfoPropertyName = "NullableMessagesOutputConfigEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesOutputConfigFormatType?), TypeInfoPropertyName = "NullableMessagesOutputConfigFormatType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesOutputConfigTaskBudgetType?), TypeInfoPropertyName = "NullableMessagesOutputConfigTaskBudgetType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItems?), TypeInfoPropertyName = "NullableMessagesRequestPluginsItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant1Id?), TypeInfoPropertyName = "NullableMessagesRequestPluginsItemsVariant1Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant2Id?), TypeInfoPropertyName = "NullableMessagesRequestPluginsItemsVariant2Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant3Id?), TypeInfoPropertyName = "NullableMessagesRequestPluginsItemsVariant3Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant4Id?), TypeInfoPropertyName = "NullableMessagesRequestPluginsItemsVariant4Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant5Id?), TypeInfoPropertyName = "NullableMessagesRequestPluginsItemsVariant5Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant6Id?), TypeInfoPropertyName = "NullableMessagesRequestPluginsItemsVariant6Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant7Id?), TypeInfoPropertyName = "NullableMessagesRequestPluginsItemsVariant7Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant8Id?), TypeInfoPropertyName = "NullableMessagesRequestPluginsItemsVariant8Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestPluginsItemsDiscriminatorId?), TypeInfoPropertyName = "NullableMessagesRequestPluginsItemsDiscriminatorId2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestSystem?), TypeInfoPropertyName = "NullableMessagesRequestSystem2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicThinkingDisplay?), TypeInfoPropertyName = "NullableAnthropicThinkingDisplay2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestThinkingOneOf0Type?), TypeInfoPropertyName = "NullableMessagesRequestThinkingOneOf0Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestThinkingOneOf1Type?), TypeInfoPropertyName = "NullableMessagesRequestThinkingOneOf1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestThinkingOneOf2Type?), TypeInfoPropertyName = "NullableMessagesRequestThinkingOneOf2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestThinking?), TypeInfoPropertyName = "NullableMessagesRequestThinking2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf0Type?), TypeInfoPropertyName = "NullableMessagesRequestToolChoiceOneOf0Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf1Type?), TypeInfoPropertyName = "NullableMessagesRequestToolChoiceOneOf1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf2Type?), TypeInfoPropertyName = "NullableMessagesRequestToolChoiceOneOf2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf3Type?), TypeInfoPropertyName = "NullableMessagesRequestToolChoiceOneOf3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolChoice?), TypeInfoPropertyName = "NullableMessagesRequestToolChoice2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf0Type?), TypeInfoPropertyName = "NullableMessagesRequestToolsItemsOneOf0Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf1Name?), TypeInfoPropertyName = "NullableMessagesRequestToolsItemsOneOf1Name2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf1Type?), TypeInfoPropertyName = "NullableMessagesRequestToolsItemsOneOf1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf2Name?), TypeInfoPropertyName = "NullableMessagesRequestToolsItemsOneOf2Name2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf2Type?), TypeInfoPropertyName = "NullableMessagesRequestToolsItemsOneOf2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf3Name?), TypeInfoPropertyName = "NullableMessagesRequestToolsItemsOneOf3Name2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf3Type?), TypeInfoPropertyName = "NullableMessagesRequestToolsItemsOneOf3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebSearchToolUserLocationType?), TypeInfoPropertyName = "NullableAnthropicWebSearchToolUserLocationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicAllowedCallersItems?), TypeInfoPropertyName = "NullableAnthropicAllowedCallersItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf4Name?), TypeInfoPropertyName = "NullableMessagesRequestToolsItemsOneOf4Name2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf4Type?), TypeInfoPropertyName = "NullableMessagesRequestToolsItemsOneOf4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf5Name?), TypeInfoPropertyName = "NullableMessagesRequestToolsItemsOneOf5Name2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf5Type?), TypeInfoPropertyName = "NullableMessagesRequestToolsItemsOneOf5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesSearchModelsServerToolType?), TypeInfoPropertyName = "NullableMessagesSearchModelsServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesRequestToolsItems?), TypeInfoPropertyName = "NullableMessagesRequestToolsItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionOutputType?), TypeInfoPropertyName = "NullableAnthropicBashCodeExecutionOutputType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionResultType?), TypeInfoPropertyName = "NullableAnthropicBashCodeExecutionResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionToolResultErrorErrorCode?), TypeInfoPropertyName = "NullableAnthropicBashCodeExecutionToolResultErrorErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionToolResultErrorType?), TypeInfoPropertyName = "NullableAnthropicBashCodeExecutionToolResultErrorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionContent?), TypeInfoPropertyName = "NullableAnthropicBashCodeExecutionContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicBashCodeExecutionContentDiscriminatorType?), TypeInfoPropertyName = "NullableAnthropicBashCodeExecutionContentDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionOutputType?), TypeInfoPropertyName = "NullableAnthropicCodeExecutionOutputType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionResultType?), TypeInfoPropertyName = "NullableAnthropicCodeExecutionResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicServerToolErrorCode?), TypeInfoPropertyName = "NullableAnthropicServerToolErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionToolResultErrorType?), TypeInfoPropertyName = "NullableAnthropicCodeExecutionToolResultErrorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicEncryptedCodeExecutionResultType?), TypeInfoPropertyName = "NullableAnthropicEncryptedCodeExecutionResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionContent?), TypeInfoPropertyName = "NullableAnthropicCodeExecutionContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCodeExecutionContentDiscriminatorType?), TypeInfoPropertyName = "NullableAnthropicCodeExecutionContentDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicNullableCaller?), TypeInfoPropertyName = "NullableOrAnthropicNullableCaller2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicNullableCallerVariant1Type?), TypeInfoPropertyName = "NullableOrAnthropicNullableCallerVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicNullableCallerVariant2Type?), TypeInfoPropertyName = "NullableOrAnthropicNullableCallerVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicNullableCallerVariant3Type?), TypeInfoPropertyName = "NullableOrAnthropicNullableCallerVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicNullableCallerDiscriminatorType?), TypeInfoPropertyName = "NullableOrAnthropicNullableCallerDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicServerToolUseBlockType?), TypeInfoPropertyName = "NullableOrAnthropicServerToolUseBlockType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitation?), TypeInfoPropertyName = "NullableAnthropicTextCitation2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant1Type?), TypeInfoPropertyName = "NullableAnthropicTextCitationVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant2Type?), TypeInfoPropertyName = "NullableAnthropicTextCitationVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant3Type?), TypeInfoPropertyName = "NullableAnthropicTextCitationVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant4Type?), TypeInfoPropertyName = "NullableAnthropicTextCitationVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationVariant5Type?), TypeInfoPropertyName = "NullableAnthropicTextCitationVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextCitationDiscriminatorType?), TypeInfoPropertyName = "NullableAnthropicTextCitationDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionCreateResultType?), TypeInfoPropertyName = "NullableAnthropicTextEditorCodeExecutionCreateResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionStrReplaceResultType?), TypeInfoPropertyName = "NullableAnthropicTextEditorCodeExecutionStrReplaceResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionToolResultErrorErrorCode?), TypeInfoPropertyName = "NullableAnthropicTextEditorCodeExecutionToolResultErrorErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionToolResultErrorType?), TypeInfoPropertyName = "NullableAnthropicTextEditorCodeExecutionToolResultErrorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionViewResultFileType?), TypeInfoPropertyName = "NullableAnthropicTextEditorCodeExecutionViewResultFileType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionViewResultType?), TypeInfoPropertyName = "NullableAnthropicTextEditorCodeExecutionViewResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContent?), TypeInfoPropertyName = "NullableAnthropicTextEditorCodeExecutionContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentDiscriminatorType?), TypeInfoPropertyName = "NullableAnthropicTextEditorCodeExecutionContentDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolSearchResultErrorType?), TypeInfoPropertyName = "NullableAnthropicToolSearchResultErrorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolReferenceType?), TypeInfoPropertyName = "NullableAnthropicToolReferenceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolSearchResultType?), TypeInfoPropertyName = "NullableAnthropicToolSearchResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolSearchContent?), TypeInfoPropertyName = "NullableAnthropicToolSearchContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicToolSearchContentDiscriminatorType?), TypeInfoPropertyName = "NullableAnthropicToolSearchContentDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCaller?), TypeInfoPropertyName = "NullableAnthropicCaller2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCallerVariant1Type?), TypeInfoPropertyName = "NullableAnthropicCallerVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCallerVariant2Type?), TypeInfoPropertyName = "NullableAnthropicCallerVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCallerVariant3Type?), TypeInfoPropertyName = "NullableAnthropicCallerVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCallerDiscriminatorType?), TypeInfoPropertyName = "NullableAnthropicCallerDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockSource?), TypeInfoPropertyName = "NullableAnthropicDocumentBlockSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicDocumentBlockType?), TypeInfoPropertyName = "NullableAnthropicDocumentBlockType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebFetchToolResultErrorErrorCode?), TypeInfoPropertyName = "NullableAnthropicWebFetchToolResultErrorErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebFetchToolResultErrorType?), TypeInfoPropertyName = "NullableAnthropicWebFetchToolResultErrorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebFetchContent?), TypeInfoPropertyName = "NullableAnthropicWebFetchContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebFetchContentVariant1Type?), TypeInfoPropertyName = "NullableAnthropicWebFetchContentVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebFetchContentDiscriminatorType?), TypeInfoPropertyName = "NullableAnthropicWebFetchContentDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebSearchResultType?), TypeInfoPropertyName = "NullableAnthropicWebSearchResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebSearchToolResultErrorErrorCode?), TypeInfoPropertyName = "NullableAnthropicWebSearchToolResultErrorErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicWebSearchToolResultErrorType?), TypeInfoPropertyName = "NullableAnthropicWebSearchToolResultErrorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent?), TypeInfoPropertyName = "NullableOrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlock?), TypeInfoPropertyName = "NullableORAnthropicContentBlock2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant1Type?), TypeInfoPropertyName = "NullableORAnthropicContentBlockVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant2Type?), TypeInfoPropertyName = "NullableORAnthropicContentBlockVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant3Type?), TypeInfoPropertyName = "NullableORAnthropicContentBlockVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant4Type?), TypeInfoPropertyName = "NullableORAnthropicContentBlockVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant5Type?), TypeInfoPropertyName = "NullableORAnthropicContentBlockVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant6Type?), TypeInfoPropertyName = "NullableORAnthropicContentBlockVariant6Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant8Type?), TypeInfoPropertyName = "NullableORAnthropicContentBlockVariant8Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant9Type?), TypeInfoPropertyName = "NullableORAnthropicContentBlockVariant9Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant10Type?), TypeInfoPropertyName = "NullableORAnthropicContentBlockVariant10Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant11Type?), TypeInfoPropertyName = "NullableORAnthropicContentBlockVariant11Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant12Type?), TypeInfoPropertyName = "NullableORAnthropicContentBlockVariant12Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant13Type?), TypeInfoPropertyName = "NullableORAnthropicContentBlockVariant13Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockVariant14Type?), TypeInfoPropertyName = "NullableORAnthropicContentBlockVariant14Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicContentBlockDiscriminatorType?), TypeInfoPropertyName = "NullableORAnthropicContentBlockDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesResultRole?), TypeInfoPropertyName = "NullableMessagesResultRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicRefusalStopDetailsCategory?), TypeInfoPropertyName = "NullableAnthropicRefusalStopDetailsCategory2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicRefusalStopDetailsType?), TypeInfoPropertyName = "NullableAnthropicRefusalStopDetailsType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ORAnthropicStopReason?), TypeInfoPropertyName = "NullableORAnthropicStopReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesResultType?), TypeInfoPropertyName = "NullableMessagesResultType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicServiceTier?), TypeInfoPropertyName = "NullableAnthropicServiceTier2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MessagesErrorResponseType?), TypeInfoPropertyName = "NullableMessagesErrorResponseType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class AnthropicMessagesSourceGenerationContextChunk1 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class AnthropicMessagesSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static AnthropicMessagesSourceGenerationContext Default { get; } = new(DefaultOptions); + + private AnthropicMessagesSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.BashServerToolEnvironmentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.PDFParserEngineJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4JsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ProviderPreferencesIgnoreItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ProviderPreferencesOnlyItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ProviderPreferencesOrderItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.PreferredMaxLatencyJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.PreferredMinThroughputJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ProviderPreferencesSortJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.StopServerToolsWhenConditionJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicUsageIterationJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0TriggerJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf1KeepJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicImageBlockParamSourceJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceOneOf2ContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf4ContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf8ContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.MessagesMessageParamContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.MessagesRequestSystemJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.MessagesRequestThinkingJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.MessagesRequestToolChoiceJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicBashCodeExecutionContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicCodeExecutionContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.OrAnthropicNullableCallerJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicTextCitationJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicToolSearchContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicCallerJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicDocumentBlockSourceJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicWebFetchContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ORAnthropicContentBlockJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.MetadataLevel) + + || typeToConvert == typeof(global::OpenRouter.MetadataLevel?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlTtl) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlTtl?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlDirectiveType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlDirectiveType?) + + || typeToConvert == typeof(global::OpenRouter.WebSearchEngineEnum) + + || typeToConvert == typeof(global::OpenRouter.WebSearchEngineEnum?) + + || typeToConvert == typeof(global::OpenRouter.DatetimeServerToolType) + + || typeToConvert == typeof(global::OpenRouter.DatetimeServerToolType?) + + || typeToConvert == typeof(global::OpenRouter.ImageGenerationServerToolOpenRouterType) + + || typeToConvert == typeof(global::OpenRouter.ImageGenerationServerToolOpenRouterType?) + + || typeToConvert == typeof(global::OpenRouter.WebFetchEngineEnum) + + || typeToConvert == typeof(global::OpenRouter.WebFetchEngineEnum?) + + || typeToConvert == typeof(global::OpenRouter.WebFetchServerToolType) + + || typeToConvert == typeof(global::OpenRouter.WebFetchServerToolType?) + + || typeToConvert == typeof(global::OpenRouter.SearchQualityLevel) + + || typeToConvert == typeof(global::OpenRouter.SearchQualityLevel?) + + || typeToConvert == typeof(global::OpenRouter.WebSearchUserLocationServerToolType) + + || typeToConvert == typeof(global::OpenRouter.WebSearchUserLocationServerToolType?) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEngine) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEngine?) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolType) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolType?) + + || typeToConvert == typeof(global::OpenRouter.ContextCompressionEngine) + + || typeToConvert == typeof(global::OpenRouter.ContextCompressionEngine?) + + || typeToConvert == typeof(global::OpenRouter.PdfParserEngine0) + + || typeToConvert == typeof(global::OpenRouter.PdfParserEngine0?) + + || typeToConvert == typeof(global::OpenRouter.PdfParserEngine1) + + || typeToConvert == typeof(global::OpenRouter.PdfParserEngine1?) + + || typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset) + + || typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset?) + + || typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource) + + || typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource?) + + || typeToConvert == typeof(global::OpenRouter.WebSearchEngine) + + || typeToConvert == typeof(global::OpenRouter.WebSearchEngine?) + + || typeToConvert == typeof(global::OpenRouter.WebSearchPluginId) + + || typeToConvert == typeof(global::OpenRouter.WebSearchPluginId?) + + || typeToConvert == typeof(global::OpenRouter.WebSearchPluginUserLocationType) + + || typeToConvert == typeof(global::OpenRouter.WebSearchPluginUserLocationType?) + + || typeToConvert == typeof(global::OpenRouter.WebFetchPluginId) + + || typeToConvert == typeof(global::OpenRouter.WebFetchPluginId?) + + || typeToConvert == typeof(global::OpenRouter.ProviderPreferencesDataCollection) + + || typeToConvert == typeof(global::OpenRouter.ProviderPreferencesDataCollection?) + + || typeToConvert == typeof(global::OpenRouter.ProviderName) + + || typeToConvert == typeof(global::OpenRouter.ProviderName?) + + || typeToConvert == typeof(global::OpenRouter.Quantization) + + || typeToConvert == typeof(global::OpenRouter.Quantization?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSort) + + || typeToConvert == typeof(global::OpenRouter.ProviderSort?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition?) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenFinishReasonIsType) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenFinishReasonIsType?) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenHasToolCallType) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenHasToolCallType?) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxCostType) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxCostType?) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxTokensUsedType) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxTokensUsedType?) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenStepCountIsType) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenStepCountIsType?) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenConditionDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenConditionDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.ApiErrorType) + + || typeToConvert == typeof(global::OpenRouter.ApiErrorType?) + + || typeToConvert == typeof(global::OpenRouter.PipelineStageType) + + || typeToConvert == typeof(global::OpenRouter.PipelineStageType?) + + || typeToConvert == typeof(global::OpenRouter.RoutingStrategy) + + || typeToConvert == typeof(global::OpenRouter.RoutingStrategy?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCompactionUsageIterationType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCompactionUsageIterationType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicMessageUsageIterationType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicMessageUsageIterationType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIterationType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIterationType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicSpeed) + + || typeToConvert == typeof(global::OpenRouter.AnthropicSpeed?) + + || typeToConvert == typeof(global::OpenRouter.OpenRouterWebSearchServerToolType) + + || typeToConvert == typeof(global::OpenRouter.OpenRouterWebSearchServerToolType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicInputTokensClearAtLeastType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicInputTokensClearAtLeastType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicToolUsesKeepType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicToolUsesKeepType?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicThinkingTurnsType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicThinkingTurnsType?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1KeepOneOf1Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1KeepOneOf1Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep2) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep2?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf2Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf2Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant3Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant3Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant4Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant4Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant5Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant5Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicImageMimeType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicImageMimeType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicUrlImageSourceType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicUrlImageSourceType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicImageBlockParamSourceVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicImageBlockParamSourceVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicImageBlockParamSourceDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicImageBlockParamSourceDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicImageBlockParamType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicImageBlockParamType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicBase64PdfSourceMediaType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicBase64PdfSourceMediaType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicBase64PdfSourceType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicBase64PdfSourceType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicPlainTextSourceMediaType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicPlainTextSourceMediaType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicPlainTextSourceType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicPlainTextSourceType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicUrlPdfSourceType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicUrlPdfSourceType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicFileDocumentSourceType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicFileDocumentSourceType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockParamType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockParamType?) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf3Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf3Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf2Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf2Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicSearchResultBlockParamType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicSearchResultBlockParamType?) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf5Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf5Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf6Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf6Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf7Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf7Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchResultBlockParamType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchResultBlockParamType?) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1ErrorCode) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1ErrorCode?) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf10Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf10Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesAdvisorToolResultBlockType) + + || typeToConvert == typeof(global::OpenRouter.MessagesAdvisorToolResultBlockType?) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamRole) + + || typeToConvert == typeof(global::OpenRouter.MessagesMessageParamRole?) + + || typeToConvert == typeof(global::OpenRouter.MessagesOutputConfigEffort) + + || typeToConvert == typeof(global::OpenRouter.MessagesOutputConfigEffort?) + + || typeToConvert == typeof(global::OpenRouter.MessagesOutputConfigFormatType) + + || typeToConvert == typeof(global::OpenRouter.MessagesOutputConfigFormatType?) + + || typeToConvert == typeof(global::OpenRouter.MessagesOutputConfigTaskBudgetType) + + || typeToConvert == typeof(global::OpenRouter.MessagesOutputConfigTaskBudgetType?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant1Id) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant1Id?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant2Id) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant2Id?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant3Id) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant3Id?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant4Id) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant4Id?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant5Id) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant5Id?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant6Id) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant6Id?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant7Id) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant7Id?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant8Id) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant8Id?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsDiscriminatorId) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsDiscriminatorId?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicThinkingDisplay) + + || typeToConvert == typeof(global::OpenRouter.AnthropicThinkingDisplay?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestThinkingOneOf0Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestThinkingOneOf0Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestThinkingOneOf1Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestThinkingOneOf1Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestThinkingOneOf2Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestThinkingOneOf2Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf0Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf0Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf1Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf1Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf2Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf2Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf3Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf3Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf0Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf0Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf1Name) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf1Name?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf1Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf1Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf2Name) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf2Name?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf2Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf2Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf3Name) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf3Name?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf3Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf3Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchToolUserLocationType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchToolUserLocationType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicAllowedCallersItems) + + || typeToConvert == typeof(global::OpenRouter.AnthropicAllowedCallersItems?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf4Name) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf4Name?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf4Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf4Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf5Name) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf5Name?) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf5Type) + + || typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf5Type?) + + || typeToConvert == typeof(global::OpenRouter.MessagesSearchModelsServerToolType) + + || typeToConvert == typeof(global::OpenRouter.MessagesSearchModelsServerToolType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionOutputType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionOutputType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionResultType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionResultType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionToolResultErrorErrorCode) + + || typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionToolResultErrorErrorCode?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionToolResultErrorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionToolResultErrorType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionContentDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionContentDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionOutputType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionOutputType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionResultType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionResultType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicServerToolErrorCode) + + || typeToConvert == typeof(global::OpenRouter.AnthropicServerToolErrorCode?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionToolResultErrorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionToolResultErrorType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicEncryptedCodeExecutionResultType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicEncryptedCodeExecutionResultType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionContentDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionContentDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerVariant3Type) + + || typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerVariant3Type?) + + || typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.OrAnthropicServerToolUseBlockType) + + || typeToConvert == typeof(global::OpenRouter.OrAnthropicServerToolUseBlockType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant3Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant3Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant4Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant4Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant5Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant5Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionCreateResultType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionCreateResultType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionStrReplaceResultType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionStrReplaceResultType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionToolResultErrorErrorCode) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionToolResultErrorErrorCode?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionToolResultErrorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionToolResultErrorType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionViewResultFileType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionViewResultFileType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionViewResultType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionViewResultType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicToolSearchResultErrorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicToolSearchResultErrorType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicToolReferenceType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicToolReferenceType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicToolSearchResultType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicToolSearchResultType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicToolSearchContentDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicToolSearchContentDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCallerVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCallerVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCallerVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCallerVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCallerVariant3Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCallerVariant3Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCallerDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCallerDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchToolResultErrorErrorCode) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchToolResultErrorErrorCode?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchToolResultErrorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchToolResultErrorType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchContentVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchContentVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchContentDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchContentDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchResultType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchResultType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchToolResultErrorErrorCode) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchToolResultErrorErrorCode?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchToolResultErrorType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchToolResultErrorType?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant3Type) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant3Type?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant4Type) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant4Type?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant5Type) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant5Type?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant6Type) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant6Type?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant8Type) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant8Type?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant9Type) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant9Type?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant10Type) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant10Type?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant11Type) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant11Type?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant12Type) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant12Type?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant13Type) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant13Type?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant14Type) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant14Type?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.MessagesResultRole) + + || typeToConvert == typeof(global::OpenRouter.MessagesResultRole?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicRefusalStopDetailsCategory) + + || typeToConvert == typeof(global::OpenRouter.AnthropicRefusalStopDetailsCategory?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicRefusalStopDetailsType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicRefusalStopDetailsType?) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicStopReason) + + || typeToConvert == typeof(global::OpenRouter.ORAnthropicStopReason?) + + || typeToConvert == typeof(global::OpenRouter.MessagesResultType) + + || typeToConvert == typeof(global::OpenRouter.MessagesResultType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicServiceTier) + + || typeToConvert == typeof(global::OpenRouter.AnthropicServiceTier?) + + || typeToConvert == typeof(global::OpenRouter.MessagesErrorResponseType) + + || typeToConvert == typeof(global::OpenRouter.MessagesErrorResponseType?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.MetadataLevel)) + { + return new global::OpenRouter.JsonConverters.MetadataLevelJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MetadataLevel?)) + { + return new global::OpenRouter.JsonConverters.MetadataLevelNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlTtl)) + { + return new global::OpenRouter.JsonConverters.AnthropicCacheControlTtlJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlTtl?)) + { + return new global::OpenRouter.JsonConverters.AnthropicCacheControlTtlNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlDirectiveType)) + { + return new global::OpenRouter.JsonConverters.AnthropicCacheControlDirectiveTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlDirectiveType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicCacheControlDirectiveTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchEngineEnum)) + { + return new global::OpenRouter.JsonConverters.WebSearchEngineEnumJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchEngineEnum?)) + { + return new global::OpenRouter.JsonConverters.WebSearchEngineEnumNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatetimeServerToolType)) + { + return new global::OpenRouter.JsonConverters.DatetimeServerToolTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatetimeServerToolType?)) + { + return new global::OpenRouter.JsonConverters.DatetimeServerToolTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageGenerationServerToolOpenRouterType)) + { + return new global::OpenRouter.JsonConverters.ImageGenerationServerToolOpenRouterTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageGenerationServerToolOpenRouterType?)) + { + return new global::OpenRouter.JsonConverters.ImageGenerationServerToolOpenRouterTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebFetchEngineEnum)) + { + return new global::OpenRouter.JsonConverters.WebFetchEngineEnumJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebFetchEngineEnum?)) + { + return new global::OpenRouter.JsonConverters.WebFetchEngineEnumNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebFetchServerToolType)) + { + return new global::OpenRouter.JsonConverters.WebFetchServerToolTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebFetchServerToolType?)) + { + return new global::OpenRouter.JsonConverters.WebFetchServerToolTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.SearchQualityLevel)) + { + return new global::OpenRouter.JsonConverters.SearchQualityLevelJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.SearchQualityLevel?)) + { + return new global::OpenRouter.JsonConverters.SearchQualityLevelNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchUserLocationServerToolType)) + { + return new global::OpenRouter.JsonConverters.WebSearchUserLocationServerToolTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchUserLocationServerToolType?)) + { + return new global::OpenRouter.JsonConverters.WebSearchUserLocationServerToolTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEngine)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEngineJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEngine?)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEngineNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant1Type)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEnvironmentVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEnvironmentVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant2Type)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEnvironmentVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEnvironmentVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEnvironmentDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEnvironmentDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolType)) + { + return new global::OpenRouter.JsonConverters.BashServerToolTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolType?)) + { + return new global::OpenRouter.JsonConverters.BashServerToolTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContextCompressionEngine)) + { + return new global::OpenRouter.JsonConverters.ContextCompressionEngineJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContextCompressionEngine?)) + { + return new global::OpenRouter.JsonConverters.ContextCompressionEngineNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PdfParserEngine0)) + { + return new global::OpenRouter.JsonConverters.PdfParserEngine0JsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PdfParserEngine0?)) + { + return new global::OpenRouter.JsonConverters.PdfParserEngine0NullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PdfParserEngine1)) + { + return new global::OpenRouter.JsonConverters.PdfParserEngine1JsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PdfParserEngine1?)) + { + return new global::OpenRouter.JsonConverters.PdfParserEngine1NullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset)) + { + return new global::OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPresetJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset?)) + { + return new global::OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPresetNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource)) + { + return new global::OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSourceJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource?)) + { + return new global::OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSourceNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchEngine)) + { + return new global::OpenRouter.JsonConverters.WebSearchEngineJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchEngine?)) + { + return new global::OpenRouter.JsonConverters.WebSearchEngineNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchPluginId)) + { + return new global::OpenRouter.JsonConverters.WebSearchPluginIdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchPluginId?)) + { + return new global::OpenRouter.JsonConverters.WebSearchPluginIdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchPluginUserLocationType)) + { + return new global::OpenRouter.JsonConverters.WebSearchPluginUserLocationTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchPluginUserLocationType?)) + { + return new global::OpenRouter.JsonConverters.WebSearchPluginUserLocationTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebFetchPluginId)) + { + return new global::OpenRouter.JsonConverters.WebFetchPluginIdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebFetchPluginId?)) + { + return new global::OpenRouter.JsonConverters.WebFetchPluginIdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderPreferencesDataCollection)) + { + return new global::OpenRouter.JsonConverters.ProviderPreferencesDataCollectionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderPreferencesDataCollection?)) + { + return new global::OpenRouter.JsonConverters.ProviderPreferencesDataCollectionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderName)) + { + return new global::OpenRouter.JsonConverters.ProviderNameJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderName?)) + { + return new global::OpenRouter.JsonConverters.ProviderNameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Quantization)) + { + return new global::OpenRouter.JsonConverters.QuantizationJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Quantization?)) + { + return new global::OpenRouter.JsonConverters.QuantizationNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSort)) + { + return new global::OpenRouter.JsonConverters.ProviderSortJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSort?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigByJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigByNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigPartitionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigPartitionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenFinishReasonIsType)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenFinishReasonIsTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenFinishReasonIsType?)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenFinishReasonIsTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenHasToolCallType)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenHasToolCallTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenHasToolCallType?)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenHasToolCallTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxCostType)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenMaxCostTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxCostType?)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenMaxCostTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxTokensUsedType)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenMaxTokensUsedTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxTokensUsedType?)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenMaxTokensUsedTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenStepCountIsType)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenStepCountIsTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenStepCountIsType?)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenStepCountIsTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenConditionDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenConditionDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenConditionDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenConditionDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ApiErrorType)) + { + return new global::OpenRouter.JsonConverters.ApiErrorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ApiErrorType?)) + { + return new global::OpenRouter.JsonConverters.ApiErrorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PipelineStageType)) + { + return new global::OpenRouter.JsonConverters.PipelineStageTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PipelineStageType?)) + { + return new global::OpenRouter.JsonConverters.PipelineStageTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.RoutingStrategy)) + { + return new global::OpenRouter.JsonConverters.RoutingStrategyJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.RoutingStrategy?)) + { + return new global::OpenRouter.JsonConverters.RoutingStrategyNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCompactionUsageIterationType)) + { + return new global::OpenRouter.JsonConverters.AnthropicCompactionUsageIterationTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCompactionUsageIterationType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicCompactionUsageIterationTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicMessageUsageIterationType)) + { + return new global::OpenRouter.JsonConverters.AnthropicMessageUsageIterationTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicMessageUsageIterationType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicMessageUsageIterationTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIterationType)) + { + return new global::OpenRouter.JsonConverters.AnthropicAdvisorMessageUsageIterationTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIterationType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicAdvisorMessageUsageIterationTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicSpeed)) + { + return new global::OpenRouter.JsonConverters.AnthropicSpeedJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicSpeed?)) + { + return new global::OpenRouter.JsonConverters.AnthropicSpeedNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OpenRouterWebSearchServerToolType)) + { + return new global::OpenRouter.JsonConverters.OpenRouterWebSearchServerToolTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OpenRouterWebSearchServerToolType?)) + { + return new global::OpenRouter.JsonConverters.OpenRouterWebSearchServerToolTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicInputTokensClearAtLeastType)) + { + return new global::OpenRouter.JsonConverters.AnthropicInputTokensClearAtLeastTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicInputTokensClearAtLeastType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicInputTokensClearAtLeastTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicToolUsesKeepType)) + { + return new global::OpenRouter.JsonConverters.AnthropicToolUsesKeepTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicToolUsesKeepType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicToolUsesKeepTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0TriggerDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0TriggerDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicThinkingTurnsType)) + { + return new global::OpenRouter.JsonConverters.AnthropicThinkingTurnsTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicThinkingTurnsType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicThinkingTurnsTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1KeepOneOf1Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf1KeepOneOf1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1KeepOneOf1Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf1KeepOneOf1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep2)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf1Keep2JsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep2?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf1Keep2NullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf2Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf2Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant1Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItemsVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItemsVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant2Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItemsVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItemsVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant3Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItemsVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant3Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItemsVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant4Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItemsVariant4TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant4Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItemsVariant4TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant5Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItemsVariant5TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant5Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItemsVariant5TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItemsDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItemsDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamType)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextBlockParamTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextBlockParamType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextBlockParamTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicImageMimeType)) + { + return new global::OpenRouter.JsonConverters.AnthropicImageMimeTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicImageMimeType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicImageMimeTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicUrlImageSourceType)) + { + return new global::OpenRouter.JsonConverters.AnthropicUrlImageSourceTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicUrlImageSourceType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicUrlImageSourceTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicImageBlockParamSourceVariant1Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicImageBlockParamSourceVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicImageBlockParamSourceVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicImageBlockParamSourceVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicImageBlockParamSourceDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicImageBlockParamSourceDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicImageBlockParamSourceDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicImageBlockParamSourceDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicImageBlockParamType)) + { + return new global::OpenRouter.JsonConverters.AnthropicImageBlockParamTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicImageBlockParamType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicImageBlockParamTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicBase64PdfSourceMediaType)) + { + return new global::OpenRouter.JsonConverters.AnthropicBase64PdfSourceMediaTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicBase64PdfSourceMediaType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicBase64PdfSourceMediaTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicBase64PdfSourceType)) + { + return new global::OpenRouter.JsonConverters.AnthropicBase64PdfSourceTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicBase64PdfSourceType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicBase64PdfSourceTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicPlainTextSourceMediaType)) + { + return new global::OpenRouter.JsonConverters.AnthropicPlainTextSourceMediaTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicPlainTextSourceMediaType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicPlainTextSourceMediaTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicPlainTextSourceType)) + { + return new global::OpenRouter.JsonConverters.AnthropicPlainTextSourceTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicPlainTextSourceType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicPlainTextSourceTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceOneOf2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceOneOf2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicUrlPdfSourceType)) + { + return new global::OpenRouter.JsonConverters.AnthropicUrlPdfSourceTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicUrlPdfSourceType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicUrlPdfSourceTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicFileDocumentSourceType)) + { + return new global::OpenRouter.JsonConverters.AnthropicFileDocumentSourceTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicFileDocumentSourceType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicFileDocumentSourceTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockParamType)) + { + return new global::OpenRouter.JsonConverters.AnthropicDocumentBlockParamTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockParamType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicDocumentBlockParamTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf3Type)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf3Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf2Type)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf2Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicSearchResultBlockParamType)) + { + return new global::OpenRouter.JsonConverters.AnthropicSearchResultBlockParamTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicSearchResultBlockParamType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicSearchResultBlockParamTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4Type)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf4TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf4TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf5Type)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf5TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf5Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf5TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf6Type)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf6TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf6Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf6TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf7Type)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf7TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf7Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf7TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchResultBlockParamType)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebSearchResultBlockParamTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchResultBlockParamType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebSearchResultBlockParamTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1ErrorCode)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1ErrorCode?)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1Type)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf8ContentOneOf1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8Type)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf8TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf8TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf10Type)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf10TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf10Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf10TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesAdvisorToolResultBlockType)) + { + return new global::OpenRouter.JsonConverters.MessagesAdvisorToolResultBlockTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesAdvisorToolResultBlockType?)) + { + return new global::OpenRouter.JsonConverters.MessagesAdvisorToolResultBlockTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamRole)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamRoleJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesMessageParamRole?)) + { + return new global::OpenRouter.JsonConverters.MessagesMessageParamRoleNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesOutputConfigEffort)) + { + return new global::OpenRouter.JsonConverters.MessagesOutputConfigEffortJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesOutputConfigEffort?)) + { + return new global::OpenRouter.JsonConverters.MessagesOutputConfigEffortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesOutputConfigFormatType)) + { + return new global::OpenRouter.JsonConverters.MessagesOutputConfigFormatTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesOutputConfigFormatType?)) + { + return new global::OpenRouter.JsonConverters.MessagesOutputConfigFormatTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesOutputConfigTaskBudgetType)) + { + return new global::OpenRouter.JsonConverters.MessagesOutputConfigTaskBudgetTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesOutputConfigTaskBudgetType?)) + { + return new global::OpenRouter.JsonConverters.MessagesOutputConfigTaskBudgetTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant1Id)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant1IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant1Id?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant1IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant2Id)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant2IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant2Id?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant2IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant3Id)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant3IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant3Id?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant3IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant4Id)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant4IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant4Id?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant4IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant5Id)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant5IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant5Id?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant5IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant6Id)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant6IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant6Id?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant6IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant7Id)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant7IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant7Id?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant7IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant8Id)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant8IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant8Id?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsVariant8IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsDiscriminatorId)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsDiscriminatorIdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestPluginsItemsDiscriminatorId?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestPluginsItemsDiscriminatorIdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicThinkingDisplay)) + { + return new global::OpenRouter.JsonConverters.AnthropicThinkingDisplayJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicThinkingDisplay?)) + { + return new global::OpenRouter.JsonConverters.AnthropicThinkingDisplayNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestThinkingOneOf0Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestThinkingOneOf0TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestThinkingOneOf0Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestThinkingOneOf0TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestThinkingOneOf1Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestThinkingOneOf1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestThinkingOneOf1Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestThinkingOneOf1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestThinkingOneOf2Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestThinkingOneOf2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestThinkingOneOf2Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestThinkingOneOf2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf0Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolChoiceOneOf0TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf0Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolChoiceOneOf0TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf1Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolChoiceOneOf1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf1Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolChoiceOneOf1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf2Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolChoiceOneOf2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf2Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolChoiceOneOf2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf3Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolChoiceOneOf3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolChoiceOneOf3Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolChoiceOneOf3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf0Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf0TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf0Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf0TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf1Name)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf1NameJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf1Name?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf1NameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf1Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf1Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf2Name)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf2NameJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf2Name?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf2NameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf2Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf2Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf3Name)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf3NameJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf3Name?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf3NameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf3Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf3Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchToolUserLocationType)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebSearchToolUserLocationTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchToolUserLocationType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebSearchToolUserLocationTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicAllowedCallersItems)) + { + return new global::OpenRouter.JsonConverters.AnthropicAllowedCallersItemsJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicAllowedCallersItems?)) + { + return new global::OpenRouter.JsonConverters.AnthropicAllowedCallersItemsNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf4Name)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf4NameJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf4Name?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf4NameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf4Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf4TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf4Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf4TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf5Name)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf5NameJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf5Name?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf5NameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf5Type)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf5TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesRequestToolsItemsOneOf5Type?)) + { + return new global::OpenRouter.JsonConverters.MessagesRequestToolsItemsOneOf5TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesSearchModelsServerToolType)) + { + return new global::OpenRouter.JsonConverters.MessagesSearchModelsServerToolTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesSearchModelsServerToolType?)) + { + return new global::OpenRouter.JsonConverters.MessagesSearchModelsServerToolTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionOutputType)) + { + return new global::OpenRouter.JsonConverters.AnthropicBashCodeExecutionOutputTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionOutputType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicBashCodeExecutionOutputTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionResultType)) + { + return new global::OpenRouter.JsonConverters.AnthropicBashCodeExecutionResultTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionResultType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicBashCodeExecutionResultTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionToolResultErrorErrorCode)) + { + return new global::OpenRouter.JsonConverters.AnthropicBashCodeExecutionToolResultErrorErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionToolResultErrorErrorCode?)) + { + return new global::OpenRouter.JsonConverters.AnthropicBashCodeExecutionToolResultErrorErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionToolResultErrorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicBashCodeExecutionToolResultErrorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionToolResultErrorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicBashCodeExecutionToolResultErrorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionContentDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicBashCodeExecutionContentDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicBashCodeExecutionContentDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicBashCodeExecutionContentDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionOutputType)) + { + return new global::OpenRouter.JsonConverters.AnthropicCodeExecutionOutputTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionOutputType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicCodeExecutionOutputTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionResultType)) + { + return new global::OpenRouter.JsonConverters.AnthropicCodeExecutionResultTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionResultType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicCodeExecutionResultTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicServerToolErrorCode)) + { + return new global::OpenRouter.JsonConverters.AnthropicServerToolErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicServerToolErrorCode?)) + { + return new global::OpenRouter.JsonConverters.AnthropicServerToolErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionToolResultErrorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicCodeExecutionToolResultErrorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionToolResultErrorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicCodeExecutionToolResultErrorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicEncryptedCodeExecutionResultType)) + { + return new global::OpenRouter.JsonConverters.AnthropicEncryptedCodeExecutionResultTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicEncryptedCodeExecutionResultType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicEncryptedCodeExecutionResultTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionContentDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicCodeExecutionContentDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCodeExecutionContentDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicCodeExecutionContentDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerVariant1Type)) + { + return new global::OpenRouter.JsonConverters.OrAnthropicNullableCallerVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.OrAnthropicNullableCallerVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerVariant2Type)) + { + return new global::OpenRouter.JsonConverters.OrAnthropicNullableCallerVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.OrAnthropicNullableCallerVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerVariant3Type)) + { + return new global::OpenRouter.JsonConverters.OrAnthropicNullableCallerVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerVariant3Type?)) + { + return new global::OpenRouter.JsonConverters.OrAnthropicNullableCallerVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.OrAnthropicNullableCallerDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OrAnthropicNullableCallerDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.OrAnthropicNullableCallerDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OrAnthropicServerToolUseBlockType)) + { + return new global::OpenRouter.JsonConverters.OrAnthropicServerToolUseBlockTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OrAnthropicServerToolUseBlockType?)) + { + return new global::OpenRouter.JsonConverters.OrAnthropicServerToolUseBlockTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant1Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextCitationVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextCitationVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant2Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextCitationVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextCitationVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant3Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextCitationVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant3Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextCitationVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant4Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextCitationVariant4TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant4Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextCitationVariant4TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant5Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextCitationVariant5TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationVariant5Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextCitationVariant5TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextCitationDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextCitationDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextCitationDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionCreateResultType)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionCreateResultTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionCreateResultType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionCreateResultTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionStrReplaceResultType)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionStrReplaceResultTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionStrReplaceResultType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionStrReplaceResultTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionToolResultErrorErrorCode)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionToolResultErrorErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionToolResultErrorErrorCode?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionToolResultErrorErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionToolResultErrorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionToolResultErrorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionToolResultErrorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionToolResultErrorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionViewResultFileType)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionViewResultFileTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionViewResultFileType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionViewResultFileTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionViewResultType)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionViewResultTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionViewResultType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionViewResultTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionContentDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionContentDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicToolSearchResultErrorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicToolSearchResultErrorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicToolSearchResultErrorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicToolSearchResultErrorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicToolReferenceType)) + { + return new global::OpenRouter.JsonConverters.AnthropicToolReferenceTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicToolReferenceType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicToolReferenceTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicToolSearchResultType)) + { + return new global::OpenRouter.JsonConverters.AnthropicToolSearchResultTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicToolSearchResultType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicToolSearchResultTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicToolSearchContentDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicToolSearchContentDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicToolSearchContentDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicToolSearchContentDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCallerVariant1Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicCallerVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCallerVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicCallerVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCallerVariant2Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicCallerVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCallerVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicCallerVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCallerVariant3Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicCallerVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCallerVariant3Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicCallerVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCallerDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicCallerDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCallerDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicCallerDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockType)) + { + return new global::OpenRouter.JsonConverters.AnthropicDocumentBlockTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicDocumentBlockType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicDocumentBlockTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchToolResultErrorErrorCode)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebFetchToolResultErrorErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchToolResultErrorErrorCode?)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebFetchToolResultErrorErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchToolResultErrorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebFetchToolResultErrorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchToolResultErrorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebFetchToolResultErrorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchContentVariant1Type)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebFetchContentVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchContentVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebFetchContentVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchContentDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebFetchContentDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebFetchContentDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebFetchContentDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchResultType)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebSearchResultTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchResultType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebSearchResultTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchToolResultErrorErrorCode)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebSearchToolResultErrorErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchToolResultErrorErrorCode?)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebSearchToolResultErrorErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchToolResultErrorType)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebSearchToolResultErrorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicWebSearchToolResultErrorType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicWebSearchToolResultErrorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant1Type)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant2Type)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant3Type)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant3Type?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant4Type)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant4TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant4Type?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant4TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant5Type)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant5TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant5Type?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant5TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant6Type)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant6TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant6Type?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant6TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant8Type)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant8TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant8Type?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant8TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant9Type)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant9TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant9Type?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant9TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant10Type)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant10TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant10Type?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant10TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant11Type)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant11TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant11Type?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant11TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant12Type)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant12TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant12Type?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant12TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant13Type)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant13TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant13Type?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant13TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant14Type)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant14TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockVariant14Type?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockVariant14TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicContentBlockDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicContentBlockDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesResultRole)) + { + return new global::OpenRouter.JsonConverters.MessagesResultRoleJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesResultRole?)) + { + return new global::OpenRouter.JsonConverters.MessagesResultRoleNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicRefusalStopDetailsCategory)) + { + return new global::OpenRouter.JsonConverters.AnthropicRefusalStopDetailsCategoryJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicRefusalStopDetailsCategory?)) + { + return new global::OpenRouter.JsonConverters.AnthropicRefusalStopDetailsCategoryNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicRefusalStopDetailsType)) + { + return new global::OpenRouter.JsonConverters.AnthropicRefusalStopDetailsTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicRefusalStopDetailsType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicRefusalStopDetailsTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicStopReason)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicStopReasonJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ORAnthropicStopReason?)) + { + return new global::OpenRouter.JsonConverters.ORAnthropicStopReasonNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesResultType)) + { + return new global::OpenRouter.JsonConverters.MessagesResultTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesResultType?)) + { + return new global::OpenRouter.JsonConverters.MessagesResultTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicServiceTier)) + { + return new global::OpenRouter.JsonConverters.AnthropicServiceTierJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicServiceTier?)) + { + return new global::OpenRouter.JsonConverters.AnthropicServiceTierNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesErrorResponseType)) + { + return new global::OpenRouter.JsonConverters.MessagesErrorResponseTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MessagesErrorResponseType?)) + { + return new global::OpenRouter.JsonConverters.MessagesErrorResponseTypeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[2]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new AnthropicMessagesSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + + 1 => new AnthropicMessagesSourceGenerationContextChunk1(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.AnthropicMessagesClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.AnthropicMessagesClient.g.cs index 1c4781f8..030f6788 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.AnthropicMessagesClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.AnthropicMessagesClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class AnthropicMessagesClient : global::OpenRouter.IAnthro /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.AnthropicMessagesSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeys.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeys.JsonSerializerContext.g.cs new file mode 100644 index 00000000..7c24cdda --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeys.JsonSerializerContext.g.cs @@ -0,0 +1,212 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.KeyGetResponsesContentApplicationJsonSchemaDataRateLimit))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.KeyGetResponsesContentApplicationJsonSchemaData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ApiKeysGetCurrentKeyResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.KeysGetResponsesContentApplicationJsonSchemaDataItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ApiKeysListResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.KeysPostRequestBodyContentApplicationJsonSchemaLimitReset), TypeInfoPropertyName = "KeysPostRequestBodyContentApplicationJsonSchemaLimitReset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.KeysPostResponsesContentApplicationJsonSchemaData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ApiKeysCreateKeysResponse201))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.KeysHashGetResponsesContentApplicationJsonSchemaData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ApiKeysGetKeyResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ApiKeysDeleteKeysResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.KeysHashPatchRequestBodyContentApplicationJsonSchemaLimitReset), TypeInfoPropertyName = "KeysHashPatchRequestBodyContentApplicationJsonSchemaLimitReset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.KeysHashPatchResponsesContentApplicationJsonSchemaData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ApiKeysUpdateKeysResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateKeysRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateKeysRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.KeysPostRequestBodyContentApplicationJsonSchemaLimitReset?), TypeInfoPropertyName = "NullableKeysPostRequestBodyContentApplicationJsonSchemaLimitReset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.KeysHashPatchRequestBodyContentApplicationJsonSchemaLimitReset?), TypeInfoPropertyName = "NullableKeysHashPatchRequestBodyContentApplicationJsonSchemaLimitReset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class ApiKeysSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ApiKeysSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ApiKeysSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ApiKeysSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.KeysPostRequestBodyContentApplicationJsonSchemaLimitReset) + + || typeToConvert == typeof(global::OpenRouter.KeysPostRequestBodyContentApplicationJsonSchemaLimitReset?) + + || typeToConvert == typeof(global::OpenRouter.KeysHashPatchRequestBodyContentApplicationJsonSchemaLimitReset) + + || typeToConvert == typeof(global::OpenRouter.KeysHashPatchRequestBodyContentApplicationJsonSchemaLimitReset?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.KeysPostRequestBodyContentApplicationJsonSchemaLimitReset)) + { + return new global::OpenRouter.JsonConverters.KeysPostRequestBodyContentApplicationJsonSchemaLimitResetJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.KeysPostRequestBodyContentApplicationJsonSchemaLimitReset?)) + { + return new global::OpenRouter.JsonConverters.KeysPostRequestBodyContentApplicationJsonSchemaLimitResetNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.KeysHashPatchRequestBodyContentApplicationJsonSchemaLimitReset)) + { + return new global::OpenRouter.JsonConverters.KeysHashPatchRequestBodyContentApplicationJsonSchemaLimitResetJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.KeysHashPatchRequestBodyContentApplicationJsonSchemaLimitReset?)) + { + return new global::OpenRouter.JsonConverters.KeysHashPatchRequestBodyContentApplicationJsonSchemaLimitResetNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ApiKeysSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.g.cs index 4b758c9a..f3889093 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class ApiKeysClient : global::OpenRouter.IApiKeysClient, g /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.ApiKeysSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Benchmarks.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Benchmarks.JsonSerializerContext.g.cs new file mode 100644 index 00000000..d8cd01c7 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Benchmarks.JsonSerializerContext.g.cs @@ -0,0 +1,294 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BenchmarksGetParametersSource), TypeInfoPropertyName = "BenchmarksGetParametersSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BenchmarksGetParametersTaskType), TypeInfoPropertyName = "BenchmarksGetParametersTaskType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BenchmarksGetParametersArena), TypeInfoPropertyName = "BenchmarksGetParametersArena2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarkPricing))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsDiscriminatorMappingDesignArenaTournamentStats))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItems), TypeInfoPropertyName = "UnifiedBenchmarksResponseDataItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant1Source), TypeInfoPropertyName = "UnifiedBenchmarksResponseDataItemsVariant1Source2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant2Source), TypeInfoPropertyName = "UnifiedBenchmarksResponseDataItemsVariant2Source2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsDiscriminatorSource), TypeInfoPropertyName = "UnifiedBenchmarksResponseDataItemsDiscriminatorSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksMetaSource), TypeInfoPropertyName = "UnifiedBenchmarksMetaSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksMetaVersion), TypeInfoPropertyName = "UnifiedBenchmarksMetaVersion2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksMeta))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BenchmarksGetParametersSource?), TypeInfoPropertyName = "NullableBenchmarksGetParametersSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BenchmarksGetParametersTaskType?), TypeInfoPropertyName = "NullableBenchmarksGetParametersTaskType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BenchmarksGetParametersArena?), TypeInfoPropertyName = "NullableBenchmarksGetParametersArena2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItems?), TypeInfoPropertyName = "NullableUnifiedBenchmarksResponseDataItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant1Source?), TypeInfoPropertyName = "NullableUnifiedBenchmarksResponseDataItemsVariant1Source2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant2Source?), TypeInfoPropertyName = "NullableUnifiedBenchmarksResponseDataItemsVariant2Source2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsDiscriminatorSource?), TypeInfoPropertyName = "NullableUnifiedBenchmarksResponseDataItemsDiscriminatorSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksMetaSource?), TypeInfoPropertyName = "NullableUnifiedBenchmarksMetaSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnifiedBenchmarksMetaVersion?), TypeInfoPropertyName = "NullableUnifiedBenchmarksMetaVersion2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class BenchmarksSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class BenchmarksSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static BenchmarksSourceGenerationContext Default { get; } = new(DefaultOptions); + + private BenchmarksSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnifiedBenchmarksResponseDataItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.BenchmarksGetParametersSource) + + || typeToConvert == typeof(global::OpenRouter.BenchmarksGetParametersSource?) + + || typeToConvert == typeof(global::OpenRouter.BenchmarksGetParametersTaskType) + + || typeToConvert == typeof(global::OpenRouter.BenchmarksGetParametersTaskType?) + + || typeToConvert == typeof(global::OpenRouter.BenchmarksGetParametersArena) + + || typeToConvert == typeof(global::OpenRouter.BenchmarksGetParametersArena?) + + || typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant1Source) + + || typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant1Source?) + + || typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant2Source) + + || typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant2Source?) + + || typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsDiscriminatorSource) + + || typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsDiscriminatorSource?) + + || typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksMetaSource) + + || typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksMetaSource?) + + || typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksMetaVersion) + + || typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksMetaVersion?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.BenchmarksGetParametersSource)) + { + return new global::OpenRouter.JsonConverters.BenchmarksGetParametersSourceJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BenchmarksGetParametersSource?)) + { + return new global::OpenRouter.JsonConverters.BenchmarksGetParametersSourceNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BenchmarksGetParametersTaskType)) + { + return new global::OpenRouter.JsonConverters.BenchmarksGetParametersTaskTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BenchmarksGetParametersTaskType?)) + { + return new global::OpenRouter.JsonConverters.BenchmarksGetParametersTaskTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BenchmarksGetParametersArena)) + { + return new global::OpenRouter.JsonConverters.BenchmarksGetParametersArenaJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BenchmarksGetParametersArena?)) + { + return new global::OpenRouter.JsonConverters.BenchmarksGetParametersArenaNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant1Source)) + { + return new global::OpenRouter.JsonConverters.UnifiedBenchmarksResponseDataItemsVariant1SourceJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant1Source?)) + { + return new global::OpenRouter.JsonConverters.UnifiedBenchmarksResponseDataItemsVariant1SourceNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant2Source)) + { + return new global::OpenRouter.JsonConverters.UnifiedBenchmarksResponseDataItemsVariant2SourceJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant2Source?)) + { + return new global::OpenRouter.JsonConverters.UnifiedBenchmarksResponseDataItemsVariant2SourceNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsDiscriminatorSource)) + { + return new global::OpenRouter.JsonConverters.UnifiedBenchmarksResponseDataItemsDiscriminatorSourceJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsDiscriminatorSource?)) + { + return new global::OpenRouter.JsonConverters.UnifiedBenchmarksResponseDataItemsDiscriminatorSourceNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksMetaSource)) + { + return new global::OpenRouter.JsonConverters.UnifiedBenchmarksMetaSourceJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksMetaSource?)) + { + return new global::OpenRouter.JsonConverters.UnifiedBenchmarksMetaSourceNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksMetaVersion)) + { + return new global::OpenRouter.JsonConverters.UnifiedBenchmarksMetaVersionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UnifiedBenchmarksMetaVersion?)) + { + return new global::OpenRouter.JsonConverters.UnifiedBenchmarksMetaVersionNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new BenchmarksSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.BenchmarksClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.BenchmarksClient.g.cs index 46cf28a4..3335a6ae 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.BenchmarksClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.BenchmarksClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class BenchmarksClient : global::OpenRouter.IBenchmarksCli /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.BenchmarksSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalytics.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalytics.JsonSerializerContext.g.cs new file mode 100644 index 00000000..5cf522ea --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalytics.JsonSerializerContext.g.cs @@ -0,0 +1,291 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RequestTimeoutResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RequestTimeoutResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataDimensionsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataGranularitiesItemsName), TypeInfoPropertyName = "AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataGranularitiesItemsName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataGranularitiesItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataMetricsItemsDisplayFormat), TypeInfoPropertyName = "AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataMetricsItemsDisplayFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataMetricsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsName), TypeInfoPropertyName = "AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsValueType), TypeInfoPropertyName = "AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsValueType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BetaAnalyticsGetAnalyticsMetaResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierDimensions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2Items), TypeInfoPropertyName = "AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2Items2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue), TypeInfoPropertyName = "AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFilters))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2Items), TypeInfoPropertyName = "AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2Items2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue), TypeInfoPropertyName = "AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaOrderByDirection), TypeInfoPropertyName = "AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaOrderByDirection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaOrderBy))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaTimeRange))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostResponsesContentApplicationJsonSchemaDataDataItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostResponsesContentApplicationJsonSchemaDataMetadata))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostResponsesContentApplicationJsonSchemaData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BetaAnalyticsQueryAnalyticsResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.QueryAnalyticsRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataGranularitiesItemsName?), TypeInfoPropertyName = "NullableAnalyticsMetaGetResponsesContentApplicationJsonSchemaDataGranularitiesItemsName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataMetricsItemsDisplayFormat?), TypeInfoPropertyName = "NullableAnalyticsMetaGetResponsesContentApplicationJsonSchemaDataMetricsItemsDisplayFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsName?), TypeInfoPropertyName = "NullableAnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsValueType?), TypeInfoPropertyName = "NullableAnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsValueType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2Items?), TypeInfoPropertyName = "NullableAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2Items2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue?), TypeInfoPropertyName = "NullableAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2Items?), TypeInfoPropertyName = "NullableAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2Items2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue?), TypeInfoPropertyName = "NullableAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaOrderByDirection?), TypeInfoPropertyName = "NullableAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaOrderByDirection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class BetaAnalyticsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class BetaAnalyticsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static BetaAnalyticsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private BetaAnalyticsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataGranularitiesItemsName) + + || typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataGranularitiesItemsName?) + + || typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataMetricsItemsDisplayFormat) + + || typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataMetricsItemsDisplayFormat?) + + || typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsName) + + || typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsName?) + + || typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsValueType) + + || typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsValueType?) + + || typeToConvert == typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaOrderByDirection) + + || typeToConvert == typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaOrderByDirection?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataGranularitiesItemsName)) + { + return new global::OpenRouter.JsonConverters.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataGranularitiesItemsNameJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataGranularitiesItemsName?)) + { + return new global::OpenRouter.JsonConverters.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataGranularitiesItemsNameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataMetricsItemsDisplayFormat)) + { + return new global::OpenRouter.JsonConverters.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataMetricsItemsDisplayFormatJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataMetricsItemsDisplayFormat?)) + { + return new global::OpenRouter.JsonConverters.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataMetricsItemsDisplayFormatNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsName)) + { + return new global::OpenRouter.JsonConverters.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsNameJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsName?)) + { + return new global::OpenRouter.JsonConverters.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsNameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsValueType)) + { + return new global::OpenRouter.JsonConverters.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsValueTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsValueType?)) + { + return new global::OpenRouter.JsonConverters.AnalyticsMetaGetResponsesContentApplicationJsonSchemaDataOperatorsItemsValueTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaOrderByDirection)) + { + return new global::OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaOrderByDirectionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaOrderByDirection?)) + { + return new global::OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaOrderByDirectionNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new BetaAnalyticsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalyticsClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalyticsClient.g.cs index ce221c4a..9028d127 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalyticsClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalyticsClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class BetaAnalyticsClient : global::OpenRouter.IBetaAnalyt /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.BetaAnalyticsSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Byok.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Byok.JsonSerializerContext.g.cs new file mode 100644 index 00000000..9010525f --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Byok.JsonSerializerContext.g.cs @@ -0,0 +1,205 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ByokGetParametersProvider), TypeInfoPropertyName = "ByokGetParametersProvider2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BYOKProviderSlug), TypeInfoPropertyName = "BYOKProviderSlug2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BYOKKey))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ListBYOKKeysResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateBYOKKeyRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateByokKeyResponseData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateBYOKKeyResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetByokKeyResponseData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetBYOKKeyResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DeleteBYOKKeyResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateBYOKKeyRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateByokKeyResponseData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateBYOKKeyResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ByokGetParametersProvider?), TypeInfoPropertyName = "NullableByokGetParametersProvider2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BYOKProviderSlug?), TypeInfoPropertyName = "NullableBYOKProviderSlug2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class ByokSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ByokSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ByokSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ByokSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.ByokGetParametersProvider) + + || typeToConvert == typeof(global::OpenRouter.ByokGetParametersProvider?) + + || typeToConvert == typeof(global::OpenRouter.BYOKProviderSlug) + + || typeToConvert == typeof(global::OpenRouter.BYOKProviderSlug?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.ByokGetParametersProvider)) + { + return new global::OpenRouter.JsonConverters.ByokGetParametersProviderJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ByokGetParametersProvider?)) + { + return new global::OpenRouter.JsonConverters.ByokGetParametersProviderNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BYOKProviderSlug)) + { + return new global::OpenRouter.JsonConverters.BYOKProviderSlugJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BYOKProviderSlug?)) + { + return new global::OpenRouter.JsonConverters.BYOKProviderSlugNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ByokSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.g.cs index bac5e530..a78d9a9e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class ByokClient : global::OpenRouter.IByokClient, global: /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.ByokSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Chat.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Chat.JsonSerializerContext.g.cs new file mode 100644 index 00000000..2e240164 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Chat.JsonSerializerContext.g.cs @@ -0,0 +1,2040 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MetadataLevel), TypeInfoPropertyName = "MetadataLevel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCacheControlTtl), TypeInfoPropertyName = "AnthropicCacheControlTtl2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCacheControlDirectiveType), TypeInfoPropertyName = "AnthropicCacheControlDirectiveType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCacheControlDirective))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatDebugOptions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageConfig), TypeInfoPropertyName = "ImageConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningFormat), TypeInfoPropertyName = "ReasoningFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PromptCacheBreakpointMode), TypeInfoPropertyName = "PromptCacheBreakpointMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PromptCacheBreakpoint))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchEngineEnum), TypeInfoPropertyName = "WebSearchEngineEnum2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AdvisorReasoningEffort), TypeInfoPropertyName = "AdvisorReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AdvisorReasoning))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AdvisorNestedTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AdvisorServerToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AdvisorServerToolOpenRouterType), TypeInfoPropertyName = "AdvisorServerToolOpenRouterType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AdvisorServerToolOpenRouter))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SubagentReasoningEffort), TypeInfoPropertyName = "SubagentReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SubagentReasoning))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SubagentNestedTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SubagentServerToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SubagentServerToolOpenRouterType), TypeInfoPropertyName = "SubagentServerToolOpenRouterType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SubagentServerToolOpenRouter))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatetimeServerToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatetimeServerToolType), TypeInfoPropertyName = "DatetimeServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatetimeServerTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FilesServerToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FilesServerToolType), TypeInfoPropertyName = "FilesServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FilesServerTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FusionServerToolConfigReasoningEffort), TypeInfoPropertyName = "FusionServerToolConfigReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FusionServerToolConfigReasoning))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FusionServerToolConfigToolsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FusionServerToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FusionServerToolOpenRouterType), TypeInfoPropertyName = "FusionServerToolOpenRouterType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FusionServerToolOpenRouter))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationServerToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationServerToolOpenRouterType), TypeInfoPropertyName = "ImageGenerationServerToolOpenRouterType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SearchModelsServerToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchEngineEnum), TypeInfoPropertyName = "WebFetchEngineEnum2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchServerToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchServerToolType), TypeInfoPropertyName = "WebFetchServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchServerTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SearchQualityLevel), TypeInfoPropertyName = "SearchQualityLevel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchUserLocationServerToolType), TypeInfoPropertyName = "WebSearchUserLocationServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchUserLocationServerTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEngine), TypeInfoPropertyName = "BashServerToolEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironment), TypeInfoPropertyName = "BashServerToolEnvironment2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentVariant1Type), TypeInfoPropertyName = "BashServerToolEnvironmentVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentVariant2Type), TypeInfoPropertyName = "BashServerToolEnvironmentVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentDiscriminatorType), TypeInfoPropertyName = "BashServerToolEnvironmentDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolType), TypeInfoPropertyName = "BashServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContextCompressionEngine), TypeInfoPropertyName = "ContextCompressionEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PdfParserEngine0), TypeInfoPropertyName = "PdfParserEngine02")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PdfParserEngine1), TypeInfoPropertyName = "PdfParserEngine12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PDFParserEngine), TypeInfoPropertyName = "PDFParserEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PDFParserOptions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset), TypeInfoPropertyName = "ResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3Items))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4), TypeInfoPropertyName = "ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf42")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters), TypeInfoPropertyName = "ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource), TypeInfoPropertyName = "ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchEngine), TypeInfoPropertyName = "WebSearchEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchPluginId), TypeInfoPropertyName = "WebSearchPluginId2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchPluginUserLocationType), TypeInfoPropertyName = "WebSearchPluginUserLocationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchPluginUserLocation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchPluginId), TypeInfoPropertyName = "WebFetchPluginId2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PromptCacheOptionsMode), TypeInfoPropertyName = "PromptCacheOptionsMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PromptCacheOptions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesDataCollection), TypeInfoPropertyName = "ProviderPreferencesDataCollection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderName), TypeInfoPropertyName = "ProviderName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesIgnoreItems), TypeInfoPropertyName = "ProviderPreferencesIgnoreItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesMaxPrice))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesOnlyItems), TypeInfoPropertyName = "ProviderPreferencesOnlyItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesOrderItems), TypeInfoPropertyName = "ProviderPreferencesOrderItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PercentileLatencyCutoffs))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMaxLatency), TypeInfoPropertyName = "PreferredMaxLatency2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PercentileThroughputCutoffs))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMinThroughput), TypeInfoPropertyName = "PreferredMinThroughput2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Quantization), TypeInfoPropertyName = "Quantization2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSort), TypeInfoPropertyName = "ProviderSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigBy), TypeInfoPropertyName = "ProviderSortConfigBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigPartition), TypeInfoPropertyName = "ProviderSortConfigPartition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesSort), TypeInfoPropertyName = "ProviderPreferencesSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferences))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenFinishReasonIsType), TypeInfoPropertyName = "StopServerToolsWhenFinishReasonIsType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenHasToolCallType), TypeInfoPropertyName = "StopServerToolsWhenHasToolCallType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenMaxCostType), TypeInfoPropertyName = "StopServerToolsWhenMaxCostType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenMaxTokensUsedType), TypeInfoPropertyName = "StopServerToolsWhenMaxTokensUsedType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenStepCountIsType), TypeInfoPropertyName = "StopServerToolsWhenStepCountIsType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenCondition), TypeInfoPropertyName = "StopServerToolsWhenCondition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionDiscriminatorType), TypeInfoPropertyName = "StopServerToolsWhenConditionDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TraceConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ServerToolUseDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RouterAttempt))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EndpointInfo))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EndpointsMetadata))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RouterParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PipelineStageType), TypeInfoPropertyName = "PipelineStageType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PipelineStage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RoutingStrategy), TypeInfoPropertyName = "RoutingStrategy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OpenRouterMetadata))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RequestTimeoutResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RequestTimeoutResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PayloadTooLargeResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PayloadTooLargeResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnprocessableEntityResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnprocessableEntityResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ServiceUnavailableResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ServiceUnavailableResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CostDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTimeOffset))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatAudioOutput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsDiscriminatorMappingFileFile))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsDiscriminatorMappingImageUrlImageUrlDetail), TypeInfoPropertyName = "ChatContentItemsDiscriminatorMappingImageUrlImageUrlDetail2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsDiscriminatorMappingImageUrlImageUrl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsDiscriminatorMappingInputAudioInputAudio))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.LegacyChatContentVideoType), TypeInfoPropertyName = "LegacyChatContentVideoType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.LegacyChatContentVideoInput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentCacheControlType), TypeInfoPropertyName = "ChatContentCacheControlType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentCacheControl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentTextType), TypeInfoPropertyName = "ChatContentTextType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentVideoType), TypeInfoPropertyName = "ChatContentVideoType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentVideoInput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItems), TypeInfoPropertyName = "ChatContentItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsVariant1Type), TypeInfoPropertyName = "ChatContentItemsVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsVariant2Type), TypeInfoPropertyName = "ChatContentItemsVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsVariant3Type), TypeInfoPropertyName = "ChatContentItemsVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsVariant6))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsDiscriminatorType), TypeInfoPropertyName = "ChatContentItemsDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesDiscriminatorMappingAssistantContent), TypeInfoPropertyName = "ChatMessagesDiscriminatorMappingAssistantContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatAssistantImagesItemsImageUrl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatAssistantImagesItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnion), TypeInfoPropertyName = "ReasoningDetailUnion2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionVariant1Type), TypeInfoPropertyName = "ReasoningDetailUnionVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionVariant2Type), TypeInfoPropertyName = "ReasoningDetailUnionVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionVariant3Type), TypeInfoPropertyName = "ReasoningDetailUnionVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionVariant4Type), TypeInfoPropertyName = "ReasoningDetailUnionVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionDiscriminatorType), TypeInfoPropertyName = "ReasoningDetailUnionDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolCallFunction))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolCallType), TypeInfoPropertyName = "ChatToolCallType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolCall))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentText))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesDiscriminatorMappingDeveloperContent), TypeInfoPropertyName = "ChatMessagesDiscriminatorMappingDeveloperContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatSystemMessageContent), TypeInfoPropertyName = "ChatSystemMessageContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatSystemMessageRole), TypeInfoPropertyName = "ChatSystemMessageRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolMessageContent), TypeInfoPropertyName = "ChatToolMessageContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolMessageRole), TypeInfoPropertyName = "ChatToolMessageRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatUserMessageContent), TypeInfoPropertyName = "ChatUserMessageContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatUserMessageRole), TypeInfoPropertyName = "ChatUserMessageRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessages), TypeInfoPropertyName = "ChatMessages2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesVariant1Role), TypeInfoPropertyName = "ChatMessagesVariant1Role2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesVariant2Role), TypeInfoPropertyName = "ChatMessagesVariant2Role2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesDiscriminatorRole), TypeInfoPropertyName = "ChatMessagesDiscriminatorRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestModalitiesItems), TypeInfoPropertyName = "ChatRequestModalitiesItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItems), TypeInfoPropertyName = "ChatRequestPluginsItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant1Id), TypeInfoPropertyName = "ChatRequestPluginsItemsVariant1Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant2Id), TypeInfoPropertyName = "ChatRequestPluginsItemsVariant2Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant3Id), TypeInfoPropertyName = "ChatRequestPluginsItemsVariant3Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant4Id), TypeInfoPropertyName = "ChatRequestPluginsItemsVariant4Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant5Id), TypeInfoPropertyName = "ChatRequestPluginsItemsVariant5Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant6))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant6Id), TypeInfoPropertyName = "ChatRequestPluginsItemsVariant6Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant7))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant7Id), TypeInfoPropertyName = "ChatRequestPluginsItemsVariant7Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant8))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant8Id), TypeInfoPropertyName = "ChatRequestPluginsItemsVariant8Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant9))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant10))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsDiscriminatorId), TypeInfoPropertyName = "ChatRequestPluginsItemsDiscriminatorId2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PredictionContentTextType), TypeInfoPropertyName = "PredictionContentTextType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PredictionContentText))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PredictionContent), TypeInfoPropertyName = "PredictionContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PredictionType), TypeInfoPropertyName = "PredictionType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Prediction))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestReasoningEffort), TypeInfoPropertyName = "ChatRequestReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatReasoningSummaryVerbosityEnum), TypeInfoPropertyName = "ChatReasoningSummaryVerbosityEnum2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestReasoning))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatJsonSchemaConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormat), TypeInfoPropertyName = "ChatRequestResponseFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant1Type), TypeInfoPropertyName = "ChatRequestResponseFormatVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant2Type), TypeInfoPropertyName = "ChatRequestResponseFormatVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant3Type), TypeInfoPropertyName = "ChatRequestResponseFormatVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant4Type), TypeInfoPropertyName = "ChatRequestResponseFormatVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant5Type), TypeInfoPropertyName = "ChatRequestResponseFormatVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatDiscriminatorType), TypeInfoPropertyName = "ChatRequestResponseFormatDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestServiceTier), TypeInfoPropertyName = "ChatRequestServiceTier2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestStop), TypeInfoPropertyName = "ChatRequestStop2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatStreamOptions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolChoice0), TypeInfoPropertyName = "ChatToolChoice02")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolChoice1), TypeInfoPropertyName = "ChatToolChoice12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolChoice2), TypeInfoPropertyName = "ChatToolChoice22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatNamedToolChoiceFunction))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatNamedToolChoiceType), TypeInfoPropertyName = "ChatNamedToolChoiceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatNamedToolChoice))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatServerToolChoice))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolChoice), TypeInfoPropertyName = "ChatToolChoice2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatFunctionToolOneOf0Function))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatFunctionToolOneOf0Type), TypeInfoPropertyName = "ChatFunctionToolOneOf0Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatFunctionTool0))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatSearchModelsServerToolType), TypeInfoPropertyName = "ChatSearchModelsServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatSearchModelsServerTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OpenRouterWebSearchServerToolType), TypeInfoPropertyName = "OpenRouterWebSearchServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OpenRouterWebSearchServerTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatWebSearchShorthandType), TypeInfoPropertyName = "ChatWebSearchShorthandType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatWebSearchShorthand))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatFunctionTool), TypeInfoPropertyName = "ChatFunctionTool2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatFinishReasonEnum), TypeInfoPropertyName = "ChatFinishReasonEnum2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatTokenLogprobTopLogprobsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatTokenLogprob))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatTokenLogprobs))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatAssistantMessage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatChoice))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatResultObject), TypeInfoPropertyName = "ChatResultObject2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatUsageCompletionTokensDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatUsagePromptTokensDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatUsage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MetadataLevel?), TypeInfoPropertyName = "NullableMetadataLevel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCacheControlTtl?), TypeInfoPropertyName = "NullableAnthropicCacheControlTtl2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCacheControlDirectiveType?), TypeInfoPropertyName = "NullableAnthropicCacheControlDirectiveType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageConfig?), TypeInfoPropertyName = "NullableImageConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningFormat?), TypeInfoPropertyName = "NullableReasoningFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PromptCacheBreakpointMode?), TypeInfoPropertyName = "NullablePromptCacheBreakpointMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchEngineEnum?), TypeInfoPropertyName = "NullableWebSearchEngineEnum2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AdvisorReasoningEffort?), TypeInfoPropertyName = "NullableAdvisorReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AdvisorServerToolOpenRouterType?), TypeInfoPropertyName = "NullableAdvisorServerToolOpenRouterType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SubagentReasoningEffort?), TypeInfoPropertyName = "NullableSubagentReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SubagentServerToolOpenRouterType?), TypeInfoPropertyName = "NullableSubagentServerToolOpenRouterType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatetimeServerToolType?), TypeInfoPropertyName = "NullableDatetimeServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FilesServerToolType?), TypeInfoPropertyName = "NullableFilesServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FusionServerToolConfigReasoningEffort?), TypeInfoPropertyName = "NullableFusionServerToolConfigReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FusionServerToolOpenRouterType?), TypeInfoPropertyName = "NullableFusionServerToolOpenRouterType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationServerToolOpenRouterType?), TypeInfoPropertyName = "NullableImageGenerationServerToolOpenRouterType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchEngineEnum?), TypeInfoPropertyName = "NullableWebFetchEngineEnum2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchServerToolType?), TypeInfoPropertyName = "NullableWebFetchServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SearchQualityLevel?), TypeInfoPropertyName = "NullableSearchQualityLevel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchUserLocationServerToolType?), TypeInfoPropertyName = "NullableWebSearchUserLocationServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEngine?), TypeInfoPropertyName = "NullableBashServerToolEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironment?), TypeInfoPropertyName = "NullableBashServerToolEnvironment2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentVariant1Type?), TypeInfoPropertyName = "NullableBashServerToolEnvironmentVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentVariant2Type?), TypeInfoPropertyName = "NullableBashServerToolEnvironmentVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolEnvironmentDiscriminatorType?), TypeInfoPropertyName = "NullableBashServerToolEnvironmentDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BashServerToolType?), TypeInfoPropertyName = "NullableBashServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContextCompressionEngine?), TypeInfoPropertyName = "NullableContextCompressionEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PdfParserEngine0?), TypeInfoPropertyName = "NullablePdfParserEngine02")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PdfParserEngine1?), TypeInfoPropertyName = "NullablePdfParserEngine12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PDFParserEngine?), TypeInfoPropertyName = "NullablePDFParserEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset?), TypeInfoPropertyName = "NullableResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4?), TypeInfoPropertyName = "NullableResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf42")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters?), TypeInfoPropertyName = "NullableResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource?), TypeInfoPropertyName = "NullableResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchEngine?), TypeInfoPropertyName = "NullableWebSearchEngine2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchPluginId?), TypeInfoPropertyName = "NullableWebSearchPluginId2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebSearchPluginUserLocationType?), TypeInfoPropertyName = "NullableWebSearchPluginUserLocationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WebFetchPluginId?), TypeInfoPropertyName = "NullableWebFetchPluginId2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PromptCacheOptionsMode?), TypeInfoPropertyName = "NullablePromptCacheOptionsMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesDataCollection?), TypeInfoPropertyName = "NullableProviderPreferencesDataCollection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderName?), TypeInfoPropertyName = "NullableProviderName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesIgnoreItems?), TypeInfoPropertyName = "NullableProviderPreferencesIgnoreItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesOnlyItems?), TypeInfoPropertyName = "NullableProviderPreferencesOnlyItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesOrderItems?), TypeInfoPropertyName = "NullableProviderPreferencesOrderItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMaxLatency?), TypeInfoPropertyName = "NullablePreferredMaxLatency2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMinThroughput?), TypeInfoPropertyName = "NullablePreferredMinThroughput2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Quantization?), TypeInfoPropertyName = "NullableQuantization2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSort?), TypeInfoPropertyName = "NullableProviderSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigBy?), TypeInfoPropertyName = "NullableProviderSortConfigBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigPartition?), TypeInfoPropertyName = "NullableProviderSortConfigPartition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderPreferencesSort?), TypeInfoPropertyName = "NullableProviderPreferencesSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenFinishReasonIsType?), TypeInfoPropertyName = "NullableStopServerToolsWhenFinishReasonIsType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenHasToolCallType?), TypeInfoPropertyName = "NullableStopServerToolsWhenHasToolCallType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenMaxCostType?), TypeInfoPropertyName = "NullableStopServerToolsWhenMaxCostType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenMaxTokensUsedType?), TypeInfoPropertyName = "NullableStopServerToolsWhenMaxTokensUsedType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenStepCountIsType?), TypeInfoPropertyName = "NullableStopServerToolsWhenStepCountIsType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenCondition?), TypeInfoPropertyName = "NullableStopServerToolsWhenCondition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.StopServerToolsWhenConditionDiscriminatorType?), TypeInfoPropertyName = "NullableStopServerToolsWhenConditionDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PipelineStageType?), TypeInfoPropertyName = "NullablePipelineStageType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RoutingStrategy?), TypeInfoPropertyName = "NullableRoutingStrategy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTimeOffset?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsDiscriminatorMappingImageUrlImageUrlDetail?), TypeInfoPropertyName = "NullableChatContentItemsDiscriminatorMappingImageUrlImageUrlDetail2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.LegacyChatContentVideoType?), TypeInfoPropertyName = "NullableLegacyChatContentVideoType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentCacheControlType?), TypeInfoPropertyName = "NullableChatContentCacheControlType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentTextType?), TypeInfoPropertyName = "NullableChatContentTextType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentVideoType?), TypeInfoPropertyName = "NullableChatContentVideoType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItems?), TypeInfoPropertyName = "NullableChatContentItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsVariant1Type?), TypeInfoPropertyName = "NullableChatContentItemsVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsVariant2Type?), TypeInfoPropertyName = "NullableChatContentItemsVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsVariant3Type?), TypeInfoPropertyName = "NullableChatContentItemsVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatContentItemsDiscriminatorType?), TypeInfoPropertyName = "NullableChatContentItemsDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesDiscriminatorMappingAssistantContent?), TypeInfoPropertyName = "NullableChatMessagesDiscriminatorMappingAssistantContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnion?), TypeInfoPropertyName = "NullableReasoningDetailUnion2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionVariant1Type?), TypeInfoPropertyName = "NullableReasoningDetailUnionVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionVariant2Type?), TypeInfoPropertyName = "NullableReasoningDetailUnionVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionVariant3Type?), TypeInfoPropertyName = "NullableReasoningDetailUnionVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionVariant4Type?), TypeInfoPropertyName = "NullableReasoningDetailUnionVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningDetailUnionDiscriminatorType?), TypeInfoPropertyName = "NullableReasoningDetailUnionDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolCallType?), TypeInfoPropertyName = "NullableChatToolCallType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesDiscriminatorMappingDeveloperContent?), TypeInfoPropertyName = "NullableChatMessagesDiscriminatorMappingDeveloperContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatSystemMessageContent?), TypeInfoPropertyName = "NullableChatSystemMessageContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatSystemMessageRole?), TypeInfoPropertyName = "NullableChatSystemMessageRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolMessageContent?), TypeInfoPropertyName = "NullableChatToolMessageContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolMessageRole?), TypeInfoPropertyName = "NullableChatToolMessageRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatUserMessageContent?), TypeInfoPropertyName = "NullableChatUserMessageContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatUserMessageRole?), TypeInfoPropertyName = "NullableChatUserMessageRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessages?), TypeInfoPropertyName = "NullableChatMessages2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesVariant1Role?), TypeInfoPropertyName = "NullableChatMessagesVariant1Role2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesVariant2Role?), TypeInfoPropertyName = "NullableChatMessagesVariant2Role2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatMessagesDiscriminatorRole?), TypeInfoPropertyName = "NullableChatMessagesDiscriminatorRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestModalitiesItems?), TypeInfoPropertyName = "NullableChatRequestModalitiesItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItems?), TypeInfoPropertyName = "NullableChatRequestPluginsItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant1Id?), TypeInfoPropertyName = "NullableChatRequestPluginsItemsVariant1Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant2Id?), TypeInfoPropertyName = "NullableChatRequestPluginsItemsVariant2Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant3Id?), TypeInfoPropertyName = "NullableChatRequestPluginsItemsVariant3Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant4Id?), TypeInfoPropertyName = "NullableChatRequestPluginsItemsVariant4Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant5Id?), TypeInfoPropertyName = "NullableChatRequestPluginsItemsVariant5Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant6Id?), TypeInfoPropertyName = "NullableChatRequestPluginsItemsVariant6Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant7Id?), TypeInfoPropertyName = "NullableChatRequestPluginsItemsVariant7Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant8Id?), TypeInfoPropertyName = "NullableChatRequestPluginsItemsVariant8Id2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestPluginsItemsDiscriminatorId?), TypeInfoPropertyName = "NullableChatRequestPluginsItemsDiscriminatorId2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PredictionContentTextType?), TypeInfoPropertyName = "NullablePredictionContentTextType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PredictionContent?), TypeInfoPropertyName = "NullablePredictionContent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PredictionType?), TypeInfoPropertyName = "NullablePredictionType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestReasoningEffort?), TypeInfoPropertyName = "NullableChatRequestReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatReasoningSummaryVerbosityEnum?), TypeInfoPropertyName = "NullableChatReasoningSummaryVerbosityEnum2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormat?), TypeInfoPropertyName = "NullableChatRequestResponseFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant1Type?), TypeInfoPropertyName = "NullableChatRequestResponseFormatVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant2Type?), TypeInfoPropertyName = "NullableChatRequestResponseFormatVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant3Type?), TypeInfoPropertyName = "NullableChatRequestResponseFormatVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant4Type?), TypeInfoPropertyName = "NullableChatRequestResponseFormatVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatVariant5Type?), TypeInfoPropertyName = "NullableChatRequestResponseFormatVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestResponseFormatDiscriminatorType?), TypeInfoPropertyName = "NullableChatRequestResponseFormatDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestServiceTier?), TypeInfoPropertyName = "NullableChatRequestServiceTier2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatRequestStop?), TypeInfoPropertyName = "NullableChatRequestStop2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolChoice0?), TypeInfoPropertyName = "NullableChatToolChoice02")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolChoice1?), TypeInfoPropertyName = "NullableChatToolChoice12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolChoice2?), TypeInfoPropertyName = "NullableChatToolChoice22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatNamedToolChoiceType?), TypeInfoPropertyName = "NullableChatNamedToolChoiceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatToolChoice?), TypeInfoPropertyName = "NullableChatToolChoice2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatFunctionToolOneOf0Type?), TypeInfoPropertyName = "NullableChatFunctionToolOneOf0Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatSearchModelsServerToolType?), TypeInfoPropertyName = "NullableChatSearchModelsServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OpenRouterWebSearchServerToolType?), TypeInfoPropertyName = "NullableOpenRouterWebSearchServerToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatWebSearchShorthandType?), TypeInfoPropertyName = "NullableChatWebSearchShorthandType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatFunctionTool?), TypeInfoPropertyName = "NullableChatFunctionTool2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatFinishReasonEnum?), TypeInfoPropertyName = "NullableChatFinishReasonEnum2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ChatResultObject?), TypeInfoPropertyName = "NullableChatResultObject2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class ChatSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ChatSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ChatSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ChatSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.ImageConfigJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.BashServerToolEnvironmentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.PDFParserEngineJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4JsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ProviderPreferencesIgnoreItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ProviderPreferencesOnlyItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ProviderPreferencesOrderItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.PreferredMaxLatencyJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.PreferredMinThroughputJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ProviderPreferencesSortJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.StopServerToolsWhenConditionJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ChatContentItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ChatMessagesDiscriminatorMappingAssistantContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ReasoningDetailUnionJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ChatMessagesDiscriminatorMappingDeveloperContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ChatSystemMessageContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ChatToolMessageContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ChatUserMessageContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ChatMessagesJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.PredictionContentJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ChatRequestResponseFormatJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ChatRequestStopJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ChatToolChoiceJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ChatFunctionToolJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.MetadataLevel) + + || typeToConvert == typeof(global::OpenRouter.MetadataLevel?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlTtl) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlTtl?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlDirectiveType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlDirectiveType?) + + || typeToConvert == typeof(global::OpenRouter.ReasoningFormat) + + || typeToConvert == typeof(global::OpenRouter.ReasoningFormat?) + + || typeToConvert == typeof(global::OpenRouter.PromptCacheBreakpointMode) + + || typeToConvert == typeof(global::OpenRouter.PromptCacheBreakpointMode?) + + || typeToConvert == typeof(global::OpenRouter.WebSearchEngineEnum) + + || typeToConvert == typeof(global::OpenRouter.WebSearchEngineEnum?) + + || typeToConvert == typeof(global::OpenRouter.AdvisorReasoningEffort) + + || typeToConvert == typeof(global::OpenRouter.AdvisorReasoningEffort?) + + || typeToConvert == typeof(global::OpenRouter.AdvisorServerToolOpenRouterType) + + || typeToConvert == typeof(global::OpenRouter.AdvisorServerToolOpenRouterType?) + + || typeToConvert == typeof(global::OpenRouter.SubagentReasoningEffort) + + || typeToConvert == typeof(global::OpenRouter.SubagentReasoningEffort?) + + || typeToConvert == typeof(global::OpenRouter.SubagentServerToolOpenRouterType) + + || typeToConvert == typeof(global::OpenRouter.SubagentServerToolOpenRouterType?) + + || typeToConvert == typeof(global::OpenRouter.DatetimeServerToolType) + + || typeToConvert == typeof(global::OpenRouter.DatetimeServerToolType?) + + || typeToConvert == typeof(global::OpenRouter.FilesServerToolType) + + || typeToConvert == typeof(global::OpenRouter.FilesServerToolType?) + + || typeToConvert == typeof(global::OpenRouter.FusionServerToolConfigReasoningEffort) + + || typeToConvert == typeof(global::OpenRouter.FusionServerToolConfigReasoningEffort?) + + || typeToConvert == typeof(global::OpenRouter.FusionServerToolOpenRouterType) + + || typeToConvert == typeof(global::OpenRouter.FusionServerToolOpenRouterType?) + + || typeToConvert == typeof(global::OpenRouter.ImageGenerationServerToolOpenRouterType) + + || typeToConvert == typeof(global::OpenRouter.ImageGenerationServerToolOpenRouterType?) + + || typeToConvert == typeof(global::OpenRouter.WebFetchEngineEnum) + + || typeToConvert == typeof(global::OpenRouter.WebFetchEngineEnum?) + + || typeToConvert == typeof(global::OpenRouter.WebFetchServerToolType) + + || typeToConvert == typeof(global::OpenRouter.WebFetchServerToolType?) + + || typeToConvert == typeof(global::OpenRouter.SearchQualityLevel) + + || typeToConvert == typeof(global::OpenRouter.SearchQualityLevel?) + + || typeToConvert == typeof(global::OpenRouter.WebSearchUserLocationServerToolType) + + || typeToConvert == typeof(global::OpenRouter.WebSearchUserLocationServerToolType?) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEngine) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEngine?) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolType) + + || typeToConvert == typeof(global::OpenRouter.BashServerToolType?) + + || typeToConvert == typeof(global::OpenRouter.ContextCompressionEngine) + + || typeToConvert == typeof(global::OpenRouter.ContextCompressionEngine?) + + || typeToConvert == typeof(global::OpenRouter.PdfParserEngine0) + + || typeToConvert == typeof(global::OpenRouter.PdfParserEngine0?) + + || typeToConvert == typeof(global::OpenRouter.PdfParserEngine1) + + || typeToConvert == typeof(global::OpenRouter.PdfParserEngine1?) + + || typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset) + + || typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset?) + + || typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource) + + || typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource?) + + || typeToConvert == typeof(global::OpenRouter.WebSearchEngine) + + || typeToConvert == typeof(global::OpenRouter.WebSearchEngine?) + + || typeToConvert == typeof(global::OpenRouter.WebSearchPluginId) + + || typeToConvert == typeof(global::OpenRouter.WebSearchPluginId?) + + || typeToConvert == typeof(global::OpenRouter.WebSearchPluginUserLocationType) + + || typeToConvert == typeof(global::OpenRouter.WebSearchPluginUserLocationType?) + + || typeToConvert == typeof(global::OpenRouter.WebFetchPluginId) + + || typeToConvert == typeof(global::OpenRouter.WebFetchPluginId?) + + || typeToConvert == typeof(global::OpenRouter.PromptCacheOptionsMode) + + || typeToConvert == typeof(global::OpenRouter.PromptCacheOptionsMode?) + + || typeToConvert == typeof(global::OpenRouter.ProviderPreferencesDataCollection) + + || typeToConvert == typeof(global::OpenRouter.ProviderPreferencesDataCollection?) + + || typeToConvert == typeof(global::OpenRouter.ProviderName) + + || typeToConvert == typeof(global::OpenRouter.ProviderName?) + + || typeToConvert == typeof(global::OpenRouter.Quantization) + + || typeToConvert == typeof(global::OpenRouter.Quantization?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSort) + + || typeToConvert == typeof(global::OpenRouter.ProviderSort?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition?) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenFinishReasonIsType) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenFinishReasonIsType?) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenHasToolCallType) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenHasToolCallType?) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxCostType) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxCostType?) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxTokensUsedType) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxTokensUsedType?) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenStepCountIsType) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenStepCountIsType?) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenConditionDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenConditionDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.PipelineStageType) + + || typeToConvert == typeof(global::OpenRouter.PipelineStageType?) + + || typeToConvert == typeof(global::OpenRouter.RoutingStrategy) + + || typeToConvert == typeof(global::OpenRouter.RoutingStrategy?) + + || typeToConvert == typeof(global::OpenRouter.ChatContentItemsDiscriminatorMappingImageUrlImageUrlDetail) + + || typeToConvert == typeof(global::OpenRouter.ChatContentItemsDiscriminatorMappingImageUrlImageUrlDetail?) + + || typeToConvert == typeof(global::OpenRouter.LegacyChatContentVideoType) + + || typeToConvert == typeof(global::OpenRouter.LegacyChatContentVideoType?) + + || typeToConvert == typeof(global::OpenRouter.ChatContentCacheControlType) + + || typeToConvert == typeof(global::OpenRouter.ChatContentCacheControlType?) + + || typeToConvert == typeof(global::OpenRouter.ChatContentTextType) + + || typeToConvert == typeof(global::OpenRouter.ChatContentTextType?) + + || typeToConvert == typeof(global::OpenRouter.ChatContentVideoType) + + || typeToConvert == typeof(global::OpenRouter.ChatContentVideoType?) + + || typeToConvert == typeof(global::OpenRouter.ChatContentItemsVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.ChatContentItemsVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.ChatContentItemsVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.ChatContentItemsVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.ChatContentItemsVariant3Type) + + || typeToConvert == typeof(global::OpenRouter.ChatContentItemsVariant3Type?) + + || typeToConvert == typeof(global::OpenRouter.ChatContentItemsDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.ChatContentItemsDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant3Type) + + || typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant3Type?) + + || typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant4Type) + + || typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant4Type?) + + || typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.ChatToolCallType) + + || typeToConvert == typeof(global::OpenRouter.ChatToolCallType?) + + || typeToConvert == typeof(global::OpenRouter.ChatSystemMessageRole) + + || typeToConvert == typeof(global::OpenRouter.ChatSystemMessageRole?) + + || typeToConvert == typeof(global::OpenRouter.ChatToolMessageRole) + + || typeToConvert == typeof(global::OpenRouter.ChatToolMessageRole?) + + || typeToConvert == typeof(global::OpenRouter.ChatUserMessageRole) + + || typeToConvert == typeof(global::OpenRouter.ChatUserMessageRole?) + + || typeToConvert == typeof(global::OpenRouter.ChatMessagesVariant1Role) + + || typeToConvert == typeof(global::OpenRouter.ChatMessagesVariant1Role?) + + || typeToConvert == typeof(global::OpenRouter.ChatMessagesVariant2Role) + + || typeToConvert == typeof(global::OpenRouter.ChatMessagesVariant2Role?) + + || typeToConvert == typeof(global::OpenRouter.ChatMessagesDiscriminatorRole) + + || typeToConvert == typeof(global::OpenRouter.ChatMessagesDiscriminatorRole?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestModalitiesItems) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestModalitiesItems?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant1Id) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant1Id?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant2Id) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant2Id?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant3Id) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant3Id?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant4Id) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant4Id?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant5Id) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant5Id?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant6Id) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant6Id?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant7Id) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant7Id?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant8Id) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant8Id?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsDiscriminatorId) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsDiscriminatorId?) + + || typeToConvert == typeof(global::OpenRouter.PredictionContentTextType) + + || typeToConvert == typeof(global::OpenRouter.PredictionContentTextType?) + + || typeToConvert == typeof(global::OpenRouter.PredictionType) + + || typeToConvert == typeof(global::OpenRouter.PredictionType?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestReasoningEffort) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestReasoningEffort?) + + || typeToConvert == typeof(global::OpenRouter.ChatReasoningSummaryVerbosityEnum) + + || typeToConvert == typeof(global::OpenRouter.ChatReasoningSummaryVerbosityEnum?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant3Type) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant3Type?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant4Type) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant4Type?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant5Type) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant5Type?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestServiceTier) + + || typeToConvert == typeof(global::OpenRouter.ChatRequestServiceTier?) + + || typeToConvert == typeof(global::OpenRouter.ChatToolChoice0) + + || typeToConvert == typeof(global::OpenRouter.ChatToolChoice0?) + + || typeToConvert == typeof(global::OpenRouter.ChatToolChoice1) + + || typeToConvert == typeof(global::OpenRouter.ChatToolChoice1?) + + || typeToConvert == typeof(global::OpenRouter.ChatToolChoice2) + + || typeToConvert == typeof(global::OpenRouter.ChatToolChoice2?) + + || typeToConvert == typeof(global::OpenRouter.ChatNamedToolChoiceType) + + || typeToConvert == typeof(global::OpenRouter.ChatNamedToolChoiceType?) + + || typeToConvert == typeof(global::OpenRouter.ChatFunctionToolOneOf0Type) + + || typeToConvert == typeof(global::OpenRouter.ChatFunctionToolOneOf0Type?) + + || typeToConvert == typeof(global::OpenRouter.ChatSearchModelsServerToolType) + + || typeToConvert == typeof(global::OpenRouter.ChatSearchModelsServerToolType?) + + || typeToConvert == typeof(global::OpenRouter.OpenRouterWebSearchServerToolType) + + || typeToConvert == typeof(global::OpenRouter.OpenRouterWebSearchServerToolType?) + + || typeToConvert == typeof(global::OpenRouter.ChatWebSearchShorthandType) + + || typeToConvert == typeof(global::OpenRouter.ChatWebSearchShorthandType?) + + || typeToConvert == typeof(global::OpenRouter.ChatFinishReasonEnum) + + || typeToConvert == typeof(global::OpenRouter.ChatFinishReasonEnum?) + + || typeToConvert == typeof(global::OpenRouter.ChatResultObject) + + || typeToConvert == typeof(global::OpenRouter.ChatResultObject?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.MetadataLevel)) + { + return new global::OpenRouter.JsonConverters.MetadataLevelJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.MetadataLevel?)) + { + return new global::OpenRouter.JsonConverters.MetadataLevelNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlTtl)) + { + return new global::OpenRouter.JsonConverters.AnthropicCacheControlTtlJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlTtl?)) + { + return new global::OpenRouter.JsonConverters.AnthropicCacheControlTtlNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlDirectiveType)) + { + return new global::OpenRouter.JsonConverters.AnthropicCacheControlDirectiveTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCacheControlDirectiveType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicCacheControlDirectiveTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningFormat)) + { + return new global::OpenRouter.JsonConverters.ReasoningFormatJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningFormat?)) + { + return new global::OpenRouter.JsonConverters.ReasoningFormatNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PromptCacheBreakpointMode)) + { + return new global::OpenRouter.JsonConverters.PromptCacheBreakpointModeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PromptCacheBreakpointMode?)) + { + return new global::OpenRouter.JsonConverters.PromptCacheBreakpointModeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchEngineEnum)) + { + return new global::OpenRouter.JsonConverters.WebSearchEngineEnumJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchEngineEnum?)) + { + return new global::OpenRouter.JsonConverters.WebSearchEngineEnumNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AdvisorReasoningEffort)) + { + return new global::OpenRouter.JsonConverters.AdvisorReasoningEffortJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AdvisorReasoningEffort?)) + { + return new global::OpenRouter.JsonConverters.AdvisorReasoningEffortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AdvisorServerToolOpenRouterType)) + { + return new global::OpenRouter.JsonConverters.AdvisorServerToolOpenRouterTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AdvisorServerToolOpenRouterType?)) + { + return new global::OpenRouter.JsonConverters.AdvisorServerToolOpenRouterTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.SubagentReasoningEffort)) + { + return new global::OpenRouter.JsonConverters.SubagentReasoningEffortJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.SubagentReasoningEffort?)) + { + return new global::OpenRouter.JsonConverters.SubagentReasoningEffortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.SubagentServerToolOpenRouterType)) + { + return new global::OpenRouter.JsonConverters.SubagentServerToolOpenRouterTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.SubagentServerToolOpenRouterType?)) + { + return new global::OpenRouter.JsonConverters.SubagentServerToolOpenRouterTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatetimeServerToolType)) + { + return new global::OpenRouter.JsonConverters.DatetimeServerToolTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatetimeServerToolType?)) + { + return new global::OpenRouter.JsonConverters.DatetimeServerToolTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.FilesServerToolType)) + { + return new global::OpenRouter.JsonConverters.FilesServerToolTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.FilesServerToolType?)) + { + return new global::OpenRouter.JsonConverters.FilesServerToolTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.FusionServerToolConfigReasoningEffort)) + { + return new global::OpenRouter.JsonConverters.FusionServerToolConfigReasoningEffortJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.FusionServerToolConfigReasoningEffort?)) + { + return new global::OpenRouter.JsonConverters.FusionServerToolConfigReasoningEffortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.FusionServerToolOpenRouterType)) + { + return new global::OpenRouter.JsonConverters.FusionServerToolOpenRouterTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.FusionServerToolOpenRouterType?)) + { + return new global::OpenRouter.JsonConverters.FusionServerToolOpenRouterTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageGenerationServerToolOpenRouterType)) + { + return new global::OpenRouter.JsonConverters.ImageGenerationServerToolOpenRouterTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageGenerationServerToolOpenRouterType?)) + { + return new global::OpenRouter.JsonConverters.ImageGenerationServerToolOpenRouterTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebFetchEngineEnum)) + { + return new global::OpenRouter.JsonConverters.WebFetchEngineEnumJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebFetchEngineEnum?)) + { + return new global::OpenRouter.JsonConverters.WebFetchEngineEnumNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebFetchServerToolType)) + { + return new global::OpenRouter.JsonConverters.WebFetchServerToolTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebFetchServerToolType?)) + { + return new global::OpenRouter.JsonConverters.WebFetchServerToolTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.SearchQualityLevel)) + { + return new global::OpenRouter.JsonConverters.SearchQualityLevelJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.SearchQualityLevel?)) + { + return new global::OpenRouter.JsonConverters.SearchQualityLevelNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchUserLocationServerToolType)) + { + return new global::OpenRouter.JsonConverters.WebSearchUserLocationServerToolTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchUserLocationServerToolType?)) + { + return new global::OpenRouter.JsonConverters.WebSearchUserLocationServerToolTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEngine)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEngineJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEngine?)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEngineNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant1Type)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEnvironmentVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEnvironmentVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant2Type)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEnvironmentVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEnvironmentVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEnvironmentDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolEnvironmentDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.BashServerToolEnvironmentDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolType)) + { + return new global::OpenRouter.JsonConverters.BashServerToolTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.BashServerToolType?)) + { + return new global::OpenRouter.JsonConverters.BashServerToolTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContextCompressionEngine)) + { + return new global::OpenRouter.JsonConverters.ContextCompressionEngineJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContextCompressionEngine?)) + { + return new global::OpenRouter.JsonConverters.ContextCompressionEngineNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PdfParserEngine0)) + { + return new global::OpenRouter.JsonConverters.PdfParserEngine0JsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PdfParserEngine0?)) + { + return new global::OpenRouter.JsonConverters.PdfParserEngine0NullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PdfParserEngine1)) + { + return new global::OpenRouter.JsonConverters.PdfParserEngine1JsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PdfParserEngine1?)) + { + return new global::OpenRouter.JsonConverters.PdfParserEngine1NullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset)) + { + return new global::OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPresetJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPreset?)) + { + return new global::OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionPresetNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource)) + { + return new global::OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSourceJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSource?)) + { + return new global::OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingParetoRouterPriceSourceNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchEngine)) + { + return new global::OpenRouter.JsonConverters.WebSearchEngineJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchEngine?)) + { + return new global::OpenRouter.JsonConverters.WebSearchEngineNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchPluginId)) + { + return new global::OpenRouter.JsonConverters.WebSearchPluginIdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchPluginId?)) + { + return new global::OpenRouter.JsonConverters.WebSearchPluginIdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchPluginUserLocationType)) + { + return new global::OpenRouter.JsonConverters.WebSearchPluginUserLocationTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebSearchPluginUserLocationType?)) + { + return new global::OpenRouter.JsonConverters.WebSearchPluginUserLocationTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebFetchPluginId)) + { + return new global::OpenRouter.JsonConverters.WebFetchPluginIdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WebFetchPluginId?)) + { + return new global::OpenRouter.JsonConverters.WebFetchPluginIdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PromptCacheOptionsMode)) + { + return new global::OpenRouter.JsonConverters.PromptCacheOptionsModeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PromptCacheOptionsMode?)) + { + return new global::OpenRouter.JsonConverters.PromptCacheOptionsModeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderPreferencesDataCollection)) + { + return new global::OpenRouter.JsonConverters.ProviderPreferencesDataCollectionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderPreferencesDataCollection?)) + { + return new global::OpenRouter.JsonConverters.ProviderPreferencesDataCollectionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderName)) + { + return new global::OpenRouter.JsonConverters.ProviderNameJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderName?)) + { + return new global::OpenRouter.JsonConverters.ProviderNameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Quantization)) + { + return new global::OpenRouter.JsonConverters.QuantizationJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Quantization?)) + { + return new global::OpenRouter.JsonConverters.QuantizationNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSort)) + { + return new global::OpenRouter.JsonConverters.ProviderSortJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSort?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigByJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigByNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigPartitionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigPartitionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenFinishReasonIsType)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenFinishReasonIsTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenFinishReasonIsType?)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenFinishReasonIsTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenHasToolCallType)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenHasToolCallTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenHasToolCallType?)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenHasToolCallTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxCostType)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenMaxCostTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxCostType?)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenMaxCostTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxTokensUsedType)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenMaxTokensUsedTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenMaxTokensUsedType?)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenMaxTokensUsedTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenStepCountIsType)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenStepCountIsTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenStepCountIsType?)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenStepCountIsTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenConditionDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenConditionDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.StopServerToolsWhenConditionDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.StopServerToolsWhenConditionDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PipelineStageType)) + { + return new global::OpenRouter.JsonConverters.PipelineStageTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PipelineStageType?)) + { + return new global::OpenRouter.JsonConverters.PipelineStageTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.RoutingStrategy)) + { + return new global::OpenRouter.JsonConverters.RoutingStrategyJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.RoutingStrategy?)) + { + return new global::OpenRouter.JsonConverters.RoutingStrategyNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentItemsDiscriminatorMappingImageUrlImageUrlDetail)) + { + return new global::OpenRouter.JsonConverters.ChatContentItemsDiscriminatorMappingImageUrlImageUrlDetailJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentItemsDiscriminatorMappingImageUrlImageUrlDetail?)) + { + return new global::OpenRouter.JsonConverters.ChatContentItemsDiscriminatorMappingImageUrlImageUrlDetailNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.LegacyChatContentVideoType)) + { + return new global::OpenRouter.JsonConverters.LegacyChatContentVideoTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.LegacyChatContentVideoType?)) + { + return new global::OpenRouter.JsonConverters.LegacyChatContentVideoTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentCacheControlType)) + { + return new global::OpenRouter.JsonConverters.ChatContentCacheControlTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentCacheControlType?)) + { + return new global::OpenRouter.JsonConverters.ChatContentCacheControlTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentTextType)) + { + return new global::OpenRouter.JsonConverters.ChatContentTextTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentTextType?)) + { + return new global::OpenRouter.JsonConverters.ChatContentTextTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentVideoType)) + { + return new global::OpenRouter.JsonConverters.ChatContentVideoTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentVideoType?)) + { + return new global::OpenRouter.JsonConverters.ChatContentVideoTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentItemsVariant1Type)) + { + return new global::OpenRouter.JsonConverters.ChatContentItemsVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentItemsVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.ChatContentItemsVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentItemsVariant2Type)) + { + return new global::OpenRouter.JsonConverters.ChatContentItemsVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentItemsVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.ChatContentItemsVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentItemsVariant3Type)) + { + return new global::OpenRouter.JsonConverters.ChatContentItemsVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentItemsVariant3Type?)) + { + return new global::OpenRouter.JsonConverters.ChatContentItemsVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentItemsDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.ChatContentItemsDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatContentItemsDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.ChatContentItemsDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant1Type)) + { + return new global::OpenRouter.JsonConverters.ReasoningDetailUnionVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.ReasoningDetailUnionVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant2Type)) + { + return new global::OpenRouter.JsonConverters.ReasoningDetailUnionVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.ReasoningDetailUnionVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant3Type)) + { + return new global::OpenRouter.JsonConverters.ReasoningDetailUnionVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant3Type?)) + { + return new global::OpenRouter.JsonConverters.ReasoningDetailUnionVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant4Type)) + { + return new global::OpenRouter.JsonConverters.ReasoningDetailUnionVariant4TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionVariant4Type?)) + { + return new global::OpenRouter.JsonConverters.ReasoningDetailUnionVariant4TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.ReasoningDetailUnionDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningDetailUnionDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.ReasoningDetailUnionDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatToolCallType)) + { + return new global::OpenRouter.JsonConverters.ChatToolCallTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatToolCallType?)) + { + return new global::OpenRouter.JsonConverters.ChatToolCallTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatSystemMessageRole)) + { + return new global::OpenRouter.JsonConverters.ChatSystemMessageRoleJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatSystemMessageRole?)) + { + return new global::OpenRouter.JsonConverters.ChatSystemMessageRoleNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatToolMessageRole)) + { + return new global::OpenRouter.JsonConverters.ChatToolMessageRoleJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatToolMessageRole?)) + { + return new global::OpenRouter.JsonConverters.ChatToolMessageRoleNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatUserMessageRole)) + { + return new global::OpenRouter.JsonConverters.ChatUserMessageRoleJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatUserMessageRole?)) + { + return new global::OpenRouter.JsonConverters.ChatUserMessageRoleNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatMessagesVariant1Role)) + { + return new global::OpenRouter.JsonConverters.ChatMessagesVariant1RoleJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatMessagesVariant1Role?)) + { + return new global::OpenRouter.JsonConverters.ChatMessagesVariant1RoleNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatMessagesVariant2Role)) + { + return new global::OpenRouter.JsonConverters.ChatMessagesVariant2RoleJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatMessagesVariant2Role?)) + { + return new global::OpenRouter.JsonConverters.ChatMessagesVariant2RoleNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatMessagesDiscriminatorRole)) + { + return new global::OpenRouter.JsonConverters.ChatMessagesDiscriminatorRoleJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatMessagesDiscriminatorRole?)) + { + return new global::OpenRouter.JsonConverters.ChatMessagesDiscriminatorRoleNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestModalitiesItems)) + { + return new global::OpenRouter.JsonConverters.ChatRequestModalitiesItemsJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestModalitiesItems?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestModalitiesItemsNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant1Id)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant1IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant1Id?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant1IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant2Id)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant2IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant2Id?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant2IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant3Id)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant3IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant3Id?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant3IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant4Id)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant4IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant4Id?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant4IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant5Id)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant5IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant5Id?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant5IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant6Id)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant6IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant6Id?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant6IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant7Id)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant7IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant7Id?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant7IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant8Id)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant8IdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsVariant8Id?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsVariant8IdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsDiscriminatorId)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsDiscriminatorIdJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestPluginsItemsDiscriminatorId?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestPluginsItemsDiscriminatorIdNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PredictionContentTextType)) + { + return new global::OpenRouter.JsonConverters.PredictionContentTextTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PredictionContentTextType?)) + { + return new global::OpenRouter.JsonConverters.PredictionContentTextTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PredictionType)) + { + return new global::OpenRouter.JsonConverters.PredictionTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PredictionType?)) + { + return new global::OpenRouter.JsonConverters.PredictionTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestReasoningEffort)) + { + return new global::OpenRouter.JsonConverters.ChatRequestReasoningEffortJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestReasoningEffort?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestReasoningEffortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatReasoningSummaryVerbosityEnum)) + { + return new global::OpenRouter.JsonConverters.ChatReasoningSummaryVerbosityEnumJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatReasoningSummaryVerbosityEnum?)) + { + return new global::OpenRouter.JsonConverters.ChatReasoningSummaryVerbosityEnumNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant1Type)) + { + return new global::OpenRouter.JsonConverters.ChatRequestResponseFormatVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestResponseFormatVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant2Type)) + { + return new global::OpenRouter.JsonConverters.ChatRequestResponseFormatVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestResponseFormatVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant3Type)) + { + return new global::OpenRouter.JsonConverters.ChatRequestResponseFormatVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant3Type?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestResponseFormatVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant4Type)) + { + return new global::OpenRouter.JsonConverters.ChatRequestResponseFormatVariant4TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant4Type?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestResponseFormatVariant4TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant5Type)) + { + return new global::OpenRouter.JsonConverters.ChatRequestResponseFormatVariant5TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatVariant5Type?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestResponseFormatVariant5TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.ChatRequestResponseFormatDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestResponseFormatDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestResponseFormatDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestServiceTier)) + { + return new global::OpenRouter.JsonConverters.ChatRequestServiceTierJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatRequestServiceTier?)) + { + return new global::OpenRouter.JsonConverters.ChatRequestServiceTierNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatToolChoice0)) + { + return new global::OpenRouter.JsonConverters.ChatToolChoice0JsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatToolChoice0?)) + { + return new global::OpenRouter.JsonConverters.ChatToolChoice0NullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatToolChoice1)) + { + return new global::OpenRouter.JsonConverters.ChatToolChoice1JsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatToolChoice1?)) + { + return new global::OpenRouter.JsonConverters.ChatToolChoice1NullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatToolChoice2)) + { + return new global::OpenRouter.JsonConverters.ChatToolChoice2JsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatToolChoice2?)) + { + return new global::OpenRouter.JsonConverters.ChatToolChoice2NullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatNamedToolChoiceType)) + { + return new global::OpenRouter.JsonConverters.ChatNamedToolChoiceTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatNamedToolChoiceType?)) + { + return new global::OpenRouter.JsonConverters.ChatNamedToolChoiceTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatFunctionToolOneOf0Type)) + { + return new global::OpenRouter.JsonConverters.ChatFunctionToolOneOf0TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatFunctionToolOneOf0Type?)) + { + return new global::OpenRouter.JsonConverters.ChatFunctionToolOneOf0TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatSearchModelsServerToolType)) + { + return new global::OpenRouter.JsonConverters.ChatSearchModelsServerToolTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatSearchModelsServerToolType?)) + { + return new global::OpenRouter.JsonConverters.ChatSearchModelsServerToolTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OpenRouterWebSearchServerToolType)) + { + return new global::OpenRouter.JsonConverters.OpenRouterWebSearchServerToolTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OpenRouterWebSearchServerToolType?)) + { + return new global::OpenRouter.JsonConverters.OpenRouterWebSearchServerToolTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatWebSearchShorthandType)) + { + return new global::OpenRouter.JsonConverters.ChatWebSearchShorthandTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatWebSearchShorthandType?)) + { + return new global::OpenRouter.JsonConverters.ChatWebSearchShorthandTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatFinishReasonEnum)) + { + return new global::OpenRouter.JsonConverters.ChatFinishReasonEnumJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatFinishReasonEnum?)) + { + return new global::OpenRouter.JsonConverters.ChatFinishReasonEnumNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatResultObject)) + { + return new global::OpenRouter.JsonConverters.ChatResultObjectJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ChatResultObject?)) + { + return new global::OpenRouter.JsonConverters.ChatResultObjectNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ChatSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ChatClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ChatClient.g.cs index cd5ea1b0..eb188574 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ChatClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ChatClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class ChatClient : global::OpenRouter.IChatClient, global: /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.ChatSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Classifications.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Classifications.JsonSerializerContext.g.cs new file mode 100644 index 00000000..121f2eef --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Classifications.JsonSerializerContext.g.cs @@ -0,0 +1,181 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ClassificationsTaskGetParametersWindow), TypeInfoPropertyName = "ClassificationsTaskGetParametersWindow2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TaskClassificationModel))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TaskClassificationItem))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TaskClassificationMacroCategory))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TaskClassificationResponseData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TaskClassificationResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ClassificationsTaskGetParametersWindow?), TypeInfoPropertyName = "NullableClassificationsTaskGetParametersWindow2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class ClassificationsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ClassificationsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ClassificationsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ClassificationsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.ClassificationsTaskGetParametersWindow) + + || typeToConvert == typeof(global::OpenRouter.ClassificationsTaskGetParametersWindow?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.ClassificationsTaskGetParametersWindow)) + { + return new global::OpenRouter.JsonConverters.ClassificationsTaskGetParametersWindowJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ClassificationsTaskGetParametersWindow?)) + { + return new global::OpenRouter.JsonConverters.ClassificationsTaskGetParametersWindowNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ClassificationsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ClassificationsClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ClassificationsClient.g.cs index b0fb8bda..995b2bcd 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ClassificationsClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ClassificationsClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class ClassificationsClient : global::OpenRouter.IClassifi /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.ClassificationsSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Credits.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Credits.JsonSerializerContext.g.cs new file mode 100644 index 00000000..941c0612 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Credits.JsonSerializerContext.g.cs @@ -0,0 +1,139 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreditsGetResponsesContentApplicationJsonSchemaData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreditsGetCreditsResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + internal sealed partial class CreditsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class CreditsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static CreditsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private CreditsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new CreditsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.CreditsClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.CreditsClient.g.cs index 9e6bf784..49e1f402 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.CreditsClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.CreditsClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class CreditsClient : global::OpenRouter.ICreditsClient, g /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.CreditsSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Datasets.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Datasets.JsonSerializerContext.g.cs new file mode 100644 index 00000000..2feed19c --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Datasets.JsonSerializerContext.g.cs @@ -0,0 +1,305 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsAppRankingsGetParametersCategory), TypeInfoPropertyName = "DatasetsAppRankingsGetParametersCategory2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsAppRankingsGetParametersSubcategory), TypeInfoPropertyName = "DatasetsAppRankingsGetParametersSubcategory2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsAppRankingsGetParametersSort), TypeInfoPropertyName = "DatasetsAppRankingsGetParametersSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AppRankingsItem))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RankingsDailyMetaVersion), TypeInfoPropertyName = "RankingsDailyMetaVersion2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RankingsDailyMeta))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AppRankingsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersPeriod), TypeInfoPropertyName = "DatasetsRankingsDailyGetParametersPeriod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersModality), TypeInfoPropertyName = "DatasetsRankingsDailyGetParametersModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersContextBucket), TypeInfoPropertyName = "DatasetsRankingsDailyGetParametersContextBucket2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersCategory), TypeInfoPropertyName = "DatasetsRankingsDailyGetParametersCategory2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersLanguageType), TypeInfoPropertyName = "DatasetsRankingsDailyGetParametersLanguageType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RankingsDailyItem))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RankingsDailyResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsAppRankingsGetParametersCategory?), TypeInfoPropertyName = "NullableDatasetsAppRankingsGetParametersCategory2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsAppRankingsGetParametersSubcategory?), TypeInfoPropertyName = "NullableDatasetsAppRankingsGetParametersSubcategory2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsAppRankingsGetParametersSort?), TypeInfoPropertyName = "NullableDatasetsAppRankingsGetParametersSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RankingsDailyMetaVersion?), TypeInfoPropertyName = "NullableRankingsDailyMetaVersion2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersPeriod?), TypeInfoPropertyName = "NullableDatasetsRankingsDailyGetParametersPeriod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersModality?), TypeInfoPropertyName = "NullableDatasetsRankingsDailyGetParametersModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersContextBucket?), TypeInfoPropertyName = "NullableDatasetsRankingsDailyGetParametersContextBucket2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersCategory?), TypeInfoPropertyName = "NullableDatasetsRankingsDailyGetParametersCategory2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersLanguageType?), TypeInfoPropertyName = "NullableDatasetsRankingsDailyGetParametersLanguageType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class DatasetsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class DatasetsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static DatasetsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private DatasetsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.DatasetsAppRankingsGetParametersCategory) + + || typeToConvert == typeof(global::OpenRouter.DatasetsAppRankingsGetParametersCategory?) + + || typeToConvert == typeof(global::OpenRouter.DatasetsAppRankingsGetParametersSubcategory) + + || typeToConvert == typeof(global::OpenRouter.DatasetsAppRankingsGetParametersSubcategory?) + + || typeToConvert == typeof(global::OpenRouter.DatasetsAppRankingsGetParametersSort) + + || typeToConvert == typeof(global::OpenRouter.DatasetsAppRankingsGetParametersSort?) + + || typeToConvert == typeof(global::OpenRouter.RankingsDailyMetaVersion) + + || typeToConvert == typeof(global::OpenRouter.RankingsDailyMetaVersion?) + + || typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersPeriod) + + || typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersPeriod?) + + || typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersModality) + + || typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersModality?) + + || typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersContextBucket) + + || typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersContextBucket?) + + || typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersCategory) + + || typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersCategory?) + + || typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersLanguageType) + + || typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersLanguageType?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.DatasetsAppRankingsGetParametersCategory)) + { + return new global::OpenRouter.JsonConverters.DatasetsAppRankingsGetParametersCategoryJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsAppRankingsGetParametersCategory?)) + { + return new global::OpenRouter.JsonConverters.DatasetsAppRankingsGetParametersCategoryNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsAppRankingsGetParametersSubcategory)) + { + return new global::OpenRouter.JsonConverters.DatasetsAppRankingsGetParametersSubcategoryJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsAppRankingsGetParametersSubcategory?)) + { + return new global::OpenRouter.JsonConverters.DatasetsAppRankingsGetParametersSubcategoryNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsAppRankingsGetParametersSort)) + { + return new global::OpenRouter.JsonConverters.DatasetsAppRankingsGetParametersSortJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsAppRankingsGetParametersSort?)) + { + return new global::OpenRouter.JsonConverters.DatasetsAppRankingsGetParametersSortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.RankingsDailyMetaVersion)) + { + return new global::OpenRouter.JsonConverters.RankingsDailyMetaVersionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.RankingsDailyMetaVersion?)) + { + return new global::OpenRouter.JsonConverters.RankingsDailyMetaVersionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersPeriod)) + { + return new global::OpenRouter.JsonConverters.DatasetsRankingsDailyGetParametersPeriodJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersPeriod?)) + { + return new global::OpenRouter.JsonConverters.DatasetsRankingsDailyGetParametersPeriodNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersModality)) + { + return new global::OpenRouter.JsonConverters.DatasetsRankingsDailyGetParametersModalityJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersModality?)) + { + return new global::OpenRouter.JsonConverters.DatasetsRankingsDailyGetParametersModalityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersContextBucket)) + { + return new global::OpenRouter.JsonConverters.DatasetsRankingsDailyGetParametersContextBucketJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersContextBucket?)) + { + return new global::OpenRouter.JsonConverters.DatasetsRankingsDailyGetParametersContextBucketNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersCategory)) + { + return new global::OpenRouter.JsonConverters.DatasetsRankingsDailyGetParametersCategoryJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersCategory?)) + { + return new global::OpenRouter.JsonConverters.DatasetsRankingsDailyGetParametersCategoryNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersLanguageType)) + { + return new global::OpenRouter.JsonConverters.DatasetsRankingsDailyGetParametersLanguageTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.DatasetsRankingsDailyGetParametersLanguageType?)) + { + return new global::OpenRouter.JsonConverters.DatasetsRankingsDailyGetParametersLanguageTypeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new DatasetsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.DatasetsClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.DatasetsClient.g.cs index e19cca52..05753b55 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.DatasetsClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.DatasetsClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class DatasetsClient : global::OpenRouter.IDatasetsClient, /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.DatasetsSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Embeddings.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Embeddings.JsonSerializerContext.g.cs new file mode 100644 index 00000000..120d7e89 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Embeddings.JsonSerializerContext.g.cs @@ -0,0 +1,580 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderName), TypeInfoPropertyName = "ProviderName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PercentileLatencyCutoffs))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMaxLatency), TypeInfoPropertyName = "PreferredMaxLatency2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PercentileThroughputCutoffs))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMinThroughput), TypeInfoPropertyName = "PreferredMinThroughput2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Quantization), TypeInfoPropertyName = "Quantization2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSort), TypeInfoPropertyName = "ProviderSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigBy), TypeInfoPropertyName = "ProviderSortConfigBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigPartition), TypeInfoPropertyName = "ProviderSortConfigPartition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningEffort), TypeInfoPropertyName = "ReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ServiceUnavailableResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ServiceUnavailableResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CostDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTimeOffset))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaEncodingFormat), TypeInfoPropertyName = "EmbeddingsPostRequestBodyContentApplicationJsonSchemaEncodingFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf0Type), TypeInfoPropertyName = "EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf0Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf1ImageUrl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf1Type), TypeInfoPropertyName = "EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MultimodalMedia))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartInputAudioType), TypeInfoPropertyName = "ContentPartInputAudioType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartInputAudio))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartInputVideoType), TypeInfoPropertyName = "ContentPartInputVideoType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartInputVideo))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartInputFileType), TypeInfoPropertyName = "ContentPartInputFileType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartInputFile))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems), TypeInfoPropertyName = "EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4Items))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput), TypeInfoPropertyName = "EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderDataCollection), TypeInfoPropertyName = "EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderDataCollection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems), TypeInfoPropertyName = "EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderMaxPrice))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems), TypeInfoPropertyName = "EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItems), TypeInfoPropertyName = "EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderSort), TypeInfoPropertyName = "EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProvider))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbedding), TypeInfoPropertyName = "EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbedding2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsObject), TypeInfoPropertyName = "EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsObject2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaObject), TypeInfoPropertyName = "EmbeddingsPostResponsesContentApplicationJsonSchemaObject2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaUsagePromptTokensDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaUsage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsCreateEmbeddingsResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputModality), TypeInfoPropertyName = "InputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InstructType), TypeInfoPropertyName = "InstructType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OutputModality), TypeInfoPropertyName = "OutputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelGroup), TypeInfoPropertyName = "ModelGroup2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelArchitecture))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AABenchmarkEntry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DABenchmarkEntry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelBenchmarks))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DefaultParameters))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelLinks))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PerRequestLimits))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PricingOverride))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PublicPricing))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelReasoning))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Parameter), TypeInfoPropertyName = "Parameter2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TopProviderInfo))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Model))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsListResponseLinks))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateEmbeddingsRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderName?), TypeInfoPropertyName = "NullableProviderName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMaxLatency?), TypeInfoPropertyName = "NullablePreferredMaxLatency2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMinThroughput?), TypeInfoPropertyName = "NullablePreferredMinThroughput2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Quantization?), TypeInfoPropertyName = "NullableQuantization2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSort?), TypeInfoPropertyName = "NullableProviderSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigBy?), TypeInfoPropertyName = "NullableProviderSortConfigBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigPartition?), TypeInfoPropertyName = "NullableProviderSortConfigPartition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningEffort?), TypeInfoPropertyName = "NullableReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTimeOffset?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaEncodingFormat?), TypeInfoPropertyName = "NullableEmbeddingsPostRequestBodyContentApplicationJsonSchemaEncodingFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf0Type?), TypeInfoPropertyName = "NullableEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf0Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf1Type?), TypeInfoPropertyName = "NullableEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartInputAudioType?), TypeInfoPropertyName = "NullableContentPartInputAudioType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartInputVideoType?), TypeInfoPropertyName = "NullableContentPartInputVideoType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartInputFileType?), TypeInfoPropertyName = "NullableContentPartInputFileType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems?), TypeInfoPropertyName = "NullableEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput?), TypeInfoPropertyName = "NullableEmbeddingsPostRequestBodyContentApplicationJsonSchemaInput2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderDataCollection?), TypeInfoPropertyName = "NullableEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderDataCollection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems?), TypeInfoPropertyName = "NullableEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems?), TypeInfoPropertyName = "NullableEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItems?), TypeInfoPropertyName = "NullableEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderSort?), TypeInfoPropertyName = "NullableEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbedding?), TypeInfoPropertyName = "NullableEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbedding2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsObject?), TypeInfoPropertyName = "NullableEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsObject2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaObject?), TypeInfoPropertyName = "NullableEmbeddingsPostResponsesContentApplicationJsonSchemaObject2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputModality?), TypeInfoPropertyName = "NullableInputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InstructType?), TypeInfoPropertyName = "NullableInstructType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OutputModality?), TypeInfoPropertyName = "NullableOutputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelGroup?), TypeInfoPropertyName = "NullableModelGroup2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Parameter?), TypeInfoPropertyName = "NullableParameter2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class EmbeddingsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class EmbeddingsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static EmbeddingsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private EmbeddingsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.PreferredMaxLatencyJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.PreferredMinThroughputJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderSortJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.ProviderName) + + || typeToConvert == typeof(global::OpenRouter.ProviderName?) + + || typeToConvert == typeof(global::OpenRouter.Quantization) + + || typeToConvert == typeof(global::OpenRouter.Quantization?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSort) + + || typeToConvert == typeof(global::OpenRouter.ProviderSort?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition?) + + || typeToConvert == typeof(global::OpenRouter.ReasoningEffort) + + || typeToConvert == typeof(global::OpenRouter.ReasoningEffort?) + + || typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaEncodingFormat) + + || typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaEncodingFormat?) + + || typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf0Type) + + || typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf0Type?) + + || typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf1Type) + + || typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf1Type?) + + || typeToConvert == typeof(global::OpenRouter.ContentPartInputAudioType) + + || typeToConvert == typeof(global::OpenRouter.ContentPartInputAudioType?) + + || typeToConvert == typeof(global::OpenRouter.ContentPartInputVideoType) + + || typeToConvert == typeof(global::OpenRouter.ContentPartInputVideoType?) + + || typeToConvert == typeof(global::OpenRouter.ContentPartInputFileType) + + || typeToConvert == typeof(global::OpenRouter.ContentPartInputFileType?) + + || typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderDataCollection) + + || typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderDataCollection?) + + || typeToConvert == typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsObject) + + || typeToConvert == typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsObject?) + + || typeToConvert == typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaObject) + + || typeToConvert == typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaObject?) + + || typeToConvert == typeof(global::OpenRouter.InputModality) + + || typeToConvert == typeof(global::OpenRouter.InputModality?) + + || typeToConvert == typeof(global::OpenRouter.InstructType) + + || typeToConvert == typeof(global::OpenRouter.InstructType?) + + || typeToConvert == typeof(global::OpenRouter.OutputModality) + + || typeToConvert == typeof(global::OpenRouter.OutputModality?) + + || typeToConvert == typeof(global::OpenRouter.ModelGroup) + + || typeToConvert == typeof(global::OpenRouter.ModelGroup?) + + || typeToConvert == typeof(global::OpenRouter.Parameter) + + || typeToConvert == typeof(global::OpenRouter.Parameter?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.ProviderName)) + { + return new global::OpenRouter.JsonConverters.ProviderNameJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderName?)) + { + return new global::OpenRouter.JsonConverters.ProviderNameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Quantization)) + { + return new global::OpenRouter.JsonConverters.QuantizationJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Quantization?)) + { + return new global::OpenRouter.JsonConverters.QuantizationNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSort)) + { + return new global::OpenRouter.JsonConverters.ProviderSortJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSort?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigByJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigByNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigPartitionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigPartitionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningEffort)) + { + return new global::OpenRouter.JsonConverters.ReasoningEffortJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningEffort?)) + { + return new global::OpenRouter.JsonConverters.ReasoningEffortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaEncodingFormat)) + { + return new global::OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaEncodingFormatJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaEncodingFormat?)) + { + return new global::OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaEncodingFormatNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf0Type)) + { + return new global::OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf0TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf0Type?)) + { + return new global::OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf0TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf1Type)) + { + return new global::OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf1Type?)) + { + return new global::OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItemsOneOf1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContentPartInputAudioType)) + { + return new global::OpenRouter.JsonConverters.ContentPartInputAudioTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContentPartInputAudioType?)) + { + return new global::OpenRouter.JsonConverters.ContentPartInputAudioTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContentPartInputVideoType)) + { + return new global::OpenRouter.JsonConverters.ContentPartInputVideoTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContentPartInputVideoType?)) + { + return new global::OpenRouter.JsonConverters.ContentPartInputVideoTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContentPartInputFileType)) + { + return new global::OpenRouter.JsonConverters.ContentPartInputFileTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContentPartInputFileType?)) + { + return new global::OpenRouter.JsonConverters.ContentPartInputFileTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderDataCollection)) + { + return new global::OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderDataCollectionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderDataCollection?)) + { + return new global::OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderDataCollectionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsObject)) + { + return new global::OpenRouter.JsonConverters.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsObjectJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsObject?)) + { + return new global::OpenRouter.JsonConverters.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsObjectNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaObject)) + { + return new global::OpenRouter.JsonConverters.EmbeddingsPostResponsesContentApplicationJsonSchemaObjectJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EmbeddingsPostResponsesContentApplicationJsonSchemaObject?)) + { + return new global::OpenRouter.JsonConverters.EmbeddingsPostResponsesContentApplicationJsonSchemaObjectNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InputModality)) + { + return new global::OpenRouter.JsonConverters.InputModalityJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InputModality?)) + { + return new global::OpenRouter.JsonConverters.InputModalityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InstructType)) + { + return new global::OpenRouter.JsonConverters.InstructTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InstructType?)) + { + return new global::OpenRouter.JsonConverters.InstructTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OutputModality)) + { + return new global::OpenRouter.JsonConverters.OutputModalityJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OutputModality?)) + { + return new global::OpenRouter.JsonConverters.OutputModalityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelGroup)) + { + return new global::OpenRouter.JsonConverters.ModelGroupJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelGroup?)) + { + return new global::OpenRouter.JsonConverters.ModelGroupNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Parameter)) + { + return new global::OpenRouter.JsonConverters.ParameterJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Parameter?)) + { + return new global::OpenRouter.JsonConverters.ParameterNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new EmbeddingsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.EmbeddingsClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.EmbeddingsClient.g.cs index c44d63b7..f81152a4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.EmbeddingsClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.EmbeddingsClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class EmbeddingsClient : global::OpenRouter.IEmbeddingsCli /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.EmbeddingsSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Endpoints.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Endpoints.JsonSerializerContext.g.cs new file mode 100644 index 00000000..b06b25f4 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Endpoints.JsonSerializerContext.g.cs @@ -0,0 +1,301 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderName), TypeInfoPropertyName = "ProviderName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Quantization), TypeInfoPropertyName = "Quantization2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTimeOffset))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputModality), TypeInfoPropertyName = "InputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InstructType), TypeInfoPropertyName = "InstructType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OutputModality), TypeInfoPropertyName = "OutputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelGroup), TypeInfoPropertyName = "ModelGroup2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PricingOverride))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Parameter), TypeInfoPropertyName = "Parameter2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PercentileStats))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PublicEndpointPricing))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EndpointStatus), TypeInfoPropertyName = "EndpointStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PublicEndpointThroughputLast30M))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PublicEndpoint))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EndpointsListEndpointsZdrResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ListEndpointsResponseArchitecture))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ListEndpointsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EndpointsListEndpointsResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderName?), TypeInfoPropertyName = "NullableProviderName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Quantization?), TypeInfoPropertyName = "NullableQuantization2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTimeOffset?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputModality?), TypeInfoPropertyName = "NullableInputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InstructType?), TypeInfoPropertyName = "NullableInstructType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OutputModality?), TypeInfoPropertyName = "NullableOutputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelGroup?), TypeInfoPropertyName = "NullableModelGroup2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Parameter?), TypeInfoPropertyName = "NullableParameter2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EndpointStatus?), TypeInfoPropertyName = "NullableEndpointStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class EndpointsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class EndpointsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static EndpointsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private EndpointsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.ProviderName) + + || typeToConvert == typeof(global::OpenRouter.ProviderName?) + + || typeToConvert == typeof(global::OpenRouter.Quantization) + + || typeToConvert == typeof(global::OpenRouter.Quantization?) + + || typeToConvert == typeof(global::OpenRouter.InputModality) + + || typeToConvert == typeof(global::OpenRouter.InputModality?) + + || typeToConvert == typeof(global::OpenRouter.InstructType) + + || typeToConvert == typeof(global::OpenRouter.InstructType?) + + || typeToConvert == typeof(global::OpenRouter.OutputModality) + + || typeToConvert == typeof(global::OpenRouter.OutputModality?) + + || typeToConvert == typeof(global::OpenRouter.ModelGroup) + + || typeToConvert == typeof(global::OpenRouter.ModelGroup?) + + || typeToConvert == typeof(global::OpenRouter.Parameter) + + || typeToConvert == typeof(global::OpenRouter.Parameter?) + + || typeToConvert == typeof(global::OpenRouter.EndpointStatus) + + || typeToConvert == typeof(global::OpenRouter.EndpointStatus?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.ProviderName)) + { + return new global::OpenRouter.JsonConverters.ProviderNameJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderName?)) + { + return new global::OpenRouter.JsonConverters.ProviderNameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Quantization)) + { + return new global::OpenRouter.JsonConverters.QuantizationJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Quantization?)) + { + return new global::OpenRouter.JsonConverters.QuantizationNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InputModality)) + { + return new global::OpenRouter.JsonConverters.InputModalityJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InputModality?)) + { + return new global::OpenRouter.JsonConverters.InputModalityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InstructType)) + { + return new global::OpenRouter.JsonConverters.InstructTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InstructType?)) + { + return new global::OpenRouter.JsonConverters.InstructTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OutputModality)) + { + return new global::OpenRouter.JsonConverters.OutputModalityJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OutputModality?)) + { + return new global::OpenRouter.JsonConverters.OutputModalityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelGroup)) + { + return new global::OpenRouter.JsonConverters.ModelGroupJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelGroup?)) + { + return new global::OpenRouter.JsonConverters.ModelGroupNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Parameter)) + { + return new global::OpenRouter.JsonConverters.ParameterJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Parameter?)) + { + return new global::OpenRouter.JsonConverters.ParameterNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EndpointStatus)) + { + return new global::OpenRouter.JsonConverters.EndpointStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EndpointStatus?)) + { + return new global::OpenRouter.JsonConverters.EndpointStatusNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new EndpointsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.EndpointsClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.EndpointsClient.g.cs index ea2f8cd8..75f1d19f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.EndpointsClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.EndpointsClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class EndpointsClient : global::OpenRouter.IEndpointsClien /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.EndpointsSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Files.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Files.JsonSerializerContext.g.cs new file mode 100644 index 00000000..f5599cf4 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Files.JsonSerializerContext.g.cs @@ -0,0 +1,203 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PayloadTooLargeResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PayloadTooLargeResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FileMetadataType), TypeInfoPropertyName = "FileMetadataType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FileMetadata))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FileListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FileDeleteResponseType), TypeInfoPropertyName = "FileDeleteResponseType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FileDeleteResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UploadFileRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FileMetadataType?), TypeInfoPropertyName = "NullableFileMetadataType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FileDeleteResponseType?), TypeInfoPropertyName = "NullableFileDeleteResponseType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class FilesSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class FilesSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static FilesSourceGenerationContext Default { get; } = new(DefaultOptions); + + private FilesSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.FileMetadataType) + + || typeToConvert == typeof(global::OpenRouter.FileMetadataType?) + + || typeToConvert == typeof(global::OpenRouter.FileDeleteResponseType) + + || typeToConvert == typeof(global::OpenRouter.FileDeleteResponseType?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.FileMetadataType)) + { + return new global::OpenRouter.JsonConverters.FileMetadataTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.FileMetadataType?)) + { + return new global::OpenRouter.JsonConverters.FileMetadataTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.FileDeleteResponseType)) + { + return new global::OpenRouter.JsonConverters.FileDeleteResponseTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.FileDeleteResponseType?)) + { + return new global::OpenRouter.JsonConverters.FileDeleteResponseTypeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new FilesSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.g.cs index 75205df8..d5b159ae 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class FilesClient : global::OpenRouter.IFilesClient, globa /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.FilesSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Generations.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Generations.JsonSerializerContext.g.cs new file mode 100644 index 00000000..45baa77c --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Generations.JsonSerializerContext.g.cs @@ -0,0 +1,261 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GenerationResponseDataApiType), TypeInfoPropertyName = "GenerationResponseDataApiType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GenerationResponseDataDataRegion), TypeInfoPropertyName = "GenerationResponseDataDataRegion2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderResponseProviderName), TypeInfoPropertyName = "ProviderResponseProviderName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderResponseRoutedServiceTier), TypeInfoPropertyName = "ProviderResponseRoutedServiceTier2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GenerationResponseData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GenerationResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GenerationContentDataInput0))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GenerationContentDataInput1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GenerationContentDataInput), TypeInfoPropertyName = "GenerationContentDataInput2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GenerationContentDataOutput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GenerationContentData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GenerationContentResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SubmitGenerationFeedbackRequestCategory), TypeInfoPropertyName = "SubmitGenerationFeedbackRequestCategory2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SubmitGenerationFeedbackRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SubmitGenerationFeedbackResponseData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SubmitGenerationFeedbackResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GenerationResponseDataApiType?), TypeInfoPropertyName = "NullableGenerationResponseDataApiType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GenerationResponseDataDataRegion?), TypeInfoPropertyName = "NullableGenerationResponseDataDataRegion2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderResponseProviderName?), TypeInfoPropertyName = "NullableProviderResponseProviderName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderResponseRoutedServiceTier?), TypeInfoPropertyName = "NullableProviderResponseRoutedServiceTier2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GenerationContentDataInput?), TypeInfoPropertyName = "NullableGenerationContentDataInput2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SubmitGenerationFeedbackRequestCategory?), TypeInfoPropertyName = "NullableSubmitGenerationFeedbackRequestCategory2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class GenerationsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class GenerationsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static GenerationsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private GenerationsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.GenerationContentDataInputJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.GenerationResponseDataApiType) + + || typeToConvert == typeof(global::OpenRouter.GenerationResponseDataApiType?) + + || typeToConvert == typeof(global::OpenRouter.GenerationResponseDataDataRegion) + + || typeToConvert == typeof(global::OpenRouter.GenerationResponseDataDataRegion?) + + || typeToConvert == typeof(global::OpenRouter.ProviderResponseProviderName) + + || typeToConvert == typeof(global::OpenRouter.ProviderResponseProviderName?) + + || typeToConvert == typeof(global::OpenRouter.ProviderResponseRoutedServiceTier) + + || typeToConvert == typeof(global::OpenRouter.ProviderResponseRoutedServiceTier?) + + || typeToConvert == typeof(global::OpenRouter.SubmitGenerationFeedbackRequestCategory) + + || typeToConvert == typeof(global::OpenRouter.SubmitGenerationFeedbackRequestCategory?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.GenerationResponseDataApiType)) + { + return new global::OpenRouter.JsonConverters.GenerationResponseDataApiTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GenerationResponseDataApiType?)) + { + return new global::OpenRouter.JsonConverters.GenerationResponseDataApiTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GenerationResponseDataDataRegion)) + { + return new global::OpenRouter.JsonConverters.GenerationResponseDataDataRegionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GenerationResponseDataDataRegion?)) + { + return new global::OpenRouter.JsonConverters.GenerationResponseDataDataRegionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderResponseProviderName)) + { + return new global::OpenRouter.JsonConverters.ProviderResponseProviderNameJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderResponseProviderName?)) + { + return new global::OpenRouter.JsonConverters.ProviderResponseProviderNameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderResponseRoutedServiceTier)) + { + return new global::OpenRouter.JsonConverters.ProviderResponseRoutedServiceTierJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderResponseRoutedServiceTier?)) + { + return new global::OpenRouter.JsonConverters.ProviderResponseRoutedServiceTierNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.SubmitGenerationFeedbackRequestCategory)) + { + return new global::OpenRouter.JsonConverters.SubmitGenerationFeedbackRequestCategoryJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.SubmitGenerationFeedbackRequestCategory?)) + { + return new global::OpenRouter.JsonConverters.SubmitGenerationFeedbackRequestCategoryNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new GenerationsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.g.cs index e366953e..853b6512 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class GenerationsClient : global::OpenRouter.IGenerationsC /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.GenerationsSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Guardrails.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Guardrails.JsonSerializerContext.g.cs new file mode 100644 index 00000000..d245a13f --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Guardrails.JsonSerializerContext.g.cs @@ -0,0 +1,280 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentFilterBuiltinAction), TypeInfoPropertyName = "ContentFilterBuiltinAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PromptInjectionScanScope), TypeInfoPropertyName = "PromptInjectionScanScope2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentFilterBuiltinSlug), TypeInfoPropertyName = "ContentFilterBuiltinSlug2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentFilterBuiltinEntry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentFilterAction), TypeInfoPropertyName = "ContentFilterAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentFilterEntry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GuardrailInterval), TypeInfoPropertyName = "GuardrailInterval2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Guardrail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ListGuardrailsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentFilterBuiltinEntryInput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateGuardrailRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateGuardrailResponseData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateGuardrailResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetGuardrailResponseData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetGuardrailResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DeleteGuardrailResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateGuardrailRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateGuardrailResponseData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateGuardrailResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.KeyAssignment))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ListKeyAssignmentsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BulkAssignKeysRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BulkAssignKeysResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BulkUnassignKeysRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BulkUnassignKeysResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.MemberAssignment))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ListMemberAssignmentsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BulkAssignMembersRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BulkAssignMembersResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BulkUnassignMembersRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BulkUnassignMembersResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentFilterBuiltinAction?), TypeInfoPropertyName = "NullableContentFilterBuiltinAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PromptInjectionScanScope?), TypeInfoPropertyName = "NullablePromptInjectionScanScope2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentFilterBuiltinSlug?), TypeInfoPropertyName = "NullableContentFilterBuiltinSlug2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentFilterAction?), TypeInfoPropertyName = "NullableContentFilterAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GuardrailInterval?), TypeInfoPropertyName = "NullableGuardrailInterval2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class GuardrailsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class GuardrailsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static GuardrailsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private GuardrailsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.ContentFilterBuiltinAction) + + || typeToConvert == typeof(global::OpenRouter.ContentFilterBuiltinAction?) + + || typeToConvert == typeof(global::OpenRouter.PromptInjectionScanScope) + + || typeToConvert == typeof(global::OpenRouter.PromptInjectionScanScope?) + + || typeToConvert == typeof(global::OpenRouter.ContentFilterBuiltinSlug) + + || typeToConvert == typeof(global::OpenRouter.ContentFilterBuiltinSlug?) + + || typeToConvert == typeof(global::OpenRouter.ContentFilterAction) + + || typeToConvert == typeof(global::OpenRouter.ContentFilterAction?) + + || typeToConvert == typeof(global::OpenRouter.GuardrailInterval) + + || typeToConvert == typeof(global::OpenRouter.GuardrailInterval?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.ContentFilterBuiltinAction)) + { + return new global::OpenRouter.JsonConverters.ContentFilterBuiltinActionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContentFilterBuiltinAction?)) + { + return new global::OpenRouter.JsonConverters.ContentFilterBuiltinActionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PromptInjectionScanScope)) + { + return new global::OpenRouter.JsonConverters.PromptInjectionScanScopeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.PromptInjectionScanScope?)) + { + return new global::OpenRouter.JsonConverters.PromptInjectionScanScopeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContentFilterBuiltinSlug)) + { + return new global::OpenRouter.JsonConverters.ContentFilterBuiltinSlugJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContentFilterBuiltinSlug?)) + { + return new global::OpenRouter.JsonConverters.ContentFilterBuiltinSlugNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContentFilterAction)) + { + return new global::OpenRouter.JsonConverters.ContentFilterActionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ContentFilterAction?)) + { + return new global::OpenRouter.JsonConverters.ContentFilterActionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GuardrailInterval)) + { + return new global::OpenRouter.JsonConverters.GuardrailIntervalJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GuardrailInterval?)) + { + return new global::OpenRouter.JsonConverters.GuardrailIntervalNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new GuardrailsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.g.cs index b35001a5..b907a059 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class GuardrailsClient : global::OpenRouter.IGuardrailsCli /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.GuardrailsSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Images.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Images.JsonSerializerContext.g.cs new file mode 100644 index 00000000..65633954 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Images.JsonSerializerContext.g.cs @@ -0,0 +1,576 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderName), TypeInfoPropertyName = "ProviderName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSort), TypeInfoPropertyName = "ProviderSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigBy), TypeInfoPropertyName = "ProviderSortConfigBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigPartition), TypeInfoPropertyName = "ProviderSortConfigPartition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PayloadTooLargeResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PayloadTooLargeResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationRequestAspectRatio), TypeInfoPropertyName = "ImageGenerationRequestAspectRatio2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationRequestBackground), TypeInfoPropertyName = "ImageGenerationRequestBackground2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceDiscriminatorMappingImageUrlImageUrl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartImage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationRequestOutputFormat), TypeInfoPropertyName = "ImageGenerationRequestOutputFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationProviderPreferencesIgnoreItems), TypeInfoPropertyName = "ImageGenerationProviderPreferencesIgnoreItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationProviderPreferencesOnlyItems), TypeInfoPropertyName = "ImageGenerationProviderPreferencesOnlyItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationProviderPreferencesOptions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationProviderPreferencesOrderItems), TypeInfoPropertyName = "ImageGenerationProviderPreferencesOrderItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationProviderPreferencesSort), TypeInfoPropertyName = "ImageGenerationProviderPreferencesSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationProviderPreferences))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationRequestQuality), TypeInfoPropertyName = "ImageGenerationRequestQuality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationRequestResolution), TypeInfoPropertyName = "ImageGenerationRequestResolution2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationResponseDataItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCacheCreation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationUsageCompletionTokensDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CostDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicIterationCacheCreation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCompactionUsageIterationType), TypeInfoPropertyName = "AnthropicCompactionUsageIterationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCompactionUsageIteration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicMessageUsageIterationType), TypeInfoPropertyName = "AnthropicMessageUsageIterationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicMessageUsageIteration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIterationType), TypeInfoPropertyName = "AnthropicAdvisorMessageUsageIterationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIteration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicUnknownUsageIteration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicUsageIteration), TypeInfoPropertyName = "AnthropicUsageIteration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationUsagePromptTokensDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationUsageServerToolUse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicSpeed), TypeInfoPropertyName = "AnthropicSpeed2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationUsage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTimeOffset))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageInputModality), TypeInfoPropertyName = "ImageInputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageOutputModality), TypeInfoPropertyName = "ImageOutputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageModelArchitecture))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EnumCapabilityType), TypeInfoPropertyName = "EnumCapabilityType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RangeCapabilityType), TypeInfoPropertyName = "RangeCapabilityType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CapabilityDescriptor), TypeInfoPropertyName = "CapabilityDescriptor2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CapabilityDescriptorVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CapabilityDescriptorVariant1Type), TypeInfoPropertyName = "CapabilityDescriptorVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CapabilityDescriptorVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CapabilityDescriptorVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CapabilityDescriptorDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CapabilityDescriptorDiscriminatorType), TypeInfoPropertyName = "CapabilityDescriptorDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SupportedParameters))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageModelListItem))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageModelsListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImagePricingEntryBillable), TypeInfoPropertyName = "ImagePricingEntryBillable2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImagePricingEntryUnit), TypeInfoPropertyName = "ImagePricingEntryUnit2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImagePricingEntry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageEndpoint))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageModelEndpointsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderName?), TypeInfoPropertyName = "NullableProviderName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSort?), TypeInfoPropertyName = "NullableProviderSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigBy?), TypeInfoPropertyName = "NullableProviderSortConfigBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigPartition?), TypeInfoPropertyName = "NullableProviderSortConfigPartition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationRequestAspectRatio?), TypeInfoPropertyName = "NullableImageGenerationRequestAspectRatio2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationRequestBackground?), TypeInfoPropertyName = "NullableImageGenerationRequestBackground2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationRequestOutputFormat?), TypeInfoPropertyName = "NullableImageGenerationRequestOutputFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationProviderPreferencesIgnoreItems?), TypeInfoPropertyName = "NullableImageGenerationProviderPreferencesIgnoreItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationProviderPreferencesOnlyItems?), TypeInfoPropertyName = "NullableImageGenerationProviderPreferencesOnlyItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationProviderPreferencesOrderItems?), TypeInfoPropertyName = "NullableImageGenerationProviderPreferencesOrderItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationProviderPreferencesSort?), TypeInfoPropertyName = "NullableImageGenerationProviderPreferencesSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationRequestQuality?), TypeInfoPropertyName = "NullableImageGenerationRequestQuality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageGenerationRequestResolution?), TypeInfoPropertyName = "NullableImageGenerationRequestResolution2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicCompactionUsageIterationType?), TypeInfoPropertyName = "NullableAnthropicCompactionUsageIterationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicMessageUsageIterationType?), TypeInfoPropertyName = "NullableAnthropicMessageUsageIterationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIterationType?), TypeInfoPropertyName = "NullableAnthropicAdvisorMessageUsageIterationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicUsageIteration?), TypeInfoPropertyName = "NullableAnthropicUsageIteration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AnthropicSpeed?), TypeInfoPropertyName = "NullableAnthropicSpeed2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTimeOffset?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageInputModality?), TypeInfoPropertyName = "NullableImageInputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImageOutputModality?), TypeInfoPropertyName = "NullableImageOutputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.EnumCapabilityType?), TypeInfoPropertyName = "NullableEnumCapabilityType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RangeCapabilityType?), TypeInfoPropertyName = "NullableRangeCapabilityType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CapabilityDescriptor?), TypeInfoPropertyName = "NullableCapabilityDescriptor2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CapabilityDescriptorVariant1Type?), TypeInfoPropertyName = "NullableCapabilityDescriptorVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CapabilityDescriptorDiscriminatorType?), TypeInfoPropertyName = "NullableCapabilityDescriptorDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImagePricingEntryBillable?), TypeInfoPropertyName = "NullableImagePricingEntryBillable2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ImagePricingEntryUnit?), TypeInfoPropertyName = "NullableImagePricingEntryUnit2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class ImagesSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ImagesSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ImagesSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ImagesSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.ImageGenerationProviderPreferencesIgnoreItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ImageGenerationProviderPreferencesOnlyItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ImageGenerationProviderPreferencesOrderItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ImageGenerationProviderPreferencesSortJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.AnthropicUsageIterationJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.CapabilityDescriptorJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.ProviderName) + + || typeToConvert == typeof(global::OpenRouter.ProviderName?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSort) + + || typeToConvert == typeof(global::OpenRouter.ProviderSort?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition?) + + || typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestAspectRatio) + + || typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestAspectRatio?) + + || typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestBackground) + + || typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestBackground?) + + || typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestOutputFormat) + + || typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestOutputFormat?) + + || typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestQuality) + + || typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestQuality?) + + || typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestResolution) + + || typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestResolution?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCompactionUsageIterationType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicCompactionUsageIterationType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicMessageUsageIterationType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicMessageUsageIterationType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIterationType) + + || typeToConvert == typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIterationType?) + + || typeToConvert == typeof(global::OpenRouter.AnthropicSpeed) + + || typeToConvert == typeof(global::OpenRouter.AnthropicSpeed?) + + || typeToConvert == typeof(global::OpenRouter.ImageInputModality) + + || typeToConvert == typeof(global::OpenRouter.ImageInputModality?) + + || typeToConvert == typeof(global::OpenRouter.ImageOutputModality) + + || typeToConvert == typeof(global::OpenRouter.ImageOutputModality?) + + || typeToConvert == typeof(global::OpenRouter.EnumCapabilityType) + + || typeToConvert == typeof(global::OpenRouter.EnumCapabilityType?) + + || typeToConvert == typeof(global::OpenRouter.RangeCapabilityType) + + || typeToConvert == typeof(global::OpenRouter.RangeCapabilityType?) + + || typeToConvert == typeof(global::OpenRouter.CapabilityDescriptorVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.CapabilityDescriptorVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.CapabilityDescriptorDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.CapabilityDescriptorDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.ImagePricingEntryBillable) + + || typeToConvert == typeof(global::OpenRouter.ImagePricingEntryBillable?) + + || typeToConvert == typeof(global::OpenRouter.ImagePricingEntryUnit) + + || typeToConvert == typeof(global::OpenRouter.ImagePricingEntryUnit?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.ProviderName)) + { + return new global::OpenRouter.JsonConverters.ProviderNameJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderName?)) + { + return new global::OpenRouter.JsonConverters.ProviderNameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSort)) + { + return new global::OpenRouter.JsonConverters.ProviderSortJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSort?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigByJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigByNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigPartitionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigPartitionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestAspectRatio)) + { + return new global::OpenRouter.JsonConverters.ImageGenerationRequestAspectRatioJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestAspectRatio?)) + { + return new global::OpenRouter.JsonConverters.ImageGenerationRequestAspectRatioNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestBackground)) + { + return new global::OpenRouter.JsonConverters.ImageGenerationRequestBackgroundJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestBackground?)) + { + return new global::OpenRouter.JsonConverters.ImageGenerationRequestBackgroundNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestOutputFormat)) + { + return new global::OpenRouter.JsonConverters.ImageGenerationRequestOutputFormatJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestOutputFormat?)) + { + return new global::OpenRouter.JsonConverters.ImageGenerationRequestOutputFormatNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestQuality)) + { + return new global::OpenRouter.JsonConverters.ImageGenerationRequestQualityJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestQuality?)) + { + return new global::OpenRouter.JsonConverters.ImageGenerationRequestQualityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestResolution)) + { + return new global::OpenRouter.JsonConverters.ImageGenerationRequestResolutionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageGenerationRequestResolution?)) + { + return new global::OpenRouter.JsonConverters.ImageGenerationRequestResolutionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCompactionUsageIterationType)) + { + return new global::OpenRouter.JsonConverters.AnthropicCompactionUsageIterationTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicCompactionUsageIterationType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicCompactionUsageIterationTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicMessageUsageIterationType)) + { + return new global::OpenRouter.JsonConverters.AnthropicMessageUsageIterationTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicMessageUsageIterationType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicMessageUsageIterationTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIterationType)) + { + return new global::OpenRouter.JsonConverters.AnthropicAdvisorMessageUsageIterationTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIterationType?)) + { + return new global::OpenRouter.JsonConverters.AnthropicAdvisorMessageUsageIterationTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicSpeed)) + { + return new global::OpenRouter.JsonConverters.AnthropicSpeedJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AnthropicSpeed?)) + { + return new global::OpenRouter.JsonConverters.AnthropicSpeedNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageInputModality)) + { + return new global::OpenRouter.JsonConverters.ImageInputModalityJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageInputModality?)) + { + return new global::OpenRouter.JsonConverters.ImageInputModalityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageOutputModality)) + { + return new global::OpenRouter.JsonConverters.ImageOutputModalityJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImageOutputModality?)) + { + return new global::OpenRouter.JsonConverters.ImageOutputModalityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EnumCapabilityType)) + { + return new global::OpenRouter.JsonConverters.EnumCapabilityTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.EnumCapabilityType?)) + { + return new global::OpenRouter.JsonConverters.EnumCapabilityTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.RangeCapabilityType)) + { + return new global::OpenRouter.JsonConverters.RangeCapabilityTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.RangeCapabilityType?)) + { + return new global::OpenRouter.JsonConverters.RangeCapabilityTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CapabilityDescriptorVariant1Type)) + { + return new global::OpenRouter.JsonConverters.CapabilityDescriptorVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CapabilityDescriptorVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.CapabilityDescriptorVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CapabilityDescriptorDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.CapabilityDescriptorDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CapabilityDescriptorDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.CapabilityDescriptorDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImagePricingEntryBillable)) + { + return new global::OpenRouter.JsonConverters.ImagePricingEntryBillableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImagePricingEntryBillable?)) + { + return new global::OpenRouter.JsonConverters.ImagePricingEntryBillableNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImagePricingEntryUnit)) + { + return new global::OpenRouter.JsonConverters.ImagePricingEntryUnitJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ImagePricingEntryUnit?)) + { + return new global::OpenRouter.JsonConverters.ImagePricingEntryUnitNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ImagesSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.g.cs index 92ffe42f..d5030195 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class ImagesClient : global::OpenRouter.IImagesClient, glo /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.ImagesSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.JsonSerializerContext.g.cs new file mode 100644 index 00000000..08d7b40d --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.JsonSerializerContext.g.cs @@ -0,0 +1,367 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningEffort), TypeInfoPropertyName = "ReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTimeOffset))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputModality), TypeInfoPropertyName = "InputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InstructType), TypeInfoPropertyName = "InstructType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OutputModality), TypeInfoPropertyName = "OutputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelGroup), TypeInfoPropertyName = "ModelGroup2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelArchitecture))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AABenchmarkEntry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DABenchmarkEntry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelBenchmarks))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DefaultParameters))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelLinks))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PerRequestLimits))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PricingOverride))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PublicPricing))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelReasoning))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Parameter), TypeInfoPropertyName = "Parameter2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TopProviderInfo))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Model))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsListResponseLinks))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsGetParametersCategory), TypeInfoPropertyName = "ModelsGetParametersCategory2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsGetParametersSort), TypeInfoPropertyName = "ModelsGetParametersSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsGetParametersDistillable), TypeInfoPropertyName = "ModelsGetParametersDistillable2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsGetParametersZdr), TypeInfoPropertyName = "ModelsGetParametersZdr2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsGetParametersRegion), TypeInfoPropertyName = "ModelsGetParametersRegion2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsCountResponseData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsCountResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ReasoningEffort?), TypeInfoPropertyName = "NullableReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTimeOffset?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputModality?), TypeInfoPropertyName = "NullableInputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InstructType?), TypeInfoPropertyName = "NullableInstructType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OutputModality?), TypeInfoPropertyName = "NullableOutputModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelGroup?), TypeInfoPropertyName = "NullableModelGroup2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Parameter?), TypeInfoPropertyName = "NullableParameter2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsGetParametersCategory?), TypeInfoPropertyName = "NullableModelsGetParametersCategory2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsGetParametersSort?), TypeInfoPropertyName = "NullableModelsGetParametersSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsGetParametersDistillable?), TypeInfoPropertyName = "NullableModelsGetParametersDistillable2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsGetParametersZdr?), TypeInfoPropertyName = "NullableModelsGetParametersZdr2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ModelsGetParametersRegion?), TypeInfoPropertyName = "NullableModelsGetParametersRegion2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class ModelsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ModelsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ModelsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ModelsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.ReasoningEffort) + + || typeToConvert == typeof(global::OpenRouter.ReasoningEffort?) + + || typeToConvert == typeof(global::OpenRouter.InputModality) + + || typeToConvert == typeof(global::OpenRouter.InputModality?) + + || typeToConvert == typeof(global::OpenRouter.InstructType) + + || typeToConvert == typeof(global::OpenRouter.InstructType?) + + || typeToConvert == typeof(global::OpenRouter.OutputModality) + + || typeToConvert == typeof(global::OpenRouter.OutputModality?) + + || typeToConvert == typeof(global::OpenRouter.ModelGroup) + + || typeToConvert == typeof(global::OpenRouter.ModelGroup?) + + || typeToConvert == typeof(global::OpenRouter.Parameter) + + || typeToConvert == typeof(global::OpenRouter.Parameter?) + + || typeToConvert == typeof(global::OpenRouter.ModelsGetParametersCategory) + + || typeToConvert == typeof(global::OpenRouter.ModelsGetParametersCategory?) + + || typeToConvert == typeof(global::OpenRouter.ModelsGetParametersSort) + + || typeToConvert == typeof(global::OpenRouter.ModelsGetParametersSort?) + + || typeToConvert == typeof(global::OpenRouter.ModelsGetParametersDistillable) + + || typeToConvert == typeof(global::OpenRouter.ModelsGetParametersDistillable?) + + || typeToConvert == typeof(global::OpenRouter.ModelsGetParametersZdr) + + || typeToConvert == typeof(global::OpenRouter.ModelsGetParametersZdr?) + + || typeToConvert == typeof(global::OpenRouter.ModelsGetParametersRegion) + + || typeToConvert == typeof(global::OpenRouter.ModelsGetParametersRegion?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.ReasoningEffort)) + { + return new global::OpenRouter.JsonConverters.ReasoningEffortJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ReasoningEffort?)) + { + return new global::OpenRouter.JsonConverters.ReasoningEffortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InputModality)) + { + return new global::OpenRouter.JsonConverters.InputModalityJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InputModality?)) + { + return new global::OpenRouter.JsonConverters.InputModalityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InstructType)) + { + return new global::OpenRouter.JsonConverters.InstructTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InstructType?)) + { + return new global::OpenRouter.JsonConverters.InstructTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OutputModality)) + { + return new global::OpenRouter.JsonConverters.OutputModalityJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OutputModality?)) + { + return new global::OpenRouter.JsonConverters.OutputModalityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelGroup)) + { + return new global::OpenRouter.JsonConverters.ModelGroupJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelGroup?)) + { + return new global::OpenRouter.JsonConverters.ModelGroupNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Parameter)) + { + return new global::OpenRouter.JsonConverters.ParameterJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Parameter?)) + { + return new global::OpenRouter.JsonConverters.ParameterNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelsGetParametersCategory)) + { + return new global::OpenRouter.JsonConverters.ModelsGetParametersCategoryJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelsGetParametersCategory?)) + { + return new global::OpenRouter.JsonConverters.ModelsGetParametersCategoryNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelsGetParametersSort)) + { + return new global::OpenRouter.JsonConverters.ModelsGetParametersSortJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelsGetParametersSort?)) + { + return new global::OpenRouter.JsonConverters.ModelsGetParametersSortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelsGetParametersDistillable)) + { + return new global::OpenRouter.JsonConverters.ModelsGetParametersDistillableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelsGetParametersDistillable?)) + { + return new global::OpenRouter.JsonConverters.ModelsGetParametersDistillableNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelsGetParametersZdr)) + { + return new global::OpenRouter.JsonConverters.ModelsGetParametersZdrJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelsGetParametersZdr?)) + { + return new global::OpenRouter.JsonConverters.ModelsGetParametersZdrNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelsGetParametersRegion)) + { + return new global::OpenRouter.JsonConverters.ModelsGetParametersRegionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ModelsGetParametersRegion?)) + { + return new global::OpenRouter.JsonConverters.ModelsGetParametersRegionNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ModelsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.g.cs index a5e1ff0b..343184b5 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class ModelsClient : global::OpenRouter.IModelsClient, glo /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.ModelsSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.OAuth.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.OAuth.JsonSerializerContext.g.cs new file mode 100644 index 00000000..a4915ad1 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.OAuth.JsonSerializerContext.g.cs @@ -0,0 +1,213 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AuthKeysPostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod), TypeInfoPropertyName = "AuthKeysPostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OAuthExchangeAuthCodeForAPIKeyResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod), TypeInfoPropertyName = "AuthKeysCodePostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaUsageLimitType), TypeInfoPropertyName = "AuthKeysCodePostRequestBodyContentApplicationJsonSchemaUsageLimitType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AuthKeysCodePostResponsesContentApplicationJsonSchemaData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OAuthCreateAuthKeysCodeResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ConflictResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ConflictResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ExchangeAuthCodeForAPIKeyRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateAuthKeysCodeRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AuthKeysPostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod?), TypeInfoPropertyName = "NullableAuthKeysPostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod?), TypeInfoPropertyName = "NullableAuthKeysCodePostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaUsageLimitType?), TypeInfoPropertyName = "NullableAuthKeysCodePostRequestBodyContentApplicationJsonSchemaUsageLimitType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime?))] + internal sealed partial class OAuthSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class OAuthSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static OAuthSourceGenerationContext Default { get; } = new(DefaultOptions); + + private OAuthSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.AuthKeysPostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod) + + || typeToConvert == typeof(global::OpenRouter.AuthKeysPostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod?) + + || typeToConvert == typeof(global::OpenRouter.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod) + + || typeToConvert == typeof(global::OpenRouter.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod?) + + || typeToConvert == typeof(global::OpenRouter.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaUsageLimitType) + + || typeToConvert == typeof(global::OpenRouter.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaUsageLimitType?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.AuthKeysPostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod)) + { + return new global::OpenRouter.JsonConverters.AuthKeysPostRequestBodyContentApplicationJsonSchemaCodeChallengeMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AuthKeysPostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod?)) + { + return new global::OpenRouter.JsonConverters.AuthKeysPostRequestBodyContentApplicationJsonSchemaCodeChallengeMethodNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod)) + { + return new global::OpenRouter.JsonConverters.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaCodeChallengeMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaCodeChallengeMethod?)) + { + return new global::OpenRouter.JsonConverters.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaCodeChallengeMethodNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaUsageLimitType)) + { + return new global::OpenRouter.JsonConverters.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaUsageLimitTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaUsageLimitType?)) + { + return new global::OpenRouter.JsonConverters.AuthKeysCodePostRequestBodyContentApplicationJsonSchemaUsageLimitTypeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new OAuthSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.g.cs index 3e011bc8..b7bb1680 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class OAuthClient : global::OpenRouter.IOAuthClient, globa /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.OAuthSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Observability.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Observability.JsonSerializerContext.g.cs new file mode 100644 index 00000000..72931ca4 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Observability.JsonSerializerContext.g.cs @@ -0,0 +1,1534 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ConflictResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ConflictResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingArizeConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityFilterRuleGroupLogic), TypeInfoPropertyName = "ObservabilityFilterRuleGroupLogic2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItemsField), TypeInfoPropertyName = "ObservabilityFilterRuleGroupRulesItemsField2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItemsOperator), TypeInfoPropertyName = "ObservabilityFilterRuleGroupRulesItemsOperator2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItemsValue), TypeInfoPropertyName = "ObservabilityFilterRuleGroupRulesItemsValue2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityFilterRuleGroup))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityFilterRulesConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingBraintrustConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingClickhouseConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingDatadogConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingGrafanaConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingLangfuseConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingLangsmithConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingNewrelicConfigRegion), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataDiscriminatorMappingNewrelicConfigRegion2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingNewrelicConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingOpikConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingOtelCollectorConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingPosthogConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingRampConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingS3Config))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingSentryConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingSnowflakeConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingWeaveConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingWebhookConfigMethod), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataDiscriminatorMappingWebhookConfigMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingWebhookConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestination), TypeInfoPropertyName = "ObservabilityDestination2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant1Type), TypeInfoPropertyName = "ObservabilityDestinationVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant2Type), TypeInfoPropertyName = "ObservabilityDestinationVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant3Type), TypeInfoPropertyName = "ObservabilityDestinationVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant4Type), TypeInfoPropertyName = "ObservabilityDestinationVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant5Type), TypeInfoPropertyName = "ObservabilityDestinationVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant6))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant6Type), TypeInfoPropertyName = "ObservabilityDestinationVariant6Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant7))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant7Type), TypeInfoPropertyName = "ObservabilityDestinationVariant7Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant8))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant8Type), TypeInfoPropertyName = "ObservabilityDestinationVariant8Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant9))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant9Type), TypeInfoPropertyName = "ObservabilityDestinationVariant9Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant10))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant10Type), TypeInfoPropertyName = "ObservabilityDestinationVariant10Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant11))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant11Type), TypeInfoPropertyName = "ObservabilityDestinationVariant11Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant12))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant12Type), TypeInfoPropertyName = "ObservabilityDestinationVariant12Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant13))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant13Type), TypeInfoPropertyName = "ObservabilityDestinationVariant13Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant14))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant14Type), TypeInfoPropertyName = "ObservabilityDestinationVariant14Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant15))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant15Type), TypeInfoPropertyName = "ObservabilityDestinationVariant15Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant16))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant16Type), TypeInfoPropertyName = "ObservabilityDestinationVariant16Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant17))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant17Type), TypeInfoPropertyName = "ObservabilityDestinationVariant17Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationDiscriminatorType), TypeInfoPropertyName = "ObservabilityDestinationDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ListObservabilityDestinationsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityFilterRulesConfigNullable))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationRequestType), TypeInfoPropertyName = "CreateObservabilityDestinationRequestType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseData), TypeInfoPropertyName = "CreateObservabilityDestinationResponseData2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant1Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant2Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant3Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant4Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant5Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant6))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant6Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant6Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant7))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant7Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant7Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant8))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant8Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant8Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant9))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant9Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant9Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant10))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant10Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant10Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant11))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant11Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant11Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant12))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant12Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant12Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant13))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant13Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant13Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant14))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant14Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant14Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant15))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant15Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant15Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant16))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant16Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant16Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant17))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant17Type), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataVariant17Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataDiscriminatorType), TypeInfoPropertyName = "CreateObservabilityDestinationResponseDataDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseData), TypeInfoPropertyName = "GetObservabilityDestinationResponseData2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant1Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant2Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant3Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant4Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant5Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant6))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant6Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant6Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant7))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant7Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant7Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant8))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant8Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant8Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant9))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant9Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant9Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant10))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant10Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant10Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant11))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant11Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant11Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant12))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant12Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant12Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant13))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant13Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant13Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant14))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant14Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant14Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant15))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant15Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant15Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant16))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant16Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant16Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant17))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant17Type), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataVariant17Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataDiscriminatorType), TypeInfoPropertyName = "GetObservabilityDestinationResponseDataDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DeleteObservabilityDestinationResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationRequestFilterRules))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseData), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseData2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant1Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant2Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant3Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant4Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant5Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant6))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant6Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant6Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant7))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant7Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant7Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant8))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant8Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant8Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant9))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant9Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant9Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant10))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant10Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant10Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant11))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant11Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant11Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant12))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant12Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant12Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant13))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant13Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant13Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant14))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant14Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant14Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant15))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant15Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant15Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant16))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant16Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant16Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant17))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant17Type), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataVariant17Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorType), TypeInfoPropertyName = "UpdateObservabilityDestinationResponseDataDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityFilterRuleGroupLogic?), TypeInfoPropertyName = "NullableObservabilityFilterRuleGroupLogic2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItemsField?), TypeInfoPropertyName = "NullableObservabilityFilterRuleGroupRulesItemsField2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItemsOperator?), TypeInfoPropertyName = "NullableObservabilityFilterRuleGroupRulesItemsOperator2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItemsValue?), TypeInfoPropertyName = "NullableObservabilityFilterRuleGroupRulesItemsValue2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingNewrelicConfigRegion?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataDiscriminatorMappingNewrelicConfigRegion2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingWebhookConfigMethod?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataDiscriminatorMappingWebhookConfigMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestination?), TypeInfoPropertyName = "NullableObservabilityDestination2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant1Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant2Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant3Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant4Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant5Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant6Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant6Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant7Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant7Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant8Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant8Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant9Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant9Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant10Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant10Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant11Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant11Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant12Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant12Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant13Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant13Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant14Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant14Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant15Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant15Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant16Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant16Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationVariant17Type?), TypeInfoPropertyName = "NullableObservabilityDestinationVariant17Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ObservabilityDestinationDiscriminatorType?), TypeInfoPropertyName = "NullableObservabilityDestinationDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationRequestType?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationRequestType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseData?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseData2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant1Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant2Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant3Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant4Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant5Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant6Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant6Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant7Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant7Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant8Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant8Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant9Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant9Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant10Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant10Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant11Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant11Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant12Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant12Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant13Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant13Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant14Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant14Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant15Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant15Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant16Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant16Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant17Type?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataVariant17Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataDiscriminatorType?), TypeInfoPropertyName = "NullableCreateObservabilityDestinationResponseDataDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseData?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseData2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant1Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant2Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant3Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant4Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant5Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant6Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant6Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant7Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant7Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant8Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant8Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant9Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant9Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant10Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant10Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant11Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant11Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant12Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant12Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant13Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant13Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant14Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant14Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant15Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant15Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant16Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant16Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant17Type?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataVariant17Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataDiscriminatorType?), TypeInfoPropertyName = "NullableGetObservabilityDestinationResponseDataDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseData?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseData2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant1Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant2Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant3Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant4Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant4Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant5Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant6Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant6Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant7Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant7Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant8Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant8Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant9Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant9Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant10Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant10Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant11Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant11Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant12Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant12Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant13Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant13Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant14Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant14Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant15Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant15Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant16Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant16Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant17Type?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataVariant17Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorType?), TypeInfoPropertyName = "NullableUpdateObservabilityDestinationResponseDataDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class ObservabilitySourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ObservabilitySourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ObservabilitySourceGenerationContext Default { get; } = new(DefaultOptions); + + private ObservabilitySourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.ObservabilityFilterRuleGroupRulesItemsValueJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.ObservabilityDestinationJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.ObservabilityFilterRuleGroupLogic) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityFilterRuleGroupLogic?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItemsField) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItemsField?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItemsOperator) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItemsOperator?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingNewrelicConfigRegion) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingNewrelicConfigRegion?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingWebhookConfigMethod) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingWebhookConfigMethod?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant3Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant3Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant4Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant4Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant5Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant5Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant6Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant6Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant7Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant7Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant8Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant8Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant9Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant9Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant10Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant10Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant11Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant11Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant12Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant12Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant13Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant13Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant14Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant14Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant15Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant15Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant16Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant16Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant17Type) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant17Type?) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationRequestType) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationRequestType?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant3Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant3Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant4Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant4Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant5Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant5Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant6Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant6Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant7Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant7Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant8Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant8Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant9Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant9Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant10Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant10Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant11Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant11Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant12Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant12Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant13Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant13Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant14Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant14Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant15Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant15Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant16Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant16Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant17Type) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant17Type?) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant3Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant3Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant4Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant4Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant5Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant5Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant6Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant6Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant7Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant7Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant8Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant8Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant9Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant9Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant10Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant10Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant11Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant11Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant12Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant12Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant13Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant13Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant14Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant14Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant15Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant15Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant16Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant16Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant17Type) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant17Type?) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant3Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant3Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant4Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant4Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant5Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant5Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant6Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant6Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant7Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant7Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant8Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant8Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant9Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant9Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant10Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant10Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant11Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant11Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant12Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant12Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant13Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant13Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant14Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant14Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant15Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant15Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant16Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant16Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant17Type) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant17Type?) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorType?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.ObservabilityFilterRuleGroupLogic)) + { + return new global::OpenRouter.JsonConverters.ObservabilityFilterRuleGroupLogicJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityFilterRuleGroupLogic?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityFilterRuleGroupLogicNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItemsField)) + { + return new global::OpenRouter.JsonConverters.ObservabilityFilterRuleGroupRulesItemsFieldJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItemsField?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityFilterRuleGroupRulesItemsFieldNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItemsOperator)) + { + return new global::OpenRouter.JsonConverters.ObservabilityFilterRuleGroupRulesItemsOperatorJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityFilterRuleGroupRulesItemsOperator?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityFilterRuleGroupRulesItemsOperatorNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingNewrelicConfigRegion)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataDiscriminatorMappingNewrelicConfigRegionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingNewrelicConfigRegion?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataDiscriminatorMappingNewrelicConfigRegionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingWebhookConfigMethod)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataDiscriminatorMappingWebhookConfigMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorMappingWebhookConfigMethod?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataDiscriminatorMappingWebhookConfigMethodNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant1Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant2Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant3Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant3Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant4Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant4TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant4Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant4TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant5Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant5TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant5Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant5TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant6Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant6TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant6Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant6TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant7Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant7TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant7Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant7TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant8Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant8TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant8Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant8TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant9Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant9TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant9Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant9TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant10Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant10TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant10Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant10TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant11Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant11TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant11Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant11TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant12Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant12TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant12Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant12TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant13Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant13TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant13Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant13TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant14Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant14TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant14Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant14TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant15Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant15TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant15Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant15TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant16Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant16TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant16Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant16TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant17Type)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant17TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationVariant17Type?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationVariant17TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ObservabilityDestinationDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.ObservabilityDestinationDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationRequestType)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationRequestTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationRequestType?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationRequestTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant1Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant2Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant3Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant3Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant4Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant4TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant4Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant4TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant5Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant5TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant5Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant5TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant6Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant6TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant6Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant6TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant7Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant7TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant7Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant7TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant8Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant8TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant8Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant8TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant9Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant9TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant9Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant9TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant10Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant10TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant10Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant10TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant11Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant11TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant11Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant11TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant12Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant12TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant12Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant12TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant13Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant13TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant13Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant13TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant14Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant14TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant14Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant14TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant15Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant15TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant15Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant15TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant16Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant16TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant16Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant16TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant17Type)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant17TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant17Type?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataVariant17TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.CreateObservabilityDestinationResponseDataDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant1Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant2Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant3Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant3Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant4Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant4TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant4Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant4TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant5Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant5TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant5Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant5TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant6Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant6TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant6Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant6TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant7Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant7TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant7Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant7TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant8Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant8TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant8Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant8TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant9Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant9TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant9Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant9TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant10Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant10TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant10Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant10TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant11Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant11TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant11Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant11TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant12Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant12TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant12Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant12TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant13Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant13TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant13Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant13TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant14Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant14TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant14Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant14TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant15Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant15TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant15Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant15TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant16Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant16TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant16Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant16TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant17Type)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant17TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant17Type?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataVariant17TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.GetObservabilityDestinationResponseDataDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.GetObservabilityDestinationResponseDataDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant1Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant2Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant3Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant3Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant4Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant4TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant4Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant4TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant5Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant5TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant5Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant5TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant6Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant6TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant6Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant6TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant7Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant7TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant7Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant7TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant8Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant8TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant8Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant8TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant9Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant9TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant9Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant9TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant10Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant10TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant10Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant10TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant11Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant11TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant11Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant11TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant12Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant12TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant12Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant12TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant13Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant13TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant13Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant13TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant14Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant14TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant14Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant14TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant15Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant15TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant15Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant15TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant16Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant16TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant16Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant16TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant17Type)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant17TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant17Type?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataVariant17TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseDataDiscriminatorTypeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ObservabilitySourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.g.cs index 25297d3e..22f805ab 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class ObservabilityClient : global::OpenRouter.IObservabil /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.ObservabilitySourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Organization.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Organization.JsonSerializerContext.g.cs new file mode 100644 index 00000000..1a030425 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Organization.JsonSerializerContext.g.cs @@ -0,0 +1,170 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrganizationMembersGetResponsesContentApplicationJsonSchemaDataItemsRole), TypeInfoPropertyName = "OrganizationMembersGetResponsesContentApplicationJsonSchemaDataItemsRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrganizationMembersGetResponsesContentApplicationJsonSchemaDataItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrganizationListOrganizationMembersResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.OrganizationMembersGetResponsesContentApplicationJsonSchemaDataItemsRole?), TypeInfoPropertyName = "NullableOrganizationMembersGetResponsesContentApplicationJsonSchemaDataItemsRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class OrganizationSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class OrganizationSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static OrganizationSourceGenerationContext Default { get; } = new(DefaultOptions); + + private OrganizationSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.OrganizationMembersGetResponsesContentApplicationJsonSchemaDataItemsRole) + + || typeToConvert == typeof(global::OpenRouter.OrganizationMembersGetResponsesContentApplicationJsonSchemaDataItemsRole?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.OrganizationMembersGetResponsesContentApplicationJsonSchemaDataItemsRole)) + { + return new global::OpenRouter.JsonConverters.OrganizationMembersGetResponsesContentApplicationJsonSchemaDataItemsRoleJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.OrganizationMembersGetResponsesContentApplicationJsonSchemaDataItemsRole?)) + { + return new global::OpenRouter.JsonConverters.OrganizationMembersGetResponsesContentApplicationJsonSchemaDataItemsRoleNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new OrganizationSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.OrganizationClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.OrganizationClient.g.cs index c445a25a..779322a5 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.OrganizationClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.OrganizationClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class OrganizationClient : global::OpenRouter.IOrganizatio /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.OrganizationSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Providers.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Providers.JsonSerializerContext.g.cs new file mode 100644 index 00000000..f9162994 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Providers.JsonSerializerContext.g.cs @@ -0,0 +1,184 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsDatacentersItems), TypeInfoPropertyName = "ProvidersGetResponsesContentApplicationJsonSchemaDataItemsDatacentersItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsHeadquarters), TypeInfoPropertyName = "ProvidersGetResponsesContentApplicationJsonSchemaDataItemsHeadquarters2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProvidersListProvidersResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsDatacentersItems?), TypeInfoPropertyName = "NullableProvidersGetResponsesContentApplicationJsonSchemaDataItemsDatacentersItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsHeadquarters?), TypeInfoPropertyName = "NullableProvidersGetResponsesContentApplicationJsonSchemaDataItemsHeadquarters2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class ProvidersSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ProvidersSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ProvidersSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ProvidersSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsDatacentersItems) + + || typeToConvert == typeof(global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsDatacentersItems?) + + || typeToConvert == typeof(global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsHeadquarters) + + || typeToConvert == typeof(global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsHeadquarters?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsDatacentersItems)) + { + return new global::OpenRouter.JsonConverters.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsDatacentersItemsJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsDatacentersItems?)) + { + return new global::OpenRouter.JsonConverters.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsDatacentersItemsNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsHeadquarters)) + { + return new global::OpenRouter.JsonConverters.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsHeadquartersJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsHeadquarters?)) + { + return new global::OpenRouter.JsonConverters.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsHeadquartersNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ProvidersSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ProvidersClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ProvidersClient.g.cs index 43fe877f..5da9b41b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ProvidersClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ProvidersClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class ProvidersClient : global::OpenRouter.IProvidersClien /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.ProvidersSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Rerank.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Rerank.JsonSerializerContext.g.cs new file mode 100644 index 00000000..47223ff8 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Rerank.JsonSerializerContext.g.cs @@ -0,0 +1,304 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderName), TypeInfoPropertyName = "ProviderName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PercentileLatencyCutoffs))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMaxLatency), TypeInfoPropertyName = "PreferredMaxLatency2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PercentileThroughputCutoffs))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMinThroughput), TypeInfoPropertyName = "PreferredMinThroughput2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Quantization), TypeInfoPropertyName = "Quantization2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSort), TypeInfoPropertyName = "ProviderSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigBy), TypeInfoPropertyName = "ProviderSortConfigBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigPartition), TypeInfoPropertyName = "ProviderSortConfigPartition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ServiceUnavailableResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ServiceUnavailableResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems), TypeInfoPropertyName = "RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderDataCollection), TypeInfoPropertyName = "RerankPostRequestBodyContentApplicationJsonSchemaProviderDataCollection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems), TypeInfoPropertyName = "RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderMaxPrice))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems), TypeInfoPropertyName = "RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItems), TypeInfoPropertyName = "RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderSort), TypeInfoPropertyName = "RerankPostRequestBodyContentApplicationJsonSchemaProviderSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProvider))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostResponsesContentApplicationJsonSchemaResultsItemsDocument))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostResponsesContentApplicationJsonSchemaResultsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostResponsesContentApplicationJsonSchemaUsage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankCreateRerankResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateRerankRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderName?), TypeInfoPropertyName = "NullableProviderName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMaxLatency?), TypeInfoPropertyName = "NullablePreferredMaxLatency2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PreferredMinThroughput?), TypeInfoPropertyName = "NullablePreferredMinThroughput2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Quantization?), TypeInfoPropertyName = "NullableQuantization2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSort?), TypeInfoPropertyName = "NullableProviderSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigBy?), TypeInfoPropertyName = "NullableProviderSortConfigBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderSortConfigPartition?), TypeInfoPropertyName = "NullableProviderSortConfigPartition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems?), TypeInfoPropertyName = "NullableRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderDataCollection?), TypeInfoPropertyName = "NullableRerankPostRequestBodyContentApplicationJsonSchemaProviderDataCollection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems?), TypeInfoPropertyName = "NullableRerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems?), TypeInfoPropertyName = "NullableRerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItems?), TypeInfoPropertyName = "NullableRerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderSort?), TypeInfoPropertyName = "NullableRerankPostRequestBodyContentApplicationJsonSchemaProviderSort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class RerankSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class RerankSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static RerankSourceGenerationContext Default { get; } = new(DefaultOptions); + + private RerankSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.PreferredMaxLatencyJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.PreferredMinThroughputJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderSortJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.ProviderName) + + || typeToConvert == typeof(global::OpenRouter.ProviderName?) + + || typeToConvert == typeof(global::OpenRouter.Quantization) + + || typeToConvert == typeof(global::OpenRouter.Quantization?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSort) + + || typeToConvert == typeof(global::OpenRouter.ProviderSort?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy?) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition) + + || typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition?) + + || typeToConvert == typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderDataCollection) + + || typeToConvert == typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderDataCollection?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.ProviderName)) + { + return new global::OpenRouter.JsonConverters.ProviderNameJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderName?)) + { + return new global::OpenRouter.JsonConverters.ProviderNameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Quantization)) + { + return new global::OpenRouter.JsonConverters.QuantizationJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.Quantization?)) + { + return new global::OpenRouter.JsonConverters.QuantizationNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSort)) + { + return new global::OpenRouter.JsonConverters.ProviderSortJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSort?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigByJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigBy?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigByNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigPartitionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.ProviderSortConfigPartition?)) + { + return new global::OpenRouter.JsonConverters.ProviderSortConfigPartitionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderDataCollection)) + { + return new global::OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderDataCollectionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaProviderDataCollection?)) + { + return new global::OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderDataCollectionNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new RerankSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.RerankClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.RerankClient.g.cs index ec46392c..93e06999 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.RerankClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.RerankClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class RerankClient : global::OpenRouter.IRerankClient, glo /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.RerankSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Stt.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Stt.JsonSerializerContext.g.cs new file mode 100644 index 00000000..26a8b319 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Stt.JsonSerializerContext.g.cs @@ -0,0 +1,210 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ServiceUnavailableResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ServiceUnavailableResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderOptions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.STTInputAudio))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SttRequestProvider))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SttRequestResponseFormat), TypeInfoPropertyName = "SttRequestResponseFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.STTTimestampGranularity), TypeInfoPropertyName = "STTTimestampGranularity2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.STTRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.STTSegment))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.STTUsage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.STTWord))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.STTResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SttRequestResponseFormat?), TypeInfoPropertyName = "NullableSttRequestResponseFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.STTTimestampGranularity?), TypeInfoPropertyName = "NullableSTTTimestampGranularity2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class SttSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class SttSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static SttSourceGenerationContext Default { get; } = new(DefaultOptions); + + private SttSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.SttRequestResponseFormat) + + || typeToConvert == typeof(global::OpenRouter.SttRequestResponseFormat?) + + || typeToConvert == typeof(global::OpenRouter.STTTimestampGranularity) + + || typeToConvert == typeof(global::OpenRouter.STTTimestampGranularity?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.SttRequestResponseFormat)) + { + return new global::OpenRouter.JsonConverters.SttRequestResponseFormatJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.SttRequestResponseFormat?)) + { + return new global::OpenRouter.JsonConverters.SttRequestResponseFormatNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.STTTimestampGranularity)) + { + return new global::OpenRouter.JsonConverters.STTTimestampGranularityJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.STTTimestampGranularity?)) + { + return new global::OpenRouter.JsonConverters.STTTimestampGranularityNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new SttSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.SttClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.SttClient.g.cs index 5d180980..069cb67b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.SttClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.SttClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class SttClient : global::OpenRouter.ISttClient, global::S /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SttSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Tts.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Tts.JsonSerializerContext.g.cs new file mode 100644 index 00000000..2d1b84cb --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Tts.JsonSerializerContext.g.cs @@ -0,0 +1,182 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ServiceUnavailableResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ServiceUnavailableResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ProviderOptions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SpeechRequestProvider))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SpeechRequestResponseFormat), TypeInfoPropertyName = "SpeechRequestResponseFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SpeechRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.SpeechRequestResponseFormat?), TypeInfoPropertyName = "NullableSpeechRequestResponseFormat2")] + internal sealed partial class TtsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class TtsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static TtsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private TtsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.SpeechRequestResponseFormat) + + || typeToConvert == typeof(global::OpenRouter.SpeechRequestResponseFormat?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.SpeechRequestResponseFormat)) + { + return new global::OpenRouter.JsonConverters.SpeechRequestResponseFormatJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.SpeechRequestResponseFormat?)) + { + return new global::OpenRouter.JsonConverters.SpeechRequestResponseFormatNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new TtsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.TtsClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.TtsClient.g.cs index 1a680c72..8e182fa0 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.TtsClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.TtsClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class TtsClient : global::OpenRouter.ITtsClient, global::S /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.TtsSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.VideoGeneration.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.VideoGeneration.JsonSerializerContext.g.cs new file mode 100644 index 00000000..adb18738 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.VideoGeneration.JsonSerializerContext.g.cs @@ -0,0 +1,410 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.PaymentRequiredResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.TooManyRequestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadGatewayResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceDiscriminatorMappingImageUrlImageUrl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTimeOffset))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequestAspectRatio), TypeInfoPropertyName = "VideoGenerationRequestAspectRatio2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FrameImageImageUrl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FrameImageType), TypeInfoPropertyName = "FrameImageType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FrameImageFrameType), TypeInfoPropertyName = "FrameImageFrameType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FrameImage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceDiscriminatorMappingAudioUrlAudioUrl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceDiscriminatorMappingVideoUrlVideoUrl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReference), TypeInfoPropertyName = "InputReference2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant1Type), TypeInfoPropertyName = "InputReferenceVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant2Type), TypeInfoPropertyName = "InputReferenceVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant3Type), TypeInfoPropertyName = "InputReferenceVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceDiscriminatorType), TypeInfoPropertyName = "InputReferenceDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequestProviderOptions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequestProvider))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequestResolution), TypeInfoPropertyName = "VideoGenerationRequestResolution2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationResponseStatus), TypeInfoPropertyName = "VideoGenerationResponseStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationUsage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelSupportedAspectRatiosItems), TypeInfoPropertyName = "VideoModelSupportedAspectRatiosItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelSupportedFrameImagesItems), TypeInfoPropertyName = "VideoModelSupportedFrameImagesItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelSupportedResolutionsItems), TypeInfoPropertyName = "VideoModelSupportedResolutionsItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelSupportedSizesItems), TypeInfoPropertyName = "VideoModelSupportedSizesItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModel))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelsListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTimeOffset?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequestAspectRatio?), TypeInfoPropertyName = "NullableVideoGenerationRequestAspectRatio2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FrameImageType?), TypeInfoPropertyName = "NullableFrameImageType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FrameImageFrameType?), TypeInfoPropertyName = "NullableFrameImageFrameType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReference?), TypeInfoPropertyName = "NullableInputReference2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant1Type?), TypeInfoPropertyName = "NullableInputReferenceVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant2Type?), TypeInfoPropertyName = "NullableInputReferenceVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant3Type?), TypeInfoPropertyName = "NullableInputReferenceVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceDiscriminatorType?), TypeInfoPropertyName = "NullableInputReferenceDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequestResolution?), TypeInfoPropertyName = "NullableVideoGenerationRequestResolution2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationResponseStatus?), TypeInfoPropertyName = "NullableVideoGenerationResponseStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelSupportedAspectRatiosItems?), TypeInfoPropertyName = "NullableVideoModelSupportedAspectRatiosItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelSupportedFrameImagesItems?), TypeInfoPropertyName = "NullableVideoModelSupportedFrameImagesItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelSupportedResolutionsItems?), TypeInfoPropertyName = "NullableVideoModelSupportedResolutionsItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelSupportedSizesItems?), TypeInfoPropertyName = "NullableVideoModelSupportedSizesItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class VideoGenerationSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class VideoGenerationSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static VideoGenerationSourceGenerationContext Default { get; } = new(DefaultOptions); + + private VideoGenerationSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.InputReferenceJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.VideoGenerationRequestAspectRatio) + + || typeToConvert == typeof(global::OpenRouter.VideoGenerationRequestAspectRatio?) + + || typeToConvert == typeof(global::OpenRouter.FrameImageType) + + || typeToConvert == typeof(global::OpenRouter.FrameImageType?) + + || typeToConvert == typeof(global::OpenRouter.FrameImageFrameType) + + || typeToConvert == typeof(global::OpenRouter.FrameImageFrameType?) + + || typeToConvert == typeof(global::OpenRouter.InputReferenceVariant1Type) + + || typeToConvert == typeof(global::OpenRouter.InputReferenceVariant1Type?) + + || typeToConvert == typeof(global::OpenRouter.InputReferenceVariant2Type) + + || typeToConvert == typeof(global::OpenRouter.InputReferenceVariant2Type?) + + || typeToConvert == typeof(global::OpenRouter.InputReferenceVariant3Type) + + || typeToConvert == typeof(global::OpenRouter.InputReferenceVariant3Type?) + + || typeToConvert == typeof(global::OpenRouter.InputReferenceDiscriminatorType) + + || typeToConvert == typeof(global::OpenRouter.InputReferenceDiscriminatorType?) + + || typeToConvert == typeof(global::OpenRouter.VideoGenerationRequestResolution) + + || typeToConvert == typeof(global::OpenRouter.VideoGenerationRequestResolution?) + + || typeToConvert == typeof(global::OpenRouter.VideoGenerationResponseStatus) + + || typeToConvert == typeof(global::OpenRouter.VideoGenerationResponseStatus?) + + || typeToConvert == typeof(global::OpenRouter.VideoModelSupportedAspectRatiosItems) + + || typeToConvert == typeof(global::OpenRouter.VideoModelSupportedAspectRatiosItems?) + + || typeToConvert == typeof(global::OpenRouter.VideoModelSupportedFrameImagesItems) + + || typeToConvert == typeof(global::OpenRouter.VideoModelSupportedFrameImagesItems?) + + || typeToConvert == typeof(global::OpenRouter.VideoModelSupportedResolutionsItems) + + || typeToConvert == typeof(global::OpenRouter.VideoModelSupportedResolutionsItems?) + + || typeToConvert == typeof(global::OpenRouter.VideoModelSupportedSizesItems) + + || typeToConvert == typeof(global::OpenRouter.VideoModelSupportedSizesItems?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.VideoGenerationRequestAspectRatio)) + { + return new global::OpenRouter.JsonConverters.VideoGenerationRequestAspectRatioJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.VideoGenerationRequestAspectRatio?)) + { + return new global::OpenRouter.JsonConverters.VideoGenerationRequestAspectRatioNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.FrameImageType)) + { + return new global::OpenRouter.JsonConverters.FrameImageTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.FrameImageType?)) + { + return new global::OpenRouter.JsonConverters.FrameImageTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.FrameImageFrameType)) + { + return new global::OpenRouter.JsonConverters.FrameImageFrameTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.FrameImageFrameType?)) + { + return new global::OpenRouter.JsonConverters.FrameImageFrameTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InputReferenceVariant1Type)) + { + return new global::OpenRouter.JsonConverters.InputReferenceVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InputReferenceVariant1Type?)) + { + return new global::OpenRouter.JsonConverters.InputReferenceVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InputReferenceVariant2Type)) + { + return new global::OpenRouter.JsonConverters.InputReferenceVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InputReferenceVariant2Type?)) + { + return new global::OpenRouter.JsonConverters.InputReferenceVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InputReferenceVariant3Type)) + { + return new global::OpenRouter.JsonConverters.InputReferenceVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InputReferenceVariant3Type?)) + { + return new global::OpenRouter.JsonConverters.InputReferenceVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InputReferenceDiscriminatorType)) + { + return new global::OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.InputReferenceDiscriminatorType?)) + { + return new global::OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.VideoGenerationRequestResolution)) + { + return new global::OpenRouter.JsonConverters.VideoGenerationRequestResolutionJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.VideoGenerationRequestResolution?)) + { + return new global::OpenRouter.JsonConverters.VideoGenerationRequestResolutionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.VideoGenerationResponseStatus)) + { + return new global::OpenRouter.JsonConverters.VideoGenerationResponseStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.VideoGenerationResponseStatus?)) + { + return new global::OpenRouter.JsonConverters.VideoGenerationResponseStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.VideoModelSupportedAspectRatiosItems)) + { + return new global::OpenRouter.JsonConverters.VideoModelSupportedAspectRatiosItemsJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.VideoModelSupportedAspectRatiosItems?)) + { + return new global::OpenRouter.JsonConverters.VideoModelSupportedAspectRatiosItemsNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.VideoModelSupportedFrameImagesItems)) + { + return new global::OpenRouter.JsonConverters.VideoModelSupportedFrameImagesItemsJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.VideoModelSupportedFrameImagesItems?)) + { + return new global::OpenRouter.JsonConverters.VideoModelSupportedFrameImagesItemsNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.VideoModelSupportedResolutionsItems)) + { + return new global::OpenRouter.JsonConverters.VideoModelSupportedResolutionsItemsJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.VideoModelSupportedResolutionsItems?)) + { + return new global::OpenRouter.JsonConverters.VideoModelSupportedResolutionsItemsNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.VideoModelSupportedSizesItems)) + { + return new global::OpenRouter.JsonConverters.VideoModelSupportedSizesItemsJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.VideoModelSupportedSizesItems?)) + { + return new global::OpenRouter.JsonConverters.VideoModelSupportedSizesItemsNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new VideoGenerationSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.g.cs index 642fba5e..f3317053 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class VideoGenerationClient : global::OpenRouter.IVideoGen /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.VideoGenerationSourceGenerationContext.Default); /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Workspaces.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Workspaces.JsonSerializerContext.g.cs new file mode 100644 index 00000000..117a69f5 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Workspaces.JsonSerializerContext.g.cs @@ -0,0 +1,257 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace OpenRouter +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BadRequestResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UnauthorizedResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ForbiddenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.NotFoundResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponseErrorData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InternalServerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.Workspace))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ListWorkspacesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateWorkspaceRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateWorkspaceResponseData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.CreateWorkspaceResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetWorkspaceResponseData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.GetWorkspaceResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DeleteWorkspaceResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateWorkspaceRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateWorkspaceResponseData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpdateWorkspaceResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WorkspaceBudgetResetInterval), TypeInfoPropertyName = "WorkspaceBudgetResetInterval2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WorkspaceBudget))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ListWorkspaceBudgetsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WorkspaceBudgetInterval), TypeInfoPropertyName = "WorkspaceBudgetInterval2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpsertWorkspaceBudgetRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpsertWorkspaceBudgetResponseDataResetInterval), TypeInfoPropertyName = "UpsertWorkspaceBudgetResponseDataResetInterval2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpsertWorkspaceBudgetResponseData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpsertWorkspaceBudgetResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.DeleteWorkspaceBudgetResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WorkspaceMemberRole), TypeInfoPropertyName = "WorkspaceMemberRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WorkspaceMember))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ListWorkspaceMembersResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BulkAddWorkspaceMembersRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BulkAddWorkspaceMembersResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BulkRemoveWorkspaceMembersRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.BulkRemoveWorkspaceMembersResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WorkspaceBudgetResetInterval?), TypeInfoPropertyName = "NullableWorkspaceBudgetResetInterval2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WorkspaceBudgetInterval?), TypeInfoPropertyName = "NullableWorkspaceBudgetInterval2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.UpsertWorkspaceBudgetResponseDataResetInterval?), TypeInfoPropertyName = "NullableUpsertWorkspaceBudgetResponseDataResetInterval2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.WorkspaceMemberRole?), TypeInfoPropertyName = "NullableWorkspaceMemberRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class WorkspacesSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class WorkspacesSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static WorkspacesSourceGenerationContext Default { get; } = new(DefaultOptions); + + private WorkspacesSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::OpenRouter.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::OpenRouter.WorkspaceBudgetResetInterval) + + || typeToConvert == typeof(global::OpenRouter.WorkspaceBudgetResetInterval?) + + || typeToConvert == typeof(global::OpenRouter.WorkspaceBudgetInterval) + + || typeToConvert == typeof(global::OpenRouter.WorkspaceBudgetInterval?) + + || typeToConvert == typeof(global::OpenRouter.UpsertWorkspaceBudgetResponseDataResetInterval) + + || typeToConvert == typeof(global::OpenRouter.UpsertWorkspaceBudgetResponseDataResetInterval?) + + || typeToConvert == typeof(global::OpenRouter.WorkspaceMemberRole) + + || typeToConvert == typeof(global::OpenRouter.WorkspaceMemberRole?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::OpenRouter.WorkspaceBudgetResetInterval)) + { + return new global::OpenRouter.JsonConverters.WorkspaceBudgetResetIntervalJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WorkspaceBudgetResetInterval?)) + { + return new global::OpenRouter.JsonConverters.WorkspaceBudgetResetIntervalNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WorkspaceBudgetInterval)) + { + return new global::OpenRouter.JsonConverters.WorkspaceBudgetIntervalJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WorkspaceBudgetInterval?)) + { + return new global::OpenRouter.JsonConverters.WorkspaceBudgetIntervalNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpsertWorkspaceBudgetResponseDataResetInterval)) + { + return new global::OpenRouter.JsonConverters.UpsertWorkspaceBudgetResponseDataResetIntervalJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.UpsertWorkspaceBudgetResponseDataResetInterval?)) + { + return new global::OpenRouter.JsonConverters.UpsertWorkspaceBudgetResponseDataResetIntervalNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WorkspaceMemberRole)) + { + return new global::OpenRouter.JsonConverters.WorkspaceMemberRoleJsonConverter(); + } + + if (typeToConvert == typeof(global::OpenRouter.WorkspaceMemberRole?)) + { + return new global::OpenRouter.JsonConverters.WorkspaceMemberRoleNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new WorkspacesSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.g.cs index 64e3de9f..4aab9d5c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.g.cs @@ -34,7 +34,7 @@ public sealed partial class WorkspacesClient : global::OpenRouter.IWorkspacesCli /// public global::OpenRouter.AutoSDKClientOptions Options { get; } - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::OpenRouter.WorkspacesSourceGenerationContext.Default); /// ///